From: Ann Koehler Date: Mon, 30 Jul 2018 21:02:59 +0000 (-0500) Subject: LU-11195 lod: Mark comps cached on replay of layout change X-Git-Tag: 2.11.55~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F04%2F32904%2F2;p=fs%2Flustre-release.git 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. Signed-off-by: Ann Koehler Change-Id: I8eaee5614c7f2f6e6a3f2c51de93a65422a3122b Reviewed-on: https://review.whamcloud.com/32904 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 9299193..f41b6e2 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -5499,6 +5499,7 @@ static int lod_declare_update_plain(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)