Nice patch. However its better if we do this in the btrfs kernel
function btrfs_scan_one_device(). Since the non-canonicalize path
can still sneak through the btrfs specific mount option "device=".
Any comments ?
My initial reaction is to avoid playing naming names within the
kernel. But since it's device mapper-specific, it might not be too
messy to do that. In addition to the patch to the progs, we're also
carrying a patch to systemd since it has it's own little ioctl wrapper
to do the scanning. It needed to be fixed there as well.
looks like we need to fix systemd as well. As I check systemd is using
READY ioctl.
systemd is using device ready ioctl's bug as a feature (if the
comment in systemd is true, as below).
./systemd/rules/64-btrfs.rules
----
# let the kernel know about this btrfs filesystem, and check if it is
complete
IMPORT{builtin}="btrfs ready $devnode"
----
btrfs dev ready is only to check if the device is ready,
not to let the kernel know about it. the bug part in the
ioctl is it would update the device path, even when the
device is mounted.
Either we need transition the bug as a feature OR fix the bug.
-Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html