]>
git.proxmox.com Git - ceph.git/blob - ceph/src/client/Fh.h
1 #ifndef CEPH_CLIENT_FH_H
2 #define CEPH_CLIENT_FH_H
4 #include "common/Readahead.h"
5 #include "include/types.h"
12 // file handle for any open file state
18 int mds
; // have to talk to mds we opened with (for now)
19 int mode
; // the mode i opened the file with
22 bool pos_locked
; // pos is currently in use
23 std::list
<ceph::condition_variable
*> pos_waiters
; // waiters for pos
25 UserPerm actor_perms
; // perms I opened the file with
30 std::unique_ptr
<ceph_lock_state_t
> fcntl_locks
;
31 std::unique_ptr
<ceph_lock_state_t
> flock_locks
;
33 // IO error encountered by any writeback on this Inode while
34 // this Fh existed (i.e. an fsync on another Fh will still show
35 // up as an async_err here because it could have been the same
36 // bytes we wrote via this Fh).
47 Fh(InodeRef in
, int flags
, int cmode
, const UserPerm
&perms
);
50 void get() { ++_ref
; }
51 int put() { return --_ref
; }