diff options
| author | Anand Jain <asj@kernel.org> | 2026-04-27 18:18:04 +0800 |
|---|---|---|
| committer | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-06-09 18:22:45 +0200 |
| commit | c2a74ed0494c2736486b49c52767b2f50b83425f (patch) | |
| tree | bd723c78015c8b1ff5084cb1c3571e8819bdea60 /include/linux/timerqueue.h | |
| parent | df84f6c773771fa7b78fe06931709df1aca5907f (diff) | |
btrfs: derive f_fsid from on-disk fsid and dev_t
The f_fsid was originally derived from fs_devices->fsid and the
subvolume root ID. However, when temp_fsid is active, fs_devices->fsid
is randomized, making the standard derivation inconsistent.
Since metadata_uuid is optional, it is not a reliable alternative. This
patch instead retrieves the on-disk UUID from fs_info->super_copy->fsid.
To prevent f_fsid collisions between original and cloned filesystems,
this implementation hashes the dev_t for single-device btrfs filesystems
to ensure uniqueness. This is limited to single-device filesystems as
cloned mounts are currently only supported for that configuration. Note
that f_fsid will change if the device is replaced.
Additionally, since the kernel cannot distinguish between the original
and the cloned filesystem, this new f_fsid derivation is applied to
both.
Link: https://lore.kernel.org/linux-btrfs/cover.1772095546.git.asj@kernel.org/
Link: https://lore.kernel.org/linux-btrfs/cover.1774092915.git.asj@kernel.org/
Signed-off-by: Anand Jain <asj@kernel.org>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
