]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/client/Fh.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / client / Fh.h
index 33733a5e1c16c1e7d8a81f1d06eeda99e91dd2c4..6bc4d1a38fcb0fa750fb0fd8f92aa9a92a89b0f4 100644 (file)
@@ -5,9 +5,9 @@
 #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
@@ -28,8 +28,8 @@ struct Fh {
   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
@@ -43,9 +43,11 @@ struct Fh {
       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; }
 };