1 #ifndef CEPH_CLIENT_FH_H
2 #define CEPH_CLIENT_FH_H
4 #include "common/Readahead.h"
5 #include "include/types.h"
10 class ceph_lock_state_t;
13 // file handle for any open file state
19 int mds; // have to talk to mds we opened with (for now)
20 int mode; // the mode i opened the file with
23 bool pos_locked; // pos is currently in use
24 list<Cond*> pos_waiters; // waiters for pos
26 UserPerm actor_perms; // perms I opened the file with
31 ceph_lock_state_t *fcntl_locks;
32 ceph_lock_state_t *flock_locks;
34 // IO error encountered by any writeback on this Inode while
35 // this Fh existed (i.e. an fsync on another Fh will still show
36 // up as an async_err here because it could have been the same
37 // bytes we wrote via this Fh).
49 void get() { ++_ref; }
50 int put() { return --_ref; }