Fix using zvol as slog device
authorJorgen Lundman <lundman@lundman.net>
Mon, 17 Dec 2012 01:33:57 +0000 (10:33 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 18 Dec 2012 19:02:28 +0000 (11:02 -0800)
commit6c2856726fbae681649930d9620d9087080e58fc
tree8221f09d650f39d29569c82c8d50fb19bdea370f
parent5e6320cd1262de6eada39751807c31c059517d01
Fix using zvol as slog device

During the original ZoL port the vdev_uses_zvols() function was
disabled until it could be properly implemented.  This prevented
a zpool from use a zvol for its slog device.

This patch implements that missing functionality by adding a
zvol_is_zvol() function to zvol.c.  Given the full path to a
device it will lookup the device and verify its major number
against the registered zvol major number for the system.  If
they match we know the device is a zvol.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1131
include/sys/vdev.h
include/sys/zvol.h
module/zfs/vdev.c
module/zfs/zvol.c