Whamcloud - gitweb
LU-14579 flr: mirror unlink and split race 69/43369/5
authorBobi Jam <bobijam@whamcloud.com>
Fri, 2 Apr 2021 04:47:32 +0000 (12:47 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:11:26 +0000 (02:11 +0000)
commitbd7a2f9938a7edf09afd133601ca4181e109a7d0
tree8469f0140f3f2d86189e0c16069ad94e37840a61
parent3bca0973cca3d50f9f0b1b3e22fcc5d82a40d5fe
LU-14579 flr: mirror unlink and split race

- protect lod_object::ldo_comp_entries during
  lod_obj_for_each_stripe(), since other thread could change the
  ldo_comp_entries at the same time.

- protect LOD in-memory layout during layout change
  layout_{add|set|del} and purge_mirror.

- fix lock-tx order in mdd_unlink: start the transaction and then
  take locks. (introduced in commit
  55d5235354d49aee0a330ad64beef4ed9004a27f)

- Add test case for mirror split and unlink race.

Fixes: 55d5235354 ("LU-14579 flr: GPF in lod_sub_declare_destroy")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ic54245c8755f660087fce46d1cad0ef7fa091245
Reviewed-on: https://review.whamcloud.com/43369
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lod/lod_object.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_object.c
lustre/tests/sanity-flr.sh