From 821319d2f09302bfbcd34796eadbafd70e38f9e1 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Sun, 19 Jan 2020 01:26:10 -0500 Subject: [PATCH] LU-13261 mdt: PFL layout changed while accessing The PFL layout EA could be enlarged when the corresponding layout of some IO range is started to be written, which can cause other thread to get incorrect layout size at "mdt_intent_layout" and cause "mdt_lvbo_fill" to fail checking the real layout size. In Lustre, "ldlm_handle_enqueue0" has processed the error "-ERANGE" and it will retry after expanding the layout buffer size, then it only needs to decrease the debug level of the log in "mdt_lvbo_fill" Lustre-change: https://review.whamcloud.com/37684 Lustre-commit: 35d01a0fc7b2933d589f5a6bc4878382cbc15b52 Change-Id: Iad722d1dac187f57ae77606a4d4587525412cd68 Signed-off-by: Hongchao Zhang Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/37821 Tested-by: Maloo --- lustre/mdt/mdt_lvb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lustre/mdt/mdt_lvb.c b/lustre/mdt/mdt_lvb.c index 5c60471..9417c98 100644 --- a/lustre/mdt/mdt_lvb.c +++ b/lustre/mdt/mdt_lvb.c @@ -414,7 +414,12 @@ static int mdt_lvbo_fill(struct ldlm_lock *lock, info->mti_mdt->mdt_max_mdsize = rc; level = D_INFO; } else { - level = D_ERROR; + /* The PFL layout EA could be enlarged when + * the corresponding layout of some IO range + * is started to be written, which can cause + * other thread to get incorrect layout size + * at mdt_intent_layout, see LU-13261. */ + level = D_LAYOUT; } CDEBUG_LIMIT(level, "%s: small buffer size %d for EA " "%d (max_mdsize %d): rc = %d\n", -- 1.8.3.1