Re: [PATCH] btrfs-progs: Fix data races in btrfs-image.

2017-07-12 Thread David Sterba
On Wed, Jul 12, 2017 at 01:05:10PM -0700, Adam Buchbinder wrote: > Making the code data-race safe requires that reads *and* writes > happen under a mutex lock, if any of the access are writes. See > Dmitri Vyukov, "Benign data races: what could possibly go wrong?" > for more details. > > The fix h

[PATCH] btrfs-progs: Fix data races in btrfs-image.

2017-07-12 Thread Adam Buchbinder
Making the code data-race safe requires that reads *and* writes happen under a mutex lock, if any of the access are writes. See Dmitri Vyukov, "Benign data races: what could possibly go wrong?" for more details. The fix here was to put most of the main loop of restore_worker under a mutex lock. T