]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/client/MetaRequest.h
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / client / MetaRequest.h
index a1c9f94598bd96f6734f80e077e4809cc54a93d0..49ee6dc6e527b68bfd2f74dd6c7279a1a437a41b 100644 (file)
@@ -80,6 +80,8 @@ public:
     unsafe_target_item(this) {
     memset(&head, 0, sizeof(head));
     head.op = op;
+    head.owner_uid = -1;
+    head.owner_gid = -1;
   }
   ~MetaRequest();
 
@@ -153,6 +155,13 @@ public:
     return v == 0;
   }
 
+  void set_inode_owner_uid_gid(unsigned u, unsigned g) {
+    /* it makes sense to set owner_{u,g}id only for OPs which create inodes */
+    ceph_assert(IS_CEPH_MDS_OP_NEWINODE(head.op));
+    head.owner_uid = u;
+    head.owner_gid = g;
+  }
+
   // normal fields
   void set_tid(ceph_tid_t t) { tid = t; }
   void set_oldest_client_tid(ceph_tid_t t) { head.oldest_client_tid = t; }