X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fclient%2FFh.h;h=c3355ba6c52660930227e6e1b5a5c7a02a7a0d88;hb=f6b5b4d738b87d88d2de35127b6b0e41eae2a272;hp=eae96037e74325d5af7db2f5d6f5ca79de4e8891;hpb=12732ca2e80d168d344a265acffc1fbd1fa1f1b5;p=ceph.git diff --git a/ceph/src/client/Fh.h b/ceph/src/client/Fh.h index eae96037e..c3355ba6c 100644 --- a/ceph/src/client/Fh.h +++ b/ceph/src/client/Fh.h @@ -17,6 +17,7 @@ struct Fh { loff_t pos; int mds; // have to talk to mds we opened with (for now) int mode; // the mode i opened the file with + uint64_t gen; int flags; bool pos_locked; // pos is currently in use @@ -30,6 +31,12 @@ struct Fh { std::unique_ptr fcntl_locks; std::unique_ptr flock_locks; + bool has_any_filelocks() { + return + (fcntl_locks && !fcntl_locks->empty()) || + (flock_locks && !flock_locks->empty()); + } + // IO error encountered by any writeback on this Inode while // this Fh existed (i.e. an fsync on another Fh will still show // up as an async_err here because it could have been the same @@ -44,7 +51,7 @@ struct Fh { } Fh() = delete; - Fh(InodeRef in, int flags, int cmode, const UserPerm &perms); + Fh(InodeRef in, int flags, int cmode, uint64_t gen, const UserPerm &perms); ~Fh(); void get() { ++_ref; }