]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: update older versioned sr_t struct(s) to incorporate snapshot visibility flag
authorDhairya Parmar <dparmar@redhat.com>
Wed, 15 Oct 2025 11:43:27 +0000 (17:13 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Mon, 1 Dec 2025 18:25:21 +0000 (23:55 +0530)
commitf40f4cee9402be97426a2edcc37880b8b9bc0201
treeb78db4c4cdc4f7ba06e427ecfb38f36abc49dc9d
parent7e15bef24039ae1f6d916958ad517a3589d2303e
mds: update older versioned sr_t struct(s) to incorporate snapshot visibility flag

- If there is cluster upgrade, the older sr_t structs' flags would not have the
SNAPSHOT_VISIBILITY flag bit set which means the existing subvolumes would
report 0 instead of 1 for the vxattr ceph.dir.subvolume.snaps.visible which
although doesn't lead to any actual denial of access to subvolume snapshots
since the client config to respect snapshot visibility is set to false as
default but might come as a surprise to any cluster operator if the client
config is toggled to true to see the snapshot visibility being denied(since the
`flags` is reporting to be 0). So, change the in-memory flags while decoding
the sr_t members.
- bump up struct_v to 8 while encoding and while decoding, for all the structs older
than 8 be assigned SNAPSHOT_VISIBILITY flag in-memory accordingly.

Fixes: https://tracker.ceph.com/issues/73550
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
src/mds/snap.cc