staging: lustre: llite: add missing LMV_MAGIC_V1 case
authorwang di <di.wang@intel.com>
Mon, 26 Sep 2016 14:50:50 +0000 (10:50 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 11:01:21 +0000 (13:01 +0200)
The port to upstream dropped handling the LMV_MAGIC_V1
case for ll_dir_getstripe. This adds it back.

Signed-off-by: wang di <di.wang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531
Reviewed-on: http://review.whamcloud.com/7228
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c

index 705de1ce185ad2ae6cca5f44604c61d3b63c6444..7f32a539d260da5499a44b0eb2307722b8f7b455 100644 (file)
@@ -620,6 +620,10 @@ int ll_dir_getstripe(struct inode *inode, void **plmm, int *plmm_size,
                if (cpu_to_le32(LOV_MAGIC) != LOV_MAGIC)
                        lustre_swab_lov_user_md_v3((struct lov_user_md_v3 *)lmm);
                break;
+       case LMV_MAGIC_V1:
+               if (cpu_to_le32(LMV_MAGIC) != LMV_MAGIC)
+                       lustre_swab_lmv_mds_md((union lmv_mds_md *)lmm);
+               break;
        case LMV_USER_MAGIC:
                if (cpu_to_le32(LMV_USER_MAGIC) != LMV_USER_MAGIC)
                        lustre_swab_lmv_user_md((struct lmv_user_md *)lmm);
index e24d8e1937bf8ba6a43ad60097d99e656c1c3a56..871768511e8cc8ebe4797435d262e00a6058010a 100644 (file)
@@ -1861,6 +1861,7 @@ void lustre_swab_lmv_mds_md(union lmv_mds_md *lmm)
                break;
        }
 }
+EXPORT_SYMBOL(lustre_swab_lmv_mds_md);
 
 void lustre_swab_lmv_user_md(struct lmv_user_md *lum)
 {