#include "include/types.h"
#include "InodeRef.h"
#include "UserPerm.h"
+#include "mds/flock.h"
class Cond;
-class ceph_lock_state_t;
class Inode;
// file handle for any open file state
Readahead readahead;
// file lock
- ceph_lock_state_t *fcntl_locks;
- ceph_lock_state_t *flock_locks;
+ std::unique_ptr<ceph_lock_state_t> fcntl_locks;
+ std::unique_ptr<ceph_lock_state_t> flock_locks;
// IO error encountered by any writeback on this Inode while
// this Fh existed (i.e. an fsync on another Fh will still show
async_err = 0;
return e;
}
-
- Fh(Inode *in);
+
+ Fh() = delete;
+ Fh(InodeRef in, int flags, int cmode, const UserPerm &perms);
~Fh();
+
void get() { ++_ref; }
int put() { return --_ref; }
};