Whamcloud - gitweb
LU-11195 lod: Mark comps cached on replay of layout change 10/33110/3
authorAnn Koehler <amk@cray.com>
Mon, 30 Jul 2018 21:02:59 +0000 (16:02 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Jan 2019 07:31:03 +0000 (07:31 +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.

Lustre-change: https://review.whamcloud.com/32904
Lustre-commit: e021026d0c37d8806d16dbaad6a9d4f47844c999

Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I8eaee5614c7f2f6e6a3f2c51de93a65422a3122b
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33110
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/lod/lod_object.c

index cc2dd2a..ba82ca6 100644 (file)
@@ -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)