Print this page
NEX-5428 Backout the 5.0 changes
NEX-2937 Continuous write_same starves all other commands
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Steve Peng <steve.peng@nexenta.com>
NEX-3217 Panic running benchmark at ESX VM
NEX-3204 Panic doing FC rescan from ESXi 5.5u1 with VAAI enabled
        Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
        Reviewed by: Tony Nguyen <tony.nguyen@nexenta.com>
NEX-3023 Panics and hangs when using write_same and compare_and_write
Review by: Bayard Bell <bayard.bell@nexenta.com>
Review by: Rick McNeal <rick.mcneal@nexenta.com>
Review by: Jean McCormack <jean.mccormack@nexenta.com>
Approved by: Jean McCormack <jean.mccormack@nexenta.com>
Related bug: NEX-2723 Kernel panic in xfer_completion code for write_same (0x93) and compare_and_write (0x89)
NEX-2178 Multi-block transfers on memory constrained systems for write_same (0x93) and compare_and_write (0x89) cause memory corruption
NEX-2105 assertion failed: (scmd->flags & SBD_SCSI_CMD_TRANS_DATA) && scmd->trans_data != NULL, file: ../../common/io/comstar/lu/stmf_sbd/sbd_scsi.c, line: 2447
SUP-698  Appliance is regularly crashing with a kernel memory allocator, duplicate free: buffer freed
NEX-2105 assertion failed: (scmd->flags & SBD_SCSI_CMD_TRANS_DATA) && scmd->trans_data != NULL, file:
NEX-1965 Page fault at netbios_first_level_name_decode+0xbb
Support simultaneous compare_and_write operations for VAAI
Bug IDs SUP-505
                SUP-1768
                SUP-1928
Code Reviewers:
        Sarah Jelinek
        Jeffry Molanus
        Albert Lee
        Harold Shaw
OS-69 Open source VAAI
8226 nza-kernel needs to be buildable by itself
Re #6790 backspace should perform delete on console
VAAI (XXX ATS support for COMSTAR, YYY Block-copy support for COMSTAR)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_impl.h
          +++ new/usr/src/uts/common/io/comstar/lu/stmf_sbd/sbd_impl.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   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   *
  24      - * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
       24 + * Copyright 2016 Nexenta Systems, Inc.  All rights reserved.
  25   25   */
  26   26  
  27   27  #ifndef _SBD_IMPL_H
  28   28  #define _SBD_IMPL_H
  29   29  
  30   30  #ifdef  __cplusplus
  31   31  extern "C" {
  32   32  #endif
  33   33  
  34   34  struct register_lu_cmd;
  35   35  struct modify_lu_cmd;
  36   36  struct sbd_lu_attr;
  37   37  struct sbd_it_data;
  38   38  
       39 +#define ATOMIC8_GET(val) (              \
       40 +                        (atomic_add_8_nv(&(val), 0)))
       41 +#define ATOMIC32_GET(val) (             \
       42 +                        (atomic_add_32_nv(&(val), 0)))
       43 +
  39   44  /*
  40   45   * sms endianess
  41   46   */
  42   47  #define SMS_BIG_ENDIAN                  0x00
  43   48  #define SMS_LITTLE_ENDIAN               0xFF
  44   49  
  45   50  #ifdef  _BIG_ENDIAN
  46   51  #define SMS_DATA_ORDER  SMS_BIG_ENDIAN
  47   52  #else
  48   53  #define SMS_DATA_ORDER  SMS_LITTLE_ENDIAN
