Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git] / lustre / obdfilter / filter_lvb.c
index acfba4c..f86d1bf 100644 (file)
@@ -71,13 +71,15 @@ static int filter_lvbo_init(struct ldlm_resource *res)
                 GOTO(out, rc = -ENOMEM);
 
         oa->o_id = res->lr_name.name[0];
-        oa->o_gr = 0;
+        oa->o_gr = res->lr_name.name[2];
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
+
         dentry = filter_oa2dentry(obd, oa);
         if (IS_ERR(dentry))
                 GOTO(out, rc = PTR_ERR(dentry));
 
         /* Limit the valid bits in the return data to what we actually use */
-        oa->o_valid = OBD_MD_FLID;
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
         obdo_from_inode(oa, dentry->d_inode, FILTER_VALID_FLAGS);
         f_dput(dentry);
 
@@ -163,25 +165,26 @@ static int filter_lvbo_update(struct ldlm_resource *res, struct lustre_msg *m,
                 GOTO(out, rc = -ENOMEM);
 
         oa->o_id = res->lr_name.name[0];
-        oa->o_gr = 0;
+        oa->o_gr = res->lr_name.name[2];
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
         dentry = filter_oa2dentry(obd, oa);
         if (IS_ERR(dentry))
                 GOTO(out, rc = PTR_ERR(dentry));
 
         /* Limit the valid bits in the return data to what we actually use */
-        oa->o_valid = OBD_MD_FLID;
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP;
         obdo_from_inode(oa, dentry->d_inode, FILTER_VALID_FLAGS);
 
         if (dentry->d_inode->i_size > lvb->lvb_size || !increase) {
                 CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb size from disk: "
-                       LPU64" -> "LPU64"\n", res->lr_name.name[0],
+                       LPU64" -> %llu\n", res->lr_name.name[0],
                        lvb->lvb_size, dentry->d_inode->i_size);
                 lvb->lvb_size = dentry->d_inode->i_size;
         }
-        if (dentry->d_inode->i_mtime > lvb->lvb_mtime || !increase) {
+        if (LTIME_S(dentry->d_inode->i_mtime) > lvb->lvb_mtime || !increase) {
                 CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb mtime from disk: "
-                       LPU64" -> "LPU64"\n", res->lr_name.name[0],
-                       lvb->lvb_mtime,(__u64)LTIME_S(dentry->d_inode->i_mtime));
+                       LPU64" -> %lu\n", res->lr_name.name[0],
+                       lvb->lvb_mtime, LTIME_S(dentry->d_inode->i_mtime));
                 lvb->lvb_mtime = LTIME_S(dentry->d_inode->i_mtime);
         }
         f_dput(dentry);