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
std::unique_ptr<ceph_lock_state_t> fcntl_locks;
std::unique_ptr<ceph_lock_state_t> 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
}
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; }