• Josef Bacik's avatar
    Btrfs: implement ->show_devname · 9c5085c1
    Josef Bacik authored
    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: default avatarMiao Xie <miaox@cn.fujitsu.com>
    Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
    9c5085c1
super.c 42.2 KB