mbox series

[0/6] ceph: better error handling for failed async creates

Message ID 20210908130336.56668-1-jlayton@kernel.org
Headers show
Series ceph: better error handling for failed async creates | expand

Message

Jeff Layton Sept. 8, 2021, 1:03 p.m. UTC
We've had an ongoing problem with hung umounts in teuthology, the start
of which seems to coincide with us starting to test "-o nowsync" more
regularly. Recently, we were able to get better debug output, and saw
that in at least one case, the issue was that the MDS started returning
-ENOSPC on an async create attempt, which left the client trying to
flush caps for an inode that never existed.

This patchset adds a new mechanism for "shutting down" inodes after the
fact. If an async create fails, we already d_drop the dentry associated
with it. This situation in this case is somewhat similar to the case
where we have dirty inodes at forced umount time, so the idea is to
extend the infrastructure that handles that case to also handle inodes
that failed create too.

There are also some cleanup/bugfix patches in here. This was tested
using a fault injection patch on the MDS that makes it start rejecting
openc calls with -ENOSPC.

Jeff Layton (6):
  ceph: print inode numbers instead of pointer values
  ceph: don't use -ESTALE as special return code in try_get_cap_refs
  ceph: drop private list from remove_session_caps_cb
  ceph: fix auth cap handling logic in remove_session_caps_cb
  ceph: refactor remove_session_caps_cb
  ceph: shut down access to inode when async create fails

 fs/ceph/addr.c       |  16 +++--
 fs/ceph/caps.c       | 150 ++++++++++++++++++++++++++++++++++++++-----
 fs/ceph/export.c     |  12 +++-
 fs/ceph/file.c       |  12 +++-
 fs/ceph/inode.c      |  39 +++++++++--
 fs/ceph/locks.c      |   6 ++
 fs/ceph/mds_client.c | 112 +-------------------------------
 fs/ceph/super.h      |  12 ++++
 8 files changed, 220 insertions(+), 139 deletions(-)