From a7c51a49747d58f6af4515827041dbc3fbf0222e Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Wed, 1 Jul 2020 22:03:19 +0800 Subject: [PATCH] LU-13666 lod: update .do_index_ops on layout detach Directory migration detaches stripes from source, and then attaches them to target if source is a striped directory. This will convert source from striped directory to plain directory, it needs update .do_index_ops from lod_striped_index_ops to lod_index_ops to avoid trigger assertion in index ops. Signed-off-by: Lai Siyao Change-Id: Ia8f66a8a3fd5e96f0dba4d60eb2443107d320418 Reviewed-on: https://review.whamcloud.com/39226 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- 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 73dab58..352db91 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -8155,6 +8155,7 @@ static int lod_dir_layout_detach(const struct lu_env *env, lo->ldo_stripe = NULL; lo->ldo_dir_stripes_allocated = 0; lo->ldo_dir_stripe_count = 0; + dt->do_index_ops = &lod_index_ops; RETURN(rc); } -- 1.8.3.1