diff options
author | Jeff Layton <jlayton@kernel.org> | 2020-02-18 14:12:45 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-03-30 12:42:41 +0200 |
commit | a25949b99003b7e6c2604a3fc8b8d62385508477 (patch) | |
tree | 048d1659867836f385f2df12ee1cb57ca6819f9e /fs/ceph/mds_client.h | |
parent | 40dcf75e82f875fd95abb99d08ef3eeb025e16a9 (diff) | |
download | lwn-a25949b99003b7e6c2604a3fc8b8d62385508477.tar.gz lwn-a25949b99003b7e6c2604a3fc8b8d62385508477.zip |
ceph: cap tracking for async directory operations
Track and correctly handle directory caps for asynchronous operations.
Add aliases for Frc caps that we now designate at Dcu caps (when dealing
with directories).
Unlike file caps, we don't reclaim these when the session goes away, and
instead preemptively release them. In-flight async dirops are instead
handled during reconnect phase. The client needs to re-do a synchronous
operation in order to re-get directory caps.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 8043f2b439b1..f10d342ea585 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -284,8 +284,11 @@ struct ceph_mds_request { struct ceph_msg *r_request; /* original request */ struct ceph_msg *r_reply; struct ceph_mds_reply_info_parsed r_reply_info; - struct page *r_locked_page; int r_err; + + + struct page *r_locked_page; + int r_dir_caps; int r_num_caps; u32 r_readdir_offset; @@ -489,6 +492,7 @@ extern int ceph_mdsc_submit_request(struct ceph_mds_client *mdsc, extern int ceph_mdsc_do_request(struct ceph_mds_client *mdsc, struct inode *dir, struct ceph_mds_request *req); +extern void ceph_mdsc_release_dir_caps(struct ceph_mds_request *req); static inline void ceph_mdsc_get_request(struct ceph_mds_request *req) { kref_get(&req->r_kref); |