]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: avoid journaling overhead for ceph.dir.subvolume for no-op case 41996/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 18 Jun 2021 16:27:54 +0000 (09:27 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 23 Jun 2021 20:56:02 +0000 (13:56 -0700)
commitc55a5ceb197cfb8f8bd9528d493420ab654f0803
tree0192694b9921f552b4dc77485a1a1a8b8ebc0121
parent6a44559ddda213f435852c4ed0d7bbf6be30d007
mds: avoid journaling overhead for ceph.dir.subvolume for no-op case

In preparation for acquiring the xlock on the directory inode, the MDS
must journal a few events before continuing on with the setvxattr. This
can cause significant delays in the volumes ceph-mgr module which needs
to regularly enable this vxattr from multiple code paths. We could cache
in that module whether the vxattr is set but it's also pretty easy to
adjust the MDS to acquire a rdlock on the directory to check if the
subvolume flag is already set. That is much lighter weight and the lock
is generally readily available.

Fixes: https://tracker.ceph.com/issues/51276
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit b5f736eee408c220ffdfb67b10667a7b553dac25)
src/mds/Mutation.h
src/mds/Server.cc