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>
This commit is contained in:

committed by
Ilya Dryomov

parent
40dcf75e82
commit
a25949b990
@@ -663,6 +663,12 @@ int ceph_flags_to_mode(int flags);
|
||||
#define CEPH_CAP_LOCKS (CEPH_LOCK_IFILE | CEPH_LOCK_IAUTH | CEPH_LOCK_ILINK | \
|
||||
CEPH_LOCK_IXATTR)
|
||||
|
||||
/* cap masks async dir operations */
|
||||
#define CEPH_CAP_DIR_CREATE CEPH_CAP_FILE_CACHE
|
||||
#define CEPH_CAP_DIR_UNLINK CEPH_CAP_FILE_RD
|
||||
#define CEPH_CAP_ANY_DIR_OPS (CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_RD | \
|
||||
CEPH_CAP_FILE_WREXTEND | CEPH_CAP_FILE_LAZYIO)
|
||||
|
||||
int ceph_caps_for_mode(int mode);
|
||||
|
||||
enum {
|
||||
|
Reference in New Issue
Block a user