Whamcloud - gitweb
Branch: b_new_cmd
authorwangdi <wangdi>
Mon, 5 Jun 2006 14:48:11 +0000 (14:48 +0000)
committerwangdi <wangdi>
Mon, 5 Jun 2006 14:48:11 +0000 (14:48 +0000)
several fixes in fld according to umka's review.

lustre/mdc/mdc_request.c

index 947ec7b..3ea198b 100644 (file)
@@ -877,7 +877,7 @@ int mdc_fld(struct obd_export *exp, struct md_fld *mf, __u32 fld_op)
         struct md_fld *pmf;
         int mf_size = sizeof(*mf);
         __u32 *op;
-        int size[2] = {sizeof(op), mf_size}, rc;
+        int size[2] = {sizeof(*op), mf_size}, rc;
         ENTRY;
 
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
@@ -897,6 +897,7 @@ int mdc_fld(struct obd_export *exp, struct md_fld *mf, __u32 fld_op)
                 GOTO(out_req, rc);
 
         pmf = lustre_swab_repbuf(req, 0, sizeof(*pmf), lustre_swab_md_fld);
+        *mf = *pmf; 
 out_req:
         ptlrpc_req_finished(req);
         RETURN(rc);