Print this page
LOCAL: listen for ldi notifications of disk offline/degrade

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sys/vdev_disk.h
          +++ new/usr/src/uts/common/fs/zfs/sys/vdev_disk.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 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24      - * Copyright 2011 Joyent, Inc. All rights reserved.
       24 + * Copyright (c) 2012 Joyent, Inc. All rights reserved.
       25 + * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  25   26   */
  26   27  
  27   28  #ifndef _SYS_VDEV_DISK_H
  28   29  #define _SYS_VDEV_DISK_H
  29   30  
  30   31  #include <sys/vdev.h>
  31   32  #ifdef _KERNEL
  32   33  #include <sys/buf.h>
  33   34  #include <sys/ddi.h>
  34   35  #include <sys/sunldi.h>
↓ open down ↓ 2 lines elided ↑ open up ↑
  37   38  
  38   39  #ifdef  __cplusplus
  39   40  extern "C" {
  40   41  #endif
  41   42  
  42   43  #ifdef _KERNEL
  43   44  typedef struct vdev_disk {
  44   45          ddi_devid_t     vd_devid;
  45   46          char            *vd_minor;
  46   47          ldi_handle_t    vd_lh;
       48 +        list_t          vd_ldi_cbs;
       49 +        boolean_t       vd_ldi_offline;
  47   50  } vdev_disk_t;
  48   51  #endif
  49   52  
  50   53  extern int vdev_disk_physio(vdev_t *, caddr_t, size_t, uint64_t, int);
  51   54  
  52   55  /*
  53   56   * Since vdev_disk.c is not compiled into libzpool, this function should only be
  54   57   * defined in the zfs kernel module.
  55   58   */
  56   59  #ifdef _KERNEL
  57   60  extern int vdev_disk_ldi_physio(ldi_handle_t, caddr_t, size_t, uint64_t, int);
  58   61  #endif
  59   62  #ifdef  __cplusplus
  60   63  }
  61   64  #endif
  62   65  
  63   66  #endif  /* _SYS_VDEV_DISK_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX