Whamcloud - gitweb
LU-8465 e2fsck: copy context when using multi-thread fsck 90/35690/18
authorLi Xi <lixi@ddn.com>
Mon, 5 Aug 2019 04:01:17 +0000 (12:01 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 18 Sep 2020 16:04:40 +0000 (16:04 +0000)
commit59c8379f2b51885ee74b248ab93bdf742c1eb96d
tree8836dfd31f6319230a457d67f1438a84f04e968e
parente80445181c12f55a61a6e4d4b178d2960d0e403d
LU-8465 e2fsck: copy context when using multi-thread fsck

This patch only copy the context to a new one when -m is enabled.
It doesn't actually start any thread. When pass1 test finishes,
the new context is copied back to the original context.

Since the signal handler only changes the original context, so
add global_ctx in "struct e2fsck_struct" and use that to check
whether there is any signal of canceling.

This patch handles the long jump properly so that all the existing
tests can be passed even the context has been copied. Otherwise,
test f_expisize_ea_del would fail when aborting.

Change-Id: I99bc621165ac7470bbd54550f8198b0a0b35feee
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/35690
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
e2fsck/e2fsck.h
e2fsck/pass1.c
e2fsck/unix.c