From de87598eaf5eea309faa845209148b787ed29c10 Mon Sep 17 00:00:00 2001 From: Ann Koehler Date: Mon, 30 Jul 2018 16:02:59 -0500 Subject: [PATCH] LU-11195 lod: Mark comps cached on replay of layout change Replay of a layout change request on a PFL file leaves the object in an unexpected state: Some components can have llc_stripe set but ldo_comp_cached is not set in the object. The next layout change request on the same object will LBUG when it tries to free the comp entries. The fix is to set ldo_comp_cached on replay so subsequent layout change requests will use the in memory components rather than fetching them from disk. Lustre-change: https://review.whamcloud.com/32904 Lustre-commit: e021026d0c37d8806d16dbaad6a9d4f47844c999 Signed-off-by: Ann Koehler Change-Id: I8eaee5614c7f2f6e6a3f2c51de93a65422a3122b Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/33110 Reviewed-by: Patrick Farrell Tested-by: Jenkins Tested-by: Maloo --- lustre/lod/lod_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index cc2dd2a..ba82ca6 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -4919,6 +4919,7 @@ static int lod_declare_layout_change(const struct lu_env *env, rc = lod_use_defined_striping(env, lo, buf); if (rc) GOTO(out, rc); + lo->ldo_comp_cached = 1; rc = lod_get_lov_ea(env, lo); if (rc <= 0) -- 1.8.3.1