Whamcloud - gitweb
LU-9806 obdclass: wait for all exports to go
authorAlex Zhuravlev <bzzz@whamcloud.com>
Fri, 12 Apr 2024 05:28:28 +0000 (08:28 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Apr 2024 09:54:19 +0000 (09:54 +0000)
commit198d29c2ae9f3b56f6ac0223686cb47578ac5d69
tree49a7d76c231f3f19951376568c2c90cdb20429d1
parentf1a432fc781f97a5016e825823130ffa97eeda7b
LU-9806 obdclass: wait for all exports to go

obd_zombie_export_add() removes an export from the stale list
and then schedules a job to destroy that export. in this short
window ofd_fini()/mdt_fini() can find obd_linked_exports list
empty and no work in zombie work queue. then the obd is being
removed and concurrent export destroy may find the obd in a
unexpected state:
LustreError: 11166:0:(tgt_lastrcvd.c:469:tgt_client_free())
ASSERTION( lut && lut->lut_client_bitmap ) failed

use obd_stale_export_num counter to block in obd_zombie_barrier.

move atomic_inc() from class_unlink_export to obd_export_zombie_add()
as self-exports are not added to the stale list. I

Lustre-change: https://review.whamcloud.com/50147
Lustre-commit: 08f9ebe93b300c39d2af1fb8e82a22e9c84f401b

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I62ed019f86becd3c66f5fcdf991f13cd47466e5e
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54753
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/obdclass/genops.c