↓ open down ↓ 150 lines elided ↑ open up ↑
 199  204  
 200  205  typedef struct sbd_cmd {
 201  206          uint8_t         flags;
 202  207          uint8_t         nbufs;
 203  208          uint16_t        cmd_type;       /* Type of command */
 204  209          uint32_t        trans_data_len; /* Length of transient data buf */
 205  210          uint64_t        addr;           /* current */
 206  211          uint32_t        len;            /* len left */
 207  212          uint32_t        current_ro;     /* running relative offset */
 208  213          uint8_t         *trans_data;    /* Any transient data */
      214 +        ats_state_t     *ats_state;
      215 +        uint32_t        rsvd;
 209  216  } sbd_cmd_t;
 210  217  
 211  218  /*
 212  219   * flags for sbd_cmd
      220 + *
      221 + * SBD_SCSI_CMD_ACTIVE means that a command is running.  This is the time
      222 + *      between the function sbd_new_task is called and either the command
      223 + *      completion is sent (stmf_scsilib_send_status) or an abort is
      224 + *      issued
      225 + *
      226 + * SBD_SCSI_CMD_ABORT_REQUESTED is when a command is being aborted.  It may
      227 + *      be set prior to the task being dispatched or anywhere in the process
      228 + *      of the command.
      229 + *
      230 + * SBD_SCSI_CMD_XFER_FAIL is set when a command data buffer transfer was
      231 + *      errored.  Usually it leads to an abort.
      232 + *
      233 + * SBD_SCSI_CMD_SYNC_WRITE synchronous write being done.
      234 + *
      235 + * SBD_SCSI_CMD_TRANS_DATA means that a buffer has been allocated to
      236 + *      be used for the transfer of data.
 213  237   */
 214  238  #define SBD_SCSI_CMD_ACTIVE             0x01
 215  239  #define SBD_SCSI_CMD_ABORT_REQUESTED    0x02
 216  240  #define SBD_SCSI_CMD_XFER_FAIL          0x04
 217  241  #define SBD_SCSI_CMD_SYNC_WRITE         0x08
 218  242  #define SBD_SCSI_CMD_TRANS_DATA         0x10
      243 +#define SBD_SCSI_CMD_ATS_RELATED        0x20
 219  244  
 220  245  /*
 221  246   * cmd types
 222  247   */
 223  248  #define SBD_CMD_SCSI_READ       0x01
 224  249  #define SBD_CMD_SCSI_WRITE      0x02
 225  250  #define SBD_CMD_SMALL_READ      0x03
 226  251  #define SBD_CMD_SMALL_WRITE     0x04
 227  252  #define SBD_CMD_SCSI_PR_OUT     0x05
 228  253  
↓ open down ↓ 64 lines elided ↑ open up ↑
 293  318  int sbd_zvol_copy_read(sbd_lu_t *sl, uio_t *uio);
 294  319  int sbd_zvol_copy_write(sbd_lu_t *sl, uio_t *uio, int flags);
 295  320  
 296  321  stmf_status_t sbd_task_alloc(struct scsi_task *task);
 297  322  void sbd_new_task(struct scsi_task *task, struct stmf_data_buf *initial_dbuf);
 298  323  void sbd_dbuf_xfer_done(struct scsi_task *task, struct stmf_data_buf *dbuf);
 299  324  void sbd_send_status_done(struct scsi_task *task);
 300  325  void sbd_task_free(struct scsi_task *task);
 301  326  stmf_status_t sbd_abort(struct stmf_lu *lu, int abort_cmd, void *arg,
 302  327                                                          uint32_t flags);
      328 +void sbd_task_poll(struct scsi_task *task);
 303  329  void sbd_dbuf_free(struct scsi_task *task, struct stmf_data_buf *dbuf);
 304  330  void sbd_ctl(struct stmf_lu *lu, int cmd, void *arg);
 305  331  stmf_status_t sbd_info(uint32_t cmd, stmf_lu_t *lu, void *arg,
 306  332                                  uint8_t *buf, uint32_t *bufsizep);
      333 +uint8_t sbd_get_lbasize_shift(stmf_lu_t *lu);
      334 +int sbd_is_valid_lu(stmf_lu_t *lu);
 307  335  
 308  336  #ifdef  __cplusplus
 309  337  }
 310  338  #endif
 311  339  
 312  340  #endif /* _SBD_IMPL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX