Whamcloud - gitweb
LU-18172: lfsck: umount has to wait lfsck_stop 65/56165/3
authorVladimir Saveliev <vladimir.saveliev@hpe.com>
Tue, 27 Aug 2024 11:02:29 +0000 (14:02 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 2 Jan 2025 20:47:54 +0000 (20:47 +0000)
commit7bd1ef795506aa9e71a845a78456d418f7022707
tree7c3223e764ad20c707bd53a95ef58c62637b738d
parent81481104fdc8f52b3a36fc659f41a3b696a5bbf3
LU-18172: lfsck: umount has to wait lfsck_stop

When called from umount lfsck_stop() should wait if lfsck is already
stopping. Otherwise, continuation of mdt_fini() or ofd_fini() leads to
various failures. Seen so far:
1.
 osd_scrub_cleanup
   LASSERT(dev->od_otable_it == NULL);
 because lfsck_master_engine() has not reached yet
   oit_iops->fini(env, oit_di)
     osd_otable_it_fini
       dev->od_otable_it = NULL;
2.
 lfsck_find_mdt_idx_by_fid
   rc = fld_server_lookup(env, ss->ss_server_fld...
     BUG: unable to handle kernel NULL pointer dereference
 because ss->ss_server_fld is NULL set on
 mdt_fini
   mdt_fld_fini
     ss->ss_server_fld = NULL;

Test for umount while lfsck is stopping is added.

Test-Parameters: trivial testlist=sanity-lfsck env=ONLY=44
HPE-bug-id: LUS-12421
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I527c071d316ba3405f2199125fa7d018c98c403b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56165
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lfsck/lfsck_lib.c
lustre/tests/sanity-lfsck.sh