Whamcloud - gitweb
LU-13666 lod: update .do_index_ops on layout detach 26/39226/2
authorLai Siyao <lai.siyao@whamcloud.com>
Wed, 1 Jul 2020 14:03:19 +0000 (22:03 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 29 Oct 2020 04:48:44 +0000 (04:48 +0000)
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 <lai.siyao@whamcloud.com>
Change-Id: Ia8f66a8a3fd5e96f0dba4d60eb2443107d320418
Reviewed-on: https://review.whamcloud.com/39226
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_object.c

index 73dab58..352db91 100644 (file)
@@ -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);
 }