summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-10-07 14:19:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-27 09:54:27 +0200
commitbce53fbee94830abf78809b3409ec3a52dd99f3e (patch)
tree5b4eb96fba2584a6ca22f96f0f8efef4d31202f1 /fs/ceph/super.h
parent151c72bba1297d3ca1e56203ea008b7edfc6a70d (diff)
downloadlinux-stable-bce53fbee94830abf78809b3409ec3a52dd99f3e.tar.gz
linux-stable-bce53fbee94830abf78809b3409ec3a52dd99f3e.tar.bz2
linux-stable-bce53fbee94830abf78809b3409ec3a52dd99f3e.zip
ceph: fix handling of "meta" errors
commit 1bd85aa65d0e7b5e4d09240f492f37c569fdd431 upstream. Currently, we check the wb_err too early for directories, before all of the unsafe child requests have been waited on. In order to fix that we need to check the mapping->wb_err later nearer to the end of ceph_fsync. We also have an overly-complex method for tracking errors after blocklisting. The errors recorded in cleanup_session_requests go to a completely separate field in the inode, but we end up reporting them the same way we would for any other error (in fsync). There's no real benefit to tracking these errors in two different places, since the only reporting mechanism for them is in fsync, and we'd need to advance them both every time. Given that, we can just remove i_meta_err, and convert the places that used it to instead just use mapping->wb_err instead. That also fixes the original problem by ensuring that we do a check_and_advance of the wb_err at the end of the fsync op. Cc: stable@vger.kernel.org URL: https://tracker.ceph.com/issues/52864 Reported-by: Patrick Donnelly <pdonnell@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 8ffc8e88dd3d..6db7b3387e1c 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -402,8 +402,6 @@ struct ceph_inode_info {
struct fscache_cookie *fscache;
u32 i_fscache_gen;
#endif
- errseq_t i_meta_err;
-
struct inode vfs_inode; /* at end */
};
@@ -712,7 +710,6 @@ struct ceph_file_info {
spinlock_t rw_contexts_lock;
struct list_head rw_contexts;
- errseq_t meta_err;
u32 filp_gen;
atomic_t num_locks;
};