Whamcloud - gitweb
merge b_md onto HEAD. as best as I can remember:
[fs/lustre-release.git] / lustre / lib / mds_updates.c
index f69f331..8da9f39 100644 (file)
@@ -106,10 +106,14 @@ void mds_getattr_pack(struct ptlrpc_request *req, int offset,
                       struct inode *inode,
                       const char *name, int namelen)
 {
-        struct mds_body *rec;
-        rec = lustre_msg_buf(req->rq_reqmsg, offset);
+        struct mds_body *b;
+        b = lustre_msg_buf(req->rq_reqmsg, offset);
+
+        b->fsuid = HTON__u32(current->fsuid);
+        b->fsgid = HTON__u32(current->fsgid);
+        b->capability = HTON__u32(current->cap_effective);
 
-        ll_inode2fid(&rec->fid1, inode);
+        ll_inode2fid(&b->fid1, inode);
         if (name) {
                 char *tmp;
                 tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1);
@@ -117,6 +121,20 @@ void mds_getattr_pack(struct ptlrpc_request *req, int offset,
         }
 }
 
+void mds_readdir_pack(struct ptlrpc_request *req, int offset,
+                      obd_id ino, int type)
+{
+        struct mds_body *b;
+
+        b = lustre_msg_buf(req->rq_reqmsg, offset);
+        b->fsuid = HTON__u32(current->fsuid);
+        b->fsgid = HTON__u32(current->fsgid);
+        b->capability = HTON__u32(current->cap_effective);
+        b->fid1.id = HTON__u64(ino);
+        b->fid1.f_type = HTON__u32(type);
+        b->size = HTON__u64(offset);
+}
+
 
 void mds_pack_req_body(struct ptlrpc_request *req)
 {