Skip to content

ceph: fix spurious recover_session=clean errors

Jeff Layton ceph-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 2 repliesIn review
  2. v35 patches 0 repliesSuperseded
  3. v2 RFC4 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC4 patches13 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ceph: don't WARN when removing caps due to blocklistingfs/ceph/caps.c+1 -10 replies
2/5ceph: make fsc->mount_state an intfs/ceph/super.h+1 -10 replies
3/5ceph: add new RECOVER mount_state when recovering sessionfs/ceph/addr.c fs/ceph/caps.c fs/ceph/inode.c +3 more+17 -100 replies
4/5ceph: remove timeout on allowing reconnect after blocklistingfs/ceph/mds_client.c fs/ceph/super.h+0 -60 replies
5/5ceph: queue MDS requests to REJECTED sessions when CLEANRECOVER is setfs/ceph/mds_client.c+14 -40 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchXiubo LiYan, Zheng
SeriesR-b R-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] ceph: fix spurious recover_session=clean errors

v4: test for CEPH_MOUNT_RECOVER in more places
v3: add RECOVER mount_state and allow dumping pagecache when it's set
shrink size of mount_state field
v2: fix handling of async requests in patch to queue requests

This is the fourth revision of this patchset. The main difference from v3 is that this one converts more "==" tests for SHUTDOWN state into ">=", so that the RECOVER state is treated the same way.

Original cover letter:

Ilya noticed that he would get spurious EACCES errors on calls done just after blocklisting the client on mounts with recover_session=clean. The session would get marked as REJECTED and that caused in-flight calls to die with EACCES. This patchset seems to smooth over the problem, but I'm not fully convinced it's the right approach.

The potential issue I see is that the client could take cap references to do a call on a session that has been blocklisted. We then queue the message and reestablish the session, but we may not have been granted the same caps by the MDS at that point.

If this is a problem, then we probably need to rework it so that we return a distinct error code in this situation and have the upper layers issue a completely new mds request (with new cap refs, etc.)

Obviously, that's a much more invasive approach though, so it would be nice to avoid that if this would suffice.

Jeff Layton (5):
ceph: don't WARN when removing caps due to blocklisting
ceph: make fsc->mount_state an int
ceph: add new RECOVER mount_state when recovering session
ceph: remove timeout on allowing reconnect after blocklisting
ceph: queue MDS requests to REJECTED sessions when CLEANRECOVER is set

 fs/ceph/addr.c               |  4 ++--
 fs/ceph/caps.c               |  4 ++--
 fs/ceph/inode.c              |  2 +-
 fs/ceph/mds_client.c         | 27 ++++++++++++++++-----------
 fs/ceph/super.c              | 14 ++++++++++----
 fs/ceph/super.h              |  3 +--
 include/linux/ceph/libceph.h |  1 +
 7 files changed, 33 insertions(+), 22 deletions(-)
Signature · 1 line
2.26.2