Whamcloud - gitweb
fixed:
authorhuanghua <huanghua>
Tue, 15 Aug 2006 10:02:43 +0000 (10:02 +0000)
committerhuanghua <huanghua>
Tue, 15 Aug 2006 10:02:43 +0000 (10:02 +0000)
(1) passed wrong lmm_size to mdd_get_md();
(2) handle -ENODATA error

lustre/mdd/mdd_handler.c
lustre/mdd/mdd_lov.c

index 00a9806..b3f3ccd 100644 (file)
@@ -237,9 +237,9 @@ static int __mdd_lmm_get(const struct lu_context *ctxt,
         RETURN(rc);
 }
 
-static int mdd_attr_get_internal (const struct lu_context *ctxt,
-                                    struct mdd_object *mdd_obj, 
-                                    struct md_attr *ma)
+static int mdd_attr_get_internal(const struct lu_context *ctxt,
+                                 struct mdd_object *mdd_obj, 
+                                 struct md_attr *ma)
 {
         int rc = 0;
         ENTRY;
@@ -581,6 +581,7 @@ static int __mdd_xattr_set(const struct lu_context *ctxt, struct mdd_object *o,
 {
         struct dt_object *next;
         int rc = 0;
+        ENTRY;
         
         LASSERT(lu_object_exists(ctxt, mdd2lu_obj(o)));
         next = mdd_object_child(o);
index 99fa43c..656d9dc 100644 (file)
@@ -222,6 +222,8 @@ static int mdd_lov_set_dir_md(const struct lu_context *ctxt,
              lum->lmm_stripe_size == (typeof(lum->lmm_stripe_size))(-1)){
                 rc = mdd_xattr_set_txn(ctxt, obj, NULL, 0, MDS_LOV_MD_NAME, 0, 
                                        handle);
+                if (rc == -ENODATA)
+                        rc = 0;
                 CDEBUG(D_INFO, "delete lov ea of "DFID" rc %d \n",
                                 PFID(mdo2fid(obj)), rc);
         } else {
@@ -364,6 +366,7 @@ int mdd_lov_create(const struct lu_context *ctxt, struct mdd_device *mdd,
                         struct lov_mds_md *__lmm;
                         int __lmm_size, returned_lmm_size;
                         __lmm_size = mdd_lov_mdsize(ctxt, mdd);
+                        returned_lmm_size = __lmm_size;
 
                         OBD_ALLOC(__lmm, __lmm_size);
                         if (__lmm == NULL)