]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: avoid journaling overhead for ceph.dir.subvolume for no-op case 41935/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 02:20:38 +0000 (19:20 -0700)
commitb5f736eee408c220ffdfb67b10667a7b553dac25
tree0bf146a3f1143f2bb89d91dbab2bbdb66b49cc8b
parent9f1d44127f525e0e5d1bb6540811817012f04a67
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>
src/mds/Mutation.h
src/mds/Server.cc