Whamcloud - gitweb
LU-13261 mdt: PFL layout changed while accessing 84/37684/2
authorHongchao Zhang <hongchao@whamcloud.com>
Sun, 19 Jan 2020 06:26:10 +0000 (01:26 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 5 Mar 2020 22:37:05 +0000 (22:37 +0000)
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"

Change-Id: Iad722d1dac187f57ae77606a4d4587525412cd68
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37684
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
lustre/mdt/mdt_lvb.c

index f37fa6c..1a5e8ba 100644 (file)
@@ -408,7 +408,12 @@ static int mdt_lvbo_fill(struct ldlm_lock *lock,
                                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",