char *device = bdev->bd_disk->disk_name;
int error;
- /* Skip devices which are not whole disks (partitions) */
- if (!v->vdev_wholedisk)
+ /*
+ * Skip devices which are not whole disks (partitions).
+ * Device-mapper devices are excepted since they may be whole
+ * disks despite the vdev_wholedisk flag, in which case we can
+ * and should switch the elevator. If the device-mapper device
+ * does not have an elevator (i.e. dm-raid, dm-crypt, etc.) the
+ * "Skip devices without schedulers" check below will fail.
+ */
+ if (!v->vdev_wholedisk && strncmp(device, "dm-", 3) != 0)
return (0);
/* Skip devices without schedulers (loop, ram, dm, etc) */
if (dr->dr_bio_count == i) {
vdev_disk_dio_free(dr);
bio_count *= 2;
- printk("WARNING: Resized bio's/dio to %d\n",bio_count);
goto retry;
}