Whamcloud - gitweb
LU-18611 lfsck: stop returns after thread stopped 39/57639/4
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 3 Jan 2025 07:41:47 +0000 (02:41 -0500)
committerOleg Drokin <green@whamcloud.com>
Sun, 2 Feb 2025 06:29:15 +0000 (06:29 +0000)
commite2122894cd144e36348e957ad4ba5cc8f0380a17
treec2aa212a96ae1814c2e779abc862cd0472ecb870
parent6246dadc87131158d760a8b5149f1b4d7fdfa066
LU-18611 lfsck: stop returns after thread stopped

'lctl lfsck_stop' should wait for lfsck thread stopped before return,
and 'lctl lfsck_stop -A' should notify other nodes to stop lfsck even
if master node has stopped. This can guarantee subsequent lfsck_start
won't fail on strange errors.

Remove li_stopping flag, which doesn't make much sense.

Change wait_event_idle() to wait_event_interruptible() in
lfsck_start/stop so that the commands can be killed if it's stuck.

Update sanity-lfsck 44 to reflect above change.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I8eeb35cf2fa8a72a19f11378c4c7fd0e5a1b5961
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57639
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lfsck/lfsck_internal.h
lustre/lfsck/lfsck_lib.c
lustre/tests/sanity-lfsck.sh