Whamcloud - gitweb
LU-5889 mdc: Proper accessing struct lov_user_md 83/12683/2
authorYoshifumi Uemura <kogexe@gmail.com>
Wed, 12 Nov 2014 07:02:04 +0000 (16:02 +0900)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Dec 2014 13:48:06 +0000 (13:48 +0000)
In mdc_setattr_pack() access the members of struct lov_user_md by
little endian byte order.

Signed-off-by: Yoshifumi Uemura <kogexe@gmail.com>
Change-Id: I201f00f527242faa6e1a199d3e792e5cdfa48006
Reviewed-on: http://review.whamcloud.com/12683
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdc/mdc_lib.c

index d07c555..6219cd9 100644 (file)
@@ -375,7 +375,7 @@ void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
 
         lum = req_capsule_client_get(&req->rq_pill, &RMF_EADATA);
         if (ea == NULL) { /* Remove LOV EA */
-                lum->lmm_magic = LOV_USER_MAGIC_V1;
+               lum->lmm_magic = cpu_to_le32(LOV_USER_MAGIC_V1);
                 lum->lmm_stripe_size = 0;
                 lum->lmm_stripe_count = 0;
                 lum->lmm_stripe_offset = (typeof(lum->lmm_stripe_offset))(-1);