Whamcloud - gitweb
LU-11195 lod: Mark comps cached on replay of layout change 04/32904/2
authorAnn Koehler <amk@cray.com>
Mon, 30 Jul 2018 21:02:59 +0000 (16:02 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 4 Sep 2018 03:48:42 +0000 (03:48 +0000)
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 <amk@cray.com>
Change-Id: I8eaee5614c7f2f6e6a3f2c51de93a65422a3122b
Reviewed-on: https://review.whamcloud.com/32904
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_object.c

index 9299193..f41b6e2 100644 (file)
@@ -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)