]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: Don't use global snaprealm seq for subvolumes
authorKotresh HR <khiremat@redhat.com>
Fri, 4 Apr 2025 13:23:14 +0000 (18:53 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 9 May 2025 09:12:11 +0000 (14:42 +0530)
commit1cebd41369b71fef9e8727aa55c9670e828330aa
treeb89a38ca4b7e86f568c077571da2d31be79d07b6
parentd6254a3c64b07cbc4d575a84b84228e1ec248ae0
mds: Don't use global snaprealm seq for subvolumes

Don't use global snaprealm seq number while doing cow
on old inodes for subvolume inode and inodes under it
i.e., for directories marked with 'ceph.dir.subvolume'
vxattr. This is safe because all the hardlink/renames
are contained within the same subvolume snaprealm and
doesn't cross the subvolume snaprealms

For the directories between / and subvolume snapshot
directory, use the global snaprealm seq to cow the
old inodes only if there is atleast one snapshot taken.

The above behavior is made optional with the mds config
'mds_use_global_snaprealm_seq_for_subvol'. The option
is enabled by default which means the above behaviour
is disabled by default. The option is suggested to be
disabled only on cephfs volumes used for pure subvolume
usecase.

Fixes: https://tracker.ceph.com/issues/70794
Signed-off-by: Kotresh HR <khiremat@redhat.com>
src/common/options/mds.yaml.in
src/mds/CInode.cc
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDSRank.cc