]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix race in check-integrity caused by usage of bitfield
authorStefan Behrens <sbehrens@giantdisaster.de>
Tue, 27 Nov 2012 16:10:21 +0000 (16:10 +0000)
committerChris Mason <chris.mason@fusionio.com>
Mon, 17 Dec 2012 01:46:13 +0000 (20:46 -0500)
commit5bcf2bcc9fe90efcb8d102933b0627815798ae72
tree2e02ffad4235261cdb04b1eca1cbc9e7e83a3798
parent2f99fddb3e24f505f0c4b420df89b7b0928f5f09
Btrfs: fix race in check-integrity caused by usage of bitfield

The structure member mirror_num is modified concurrently to the
structure member is_iodone. This doesn't require any locking by
design, unless everything is stored in the same 32 bits of a
bit field. This was the case and xfstest 284 was able to
trigger false warnings from the checker code. This patch
seperates the bits and fixes the race.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/check-integrity.c