diff options
author | Jeff Layton <jlayton@kernel.org> | 2020-09-25 13:55:39 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-12-14 23:21:46 +0100 |
commit | 50c9132ddfb2024e96900407beeec660cf9848bd (patch) | |
tree | 56e236b210e2fc21afda85ce2535239b7624b8e9 /fs/ceph/caps.c | |
parent | ceph: make fsc->mount_state an int (diff) | |
download | linux-50c9132ddfb2024e96900407beeec660cf9848bd.tar.xz linux-50c9132ddfb2024e96900407beeec660cf9848bd.zip |
ceph: add new RECOVER mount_state when recovering session
When recovering a session (a'la recover_session=clean), we want to do
all of the operations that we do on a forced umount, but changing the
mount state to SHUTDOWN is can cause queued MDS requests to fail when
the session comes back. Most of those can idle until the session is
recovered in this situation.
Reserve SHUTDOWN state for forced umount, and make a new RECOVER state
for the forced reconnect situation. Change several tests for equality with
SHUTDOWN to test for that or RECOVER.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 8552d1082b0e..c74d8182fb48 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2747,7 +2747,7 @@ again: goto out_unlock; } - if (READ_ONCE(mdsc->fsc->mount_state) == CEPH_MOUNT_SHUTDOWN) { + if (READ_ONCE(mdsc->fsc->mount_state) >= CEPH_MOUNT_SHUTDOWN) { dout("get_cap_refs %p forced umount\n", inode); ret = -EIO; goto out_unlock; |