]> 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)
commit5a6dd4fce1dbfe447bda8ed7cf4edb400331bb9a
treee0031a23f284d13b6adc3d14f299b2c9aa9f191f
parentd4411da61db8a267585f664702526c9dad1efc08
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