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