diff options
author | Xiubo Li <xiubli@redhat.com> | 2023-02-01 02:36:45 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2023-02-02 13:58:15 +0100 |
commit | a68e564adcaa69b0930809fb64d9d5f7d9c32ba9 (patch) | |
tree | 061fa00fa614c4a83aec06c620905dfe2a0eff5e /fs/ceph/file.c | |
parent | ceph: move mount state enum to super.h (diff) | |
download | linux-a68e564adcaa69b0930809fb64d9d5f7d9c32ba9.tar.xz linux-a68e564adcaa69b0930809fb64d9d5f7d9c32ba9.zip |
ceph: blocklist the kclient when receiving corrupted snap trace
When received corrupted snap trace we don't know what exactly has
happened in MDS side. And we shouldn't continue IOs and metadatas
access to MDS, which may corrupt or get incorrect contents.
This patch will just block all the further IO/MDS requests
immediately and then evict the kclient itself.
The reason why we still need to evict the kclient just after
blocking all the further IOs is that the MDS could revoke the caps
faster.
Link: https://tracker.ceph.com/issues/57686
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r-- | fs/ceph/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 764598e1efd9..b5cff85925a1 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -2011,6 +2011,9 @@ static int ceph_zero_partial_object(struct inode *inode, loff_t zero = 0; int op; + if (ceph_inode_is_shutdown(inode)) + return -EIO; + if (!length) { op = offset ? CEPH_OSD_OP_DELETE : CEPH_OSD_OP_TRUNCATE; length = &zero; |