summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-09-11 04:58:55 +0200
committerIlya Dryomov <idryomov@gmail.com>2017-11-13 12:11:28 +0100
commitb3f8d68f38a879daed1eab66c0e19bc293096d34 (patch)
tree023cb0543b51e96e9ef9bcef6ee99837a4a967d6 /fs/ceph/super.h
parentceph: optimize flock encoding during reconnect (diff)
downloadlinux-b3f8d68f38a879daed1eab66c0e19bc293096d34.tar.xz
linux-b3f8d68f38a879daed1eab66c0e19bc293096d34.zip
ceph: handle 'session get evicted while there are file locks'
When session get evicted, all file locks associated with the session get released remotely by mds. File locks tracked by kernel become stale. In this situation, set an error flag on inode. The flag makes further file locks return -EIO. Another option to handle this situation is cleanup file locks tracked kernel. I do not choose it because it is inconvenient to notify user program about the error. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to '')
-rw-r--r--fs/ceph/super.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 0b2c801f4bbb..2beeec07fa76 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -488,6 +488,8 @@ static inline struct inode *ceph_find_inode(struct super_block *sb,
#define CEPH_I_KICK_FLUSH (1 << 9) /* kick flushing caps */
#define CEPH_I_FLUSH_SNAPS (1 << 10) /* need flush snapss */
#define CEPH_I_ERROR_WRITE (1 << 11) /* have seen write errors */
+#define CEPH_I_ERROR_FILELOCK (1 << 12) /* have seen file lock errors */
+
/*
* We set the ERROR_WRITE bit when we start seeing write errors on an inode