On 04/20/2018 12:33 AM, David Sterba wrote:
Currently fs_info::balance_running is 0 or 1 and does not use the
semantics of atomics. The pause and cancel check for 0, that can happen
only after __btrfs_balance exits for whatever reason.

Parallel calls to balance ioctl may enter btrfs_ioctl_balance multiple
times but will block on the balance_mutex that protects the
fs_info::flags bit.

Signed-off-by: David Sterba <dste...@suse.com>

 Though it appears to me that we could optimize the lock and atomic bit
 usage a little more, however it can be taken for the next round of
 cleanups. So for now..

 Reviewed-by: Anand Jain <anand.j...@oracle.com>

Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to