Whamcloud - gitweb
LU-8760 lfsck: fix bit operations lfsck_assistant_data
Race between lfsck_master_engine->lfsck_double_scan_generic()
and lfsck_layout->lfsck_assistant_engine() take a place.
Both threads were sleeping and waiting for each other.
lad_to_double_scan was set before sleep, but lfsck_assistant_data had
zeros
lad_post_result = 1,
lad_to_post = 0,
lad_to_double_scan = 0,
lad_in_double_scan = 0,
lad_exit = 0,
lad_incomplete = 0,
Using
unsigned int a:1,
b:1;
f1() {a = 1;}
f2() {b = 0;}
is racy for multithread execution. These type of logic requires
atomic bit operations.
The race is lad_to_double_scan vs lad_to_post.
Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-7076
Change-Id: I4f971ce2acb244f32ae2e108b96995dc2f27e7a3
Reviewed-on: https://review.whamcloud.com/34502
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>