mbox series

[0/3] ceph: don't call ceph_check_caps in page_mkwrite

Message ID 20201211123858.7522-1-jlayton@kernel.org (mailing list archive)
Headers show
Series ceph: don't call ceph_check_caps in page_mkwrite | expand

Message

Jeffrey Layton Dec. 11, 2020, 12:38 p.m. UTC
I've been working on the fscache rework, and have hit some rather
complex lockdep circular locking warnings. Most of them involve two
filesystems (cephfs and the local cachefiles fs), so it's not clear
to me whether they are false positives.

They do involve the mmap_lock though, which is taken up in the vfs. I
think it would probably be best to not do the ceph_check_caps call with
that lock held if we can avoid it.

The first patch in this series fixes what looks like a probable bug to
me. If we want to avoid checking caps in some cases, then we probably
also want to avoid flushing the snaps too since that involves the same
locks.

The second patch replaces the patch that I sent a few weeks ago to add
a queue_inode_work helper.

The last patch extends some work that Xiubo did earlier to allow skipping
the caps check after putting references. It adds a new "flavor" when
putting caps that instead has the inode work do the check or flush after
the refcounts have been decremented.

Jeff Layton (3):
  ceph: fix flush_snap logic after putting caps
  ceph: clean up inode work queueing
  ceph: allow queueing cap/snap handling after putting cap references

 fs/ceph/addr.c  |  2 +-
 fs/ceph/caps.c  | 36 +++++++++++++++++++++++------
 fs/ceph/inode.c | 61 ++++++++++---------------------------------------
 fs/ceph/super.h | 40 +++++++++++++++++++++++++++-----
 4 files changed, 76 insertions(+), 63 deletions(-)