From 6ce62e40ff7ed78cb8335cdc44c624f559f5de13 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Fri, 17 Jan 2020 17:31:04 +0100 Subject: [PATCH] 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. Lustre-change: https://review.whamcloud.com/37269 Lustre-commit: 3e23353201a753104d1fcdab28353646e40644dc Signed-off-by: Clement Barthelemy Signed-off-by: Sebastien Buisson Change-Id: I6553e66cd4f3b5acc65790da94555350c98fe179 Reviewed-on: https://review.whamcloud.com/37409 Tested-by: jenkins Reviewed-by: Mike Pershin Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/utils/liblustreapi_layout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/utils/liblustreapi_layout.c b/lustre/utils/liblustreapi_layout.c index 59f00af..d69f6c8 100644 --- a/lustre/utils/liblustreapi_layout.c +++ b/lustre/utils/liblustreapi_layout.c @@ -545,8 +545,10 @@ struct llapi_layout *llapi_layout_get_by_xattr(void *lov_xattr, if (v1->lmm_pattern == LOV_PATTERN_RAID0) comp->llc_pattern = LLAPI_LAYOUT_RAID0; + 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 and DoM for now. */ comp->llc_pattern = v1->lmm_pattern; if (v1->lmm_stripe_size == 0) -- 1.8.3.1