Whamcloud - gitweb
LU-12780 scrub: all update to bitfields must be protected.
When a structure contains bitfields, these are updated by
a read-modify-write of the whole word.
If two of these updates can race, corruption can occurs - updates can
be lost.
To avoid this, it is best to protect updates with a spinlock.
Many updates to the os_* bit fields are already protected by
->os_lock. This patch addes the lock to the remaining updates.
In many cases, this only requires moving a 'lock' earlier, or an
'unlock' later.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I2335d08cd53dcda98d8046d730829347456a6c5d
Reviewed-on: https://review.whamcloud.com/38974
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>