summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-03-10 13:34:17 -0800
committerBrian Behlendorf <[email protected]>2011-03-10 13:34:17 -0800
commit04516a45b27144cf42bec005ef2de6d505d236a5 (patch)
tree230d0b4e097ca024bafeb6e659b401dd47e5d9ef /module/zfs
parenta6cba65ccae5a5458f9ab4ac11020716d30ea7f7 (diff)
Don't set I/O Scheduler for Partitions
ZFS should only change the i/o scheduler for a disk when it has ownership of the whole disk. This is basically the same logic as adjusting the write cache behavior on a disk. This change updates the vdev disk code to skip partitions when setting the i/o scheduler. Closes #152
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/vdev_disk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
index 69bc53b4b..ec627a9c4 100644
--- a/module/zfs/vdev_disk.c
+++ b/module/zfs/vdev_disk.c
@@ -131,6 +131,10 @@ vdev_elevator_switch(vdev_t *v, char *elevator)
char *envp[] = { NULL };
int count = 0, error;
+ /* Skip devices which are not whole disks (partitions) */
+ if (!v->vdev_wholedisk)
+ return (0);
+
/* Skip devices without schedulers (loop, ram, dm, etc) */
if (!q->elevator || !blk_queue_stackable(q))
return (0);