Print this page
4334 Improve ZFS N-way mirror read performance

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/vdev_disk.c
          +++ new/usr/src/uts/common/fs/zfs/vdev_disk.c
↓ open down ↓ 541 lines elided ↑ open up ↑
 542  542                  capacity = dkm->dki_capacity - 1;
 543  543                  blksz = dkm->dki_lbsize;
 544  544                  pbsize = blksz;
 545  545          } else {
 546  546                  VDEV_DEBUG("vdev_disk_open(\"%s\"): "
 547  547                      "both DKIOCGMEDIAINFO{,EXT} calls failed, %d\n",
 548  548                      vd->vdev_path, error);
 549  549                  pbsize = DEV_BSIZE;
 550  550          }
 551  551  
      552 +        /*
      553 +         * Determine the rotation
      554 +         */
      555 +        vd->vdev_rotation_rate = VDEV_RATE_UNKNOWN;
      556 +        /* TODO: Implement when there's an ioctl which provides this info. */
      557 +
 552  558          *ashift = highbit(MAX(pbsize, SPA_MINBLOCKSIZE)) - 1;
 553  559  
 554  560          if (vd->vdev_wholedisk == 1) {
 555  561                  int wce = 1;
 556  562  
 557  563                  if (error == 0) {
 558  564                          /*
 559  565                           * If we have the capability to expand, we'd have
 560  566                           * found out via success from DKIOCGMEDIAINFO{,EXT}.
 561  567                           * Adjust max_psize upward accordingly since we know
↓ open down ↓ 381 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX