Print this page
701 UNMAP support for COMSTAR
Contributed by: Sumit Gupta <sumit.gupta@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/dkio.h
          +++ new/usr/src/uts/common/sys/dkio.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1982, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + *
       25 + * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24   26   */
  25   27  
  26   28  #ifndef _SYS_DKIO_H
  27   29  #define _SYS_DKIO_H
  28   30  
  29   31  #include <sys/dklabel.h>        /* Needed for NDKMAP define */
  30   32  
  31   33  #ifdef  __cplusplus
  32   34  extern "C" {
  33   35  #endif
↓ open down ↓ 474 lines elided ↑ open up ↑
 508  510          uint8_t         dku_type;       /* firmware update type */
 509  511  } dk_updatefw_32_t;
 510  512  #endif /* _SYSCALL32 */
 511  513  
 512  514  /*
 513  515   * firmware update type - temporary or permanent use
 514  516   */
 515  517  #define FW_TYPE_TEMP    0x0             /* temporary use */
 516  518  #define FW_TYPE_PERM    0x1             /* permanent use */
 517  519  
      520 +/*
      521 + * ioctl to free space (e.g. SCSI UNMAP) off a disk.
      522 + */
      523 +#define DKIOCFREE       (DKIOC|50)
 518  524  
      525 +typedef struct dkioc_free_s {
      526 +        uint32_t df_flags;
      527 +        uint32_t df_reserved;   /* For easy 64-bit alignment below... */
      528 +        diskaddr_t df_start;
      529 +        diskaddr_t df_length;
      530 +} dkioc_free_t;
      531 +
      532 +#define DF_WAIT_SYNC    0x00000001      /* Wait for full write-out of free. */
      533 +
 519  534  #ifdef  __cplusplus
 520  535  }
 521  536  #endif
 522  537  
 523  538  #endif /* _SYS_DKIO_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX