Whamcloud - gitweb
b=3920
[fs/lustre-release.git] / lustre / mds / mds_unlink_open.c
index b0cc7ec..c11328c 100644 (file)
@@ -138,8 +138,9 @@ static int mds_osc_destroy_orphan(struct mds_obd *mds,
         if (oa == NULL)
                 GOTO(out_free_memmd, rc = -ENOMEM);
         oa->o_id = lsm->lsm_object_id;
+        oa->o_gr = FILTER_GROUP_FIRST_MDS + mds->mds_num;
         oa->o_mode = inode->i_mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE;
+        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP;
 
         if (log_unlink && logcookies) {
                 oa->o_valid |= OBD_MD_FLCOOKIE;
@@ -149,7 +150,7 @@ static int mds_osc_destroy_orphan(struct mds_obd *mds,
         rc = obd_destroy(mds->mds_osc_exp, oa, lsm, &oti);
         obdo_free(oa);
         if (rc)
-                CERROR("destroy orphan objid 0x"LPX64" on ost error "
+                CDEBUG(D_INODE, "destroy orphan objid 0x"LPX64" on ost error "
                        "%d\n", lsm->lsm_object_id, rc);
 out_free_memmd:
         obd_free_memmd(mds->mds_osc_exp, &lsm);
@@ -228,7 +229,7 @@ static int mds_unlink_orphan(struct obd_device *obd, struct dentry *dchild,
                                            mds->mds_max_cookiesize) > 0)
                         log_unlink = 1;
         }
-        err = fsfilt_commit(obd, pending_dir, handle, 0);
+        err = fsfilt_commit(obd, mds->mds_sb, pending_dir, handle, 0);
         if (err) {
                 CERROR("error committing orphan unlink: %d\n", err);
                 if (!rc)
@@ -320,7 +321,7 @@ int mds_cleanup_orphans(struct obd_device *obd)
                         item ++;
                         CWARN("removed orphan %s from MDS and OST\n", d_name);
                 } else {
-                        CERROR("removed orphan %s from MDS and OST failed,"
+                        CDEBUG(D_INODE, "removed orphan %s from MDS/OST failed,"
                                " rc = %d\n", d_name, rc);
                         rc = 0;
                 }