diff options
author | Anand Jain <anand.jain@oracle.com> | 2023-09-08 19:31:55 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-10-12 17:44:07 +0300 |
commit | bc27d6f0aa0e4de184b617aceeaf25818cc646de (patch) | |
tree | e68b223e6765903f8176fc931b754edc4597b31e /fs/btrfs/file.c | |
parent | ed164802e89589db64ef8829813a5ae92153722c (diff) | |
download | linux-bc27d6f0aa0e4de184b617aceeaf25818cc646de.tar.xz |
btrfs: scan but don't register device on single device filesystem
After the commit 5f58d783fd78 ("btrfs: free device in btrfs_close_devices
for a single device filesystem") we unregister the device from the kernel
memory upon unmounting for a single device.
So, device registration that was performed before mounting if any is no
longer in the kernel memory.
However, in fact, note that device registration is unnecessary for a
single-device btrfs filesystem unless it's a seed device.
So for commands like 'btrfs device scan' or 'btrfs device ready' with a
non-seed single-device btrfs filesystem, they can return success just
after superblock verification and without the actual device scan. When
'device scan --forget' is called on such device no error is returned.
The seed device must remain in the kernel memory to allow the sprout
device to mount without the need to specify the seed device explicitly.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
0 files changed, 0 insertions, 0 deletions