Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / mdd / mdd_lov.c
index 197ffd6..6044429 100644 (file)
@@ -77,6 +77,11 @@ static int mdd_notify(struct obd_device *host, struct obd_device *watched,
                 case OBD_NOTIFY_CONFIG:
                         rc = md_do_upcall(NULL, &mdd->mdd_md_dev, MD_LOV_CONFIG);
                         break;
+#ifdef HAVE_QUOTA_SUPPORT
+                case OBD_NOTIFY_QUOTA:
+                        rc = md_do_upcall(NULL, &mdd->mdd_md_dev, MD_LOV_QUOTA);
+                        break;
+#endif
                 default:
                         CDEBUG(D_INFO, "Unhandled notification %#x\n", ev);
         }
@@ -392,9 +397,10 @@ int mdd_lov_create(const struct lu_env *env, struct mdd_device *mdd,
         int                    rc = 0;
         ENTRY;
 
-        if (!md_should_create(create_flags))
+        if (!md_should_create(create_flags)) {
+                *lmm_size = 0;
                 RETURN(0);
-
+        }
         oti_init(oti, NULL);
 
         /* replay case, has objects already, only get lov from eadata */
@@ -444,7 +450,9 @@ int mdd_lov_create(const struct lu_env *env, struct mdd_device *mdd,
                                                XATTR_NAME_LOV);
                         if (rc > 0)
                                 rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE,
-                                                   lov_exp, 0, &lsm, _lmm);
+                                                   lov_exp, *lmm_size,
+                                                   &lsm, _lmm);
+
                         if (rc)
                                 GOTO(out_oti, rc);
                 }
@@ -692,6 +700,8 @@ int mdd_unlink_log(const struct lu_env *env, struct mdd_device *mdd,
         if ((ma->ma_cookie_size > 0) &&
             (mdd_log_op_unlink(obd, ma->ma_lmm, ma->ma_lmm_size,
                                ma->ma_cookie, ma->ma_cookie_size) > 0)) {
+                CDEBUG(D_HA, "DEBUG: unlink log is added for object "DFID"\n",
+                       PFID(mdd_object_fid(mdd_cobj)));
                 ma->ma_valid |= MA_COOKIE;
         }
         return 0;