summaryrefslogtreecommitdiff
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2019-07-25 20:16:42 +0800
committerIlya Dryomov <idryomov@gmail.com>2019-09-16 12:06:23 +0200
commitf4b97866223b8dddd1bcb9d2a9546c5a5e430249 (patch)
treec9d4d9feede3bb044cd7131e202602b446c43147 /fs/ceph/inode.c
parent7e6906c1e670f0b40554f42ba74cc043d094877c (diff)
downloadlwn-f4b97866223b8dddd1bcb9d2a9546c5a5e430249.tar.gz
lwn-f4b97866223b8dddd1bcb9d2a9546c5a5e430249.zip
ceph: track and report error of async metadata operation
Use errseq_t to track and report errors of async metadata operations, similar to how kernel handles errors during writeback. If any dirty caps or any unsafe request gets dropped during session eviction, record -EIO in corresponding inode's i_meta_err. The error will be reported by subsequent fsync, Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 3b537e7038c7..332433b490f5 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -515,6 +515,8 @@ struct inode *ceph_alloc_inode(struct super_block *sb)
ceph_fscache_inode_init(ci);
+ ci->i_meta_err = 0;
+
return &ci->vfs_inode;
}