From: Sebastien Buisson Date: Fri, 17 Jan 2020 16:31:04 +0000 (+0100) Subject: LU-13152 llapi: llapi_layout_get_by_xattr groks DoM X-Git-Tag: 2.13.52~66 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3e23353201a753104d1fcdab28353646e40644dc LU-13152 llapi: llapi_layout_get_by_xattr groks DoM llapi_layout_get_by_xattr() function must be updated to handle lov component with LOV_PATTERN_MDT pattern. Signed-off-by: Clement Barthelemy Signed-off-by: Sebastien Buisson Change-Id: I6553e66cd4f3b5acc65790da94555350c98fe179 Reviewed-on: https://review.whamcloud.com/37269 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu --- diff --git a/lustre/utils/liblustreapi_layout.c b/lustre/utils/liblustreapi_layout.c index c9525fe..aefde5d 100644 --- a/lustre/utils/liblustreapi_layout.c +++ b/lustre/utils/liblustreapi_layout.c @@ -549,8 +549,12 @@ struct llapi_layout *llapi_layout_get_by_xattr(void *lov_xattr, else if (v1->lmm_pattern == (LOV_PATTERN_RAID0 | LOV_PATTERN_OVERSTRIPING)) comp->llc_pattern = LLAPI_LAYOUT_OVERSTRIPING; + else if (v1->lmm_pattern == LOV_PATTERN_MDT) + comp->llc_pattern = LLAPI_LAYOUT_MDT; else - /* Lustre only supports RAID0 for now. */ + /* Lustre only supports RAID0, overstripping + * and DoM for now. + */ comp->llc_pattern = v1->lmm_pattern; if (v1->lmm_stripe_size == 0)