]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: implement ->show_devname
authorJosef Bacik <josef@redhat.com>
Tue, 5 Jun 2012 18:13:12 +0000 (14:13 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 15 Jun 2012 01:30:37 +0000 (21:30 -0400)
commitf6cde4300221099fa9c212f5ac05e35877becddc
treee0031a23f284d13b6adc3d14f299b2c9aa9f191f
parent7ff0e384f519ff60bb66d3e7ee6e08e0420d6d2a
Btrfs: implement ->show_devname

Because btrfs can remove the device that was mounted we need to have a
->show_devname so that in this case we can print out some other device in
the file system to /proc/mount.  So if there are multiple devices in a btrfs
file system we will just print the device with the lowest devid that we can
find.  This will make everything consistent and deal with device removal
properly.  The drawback is if you mount with a device that is higher than
the lowest devicd it won't show up as the mounted device in /proc/mounts,
but this is a small price to pay. This was inspired by Miao Xie's patch.
Thanks,

Reviewed-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/super.c