Print this page
7938 Port ZOL #3712 disable LBA weighting on files and SSDs

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/vdev_file.c
          +++ new/usr/src/uts/common/fs/zfs/vdev_file.c
↓ open down ↓ 51 lines elided ↑ open up ↑
  52   52  static int
  53   53  vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
  54   54      uint64_t *ashift)
  55   55  {
  56   56          vdev_file_t *vf;
  57   57          vnode_t *vp;
  58   58          vattr_t vattr;
  59   59          int error;
  60   60  
  61   61          /*
       62 +         * Rotational optimizations only make sense on block devices
       63 +         */
       64 +        vd->vdev_nonrot = B_TRUE;
       65 +
       66 +        /*
  62   67           * We must have a pathname, and it must be absolute.
  63   68           */
  64   69          if (vd->vdev_path == NULL || vd->vdev_path[0] != '/') {
  65   70                  vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
  66   71                  return (SET_ERROR(EINVAL));
  67   72          }
  68   73  
  69   74          /*
  70   75           * Reopen the device if it's not currently open.  Otherwise,
  71   76           * just update the physical size of the device.
↓ open down ↓ 216 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX