Re: [PATCH] btrfs: remove broken memory barrier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 01, 2017 at 06:25:56PM +0300, Nikolay Borisov wrote:
> Commit 38851cc19adb ("Btrfs: implement unlocked dio write") implemented
> unlocked dio write, allowing multiple dio writers to write to non-overlapping,
> and non-eof-extending regions. In doing so it also introduced a broken memory
> barrier. It is broken due to 2 things:
> 
> 1. Memory barriers _MUST_ always be paired, this is clearly not the case here
> 
> 2. Checkpatch actually produces a warning if a memory barrier is introduced that
> doesn't have a comment explaining how it's being paired.

Specifically for inode::i_dio_count that's wrapped inside
inode_dio_begin, there is no explicit barrier semantics attached, so
removing is fine as the atomic is used in common the waiter/wakeup pattern.

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux