Whamcloud - gitweb
e2fsck: copy context when using multi-thread fsck
authorLi Xi <lixi@ddn.com>
Mon, 5 Aug 2019 04:01:17 +0000 (12:01 +0800)
committerLi Dongyang <dongyangli@ddn.com>
Thu, 8 Apr 2021 00:50:27 +0000 (10:50 +1000)
commit728def5c0467e12d59ee279e68716d613f8719ac
treefd9ebbd07fa76caae2c041ee9660dc474144be18
parent106eb9ea757772f6f914a3f6e0402de52d76e4ca
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.

E2fsprogs-commit: 05a637a9e68d3f7e15323deeab00981d4b7df7e8

Change-Id: I4994e62bdf27c385b02e55de82a9dafcc6a12139
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c
e2fsck/unix.c