Re: [PATCH v8 03/10] iomap: Complete partial direct I/O writes synchronously

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

 



2018-06-05 14:10 GMT+02:00 David Sterba <dsterba@xxxxxxx>:
> On Mon, Jun 04, 2018 at 09:31:16PM +0200, Andreas Gruenbacher wrote:
>> @@ -1062,8 +1063,9 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
>>       if (ret < 0)
>>               iomap_dio_set_error(dio, ret);
>>

+       /*
+        * Make sure changes to dio are visible globally before the atomic
+        * counter decrement.
+        */

>> +     smp_mb__before_atomic();
>>       if (!atomic_dec_and_test(&dio->ref)) {
>
> The barrier should be documented. I tried to do a quick look around the
> code if it's clear why it's there but it's not. Thanks.
>
>> -             if (!is_sync_kiocb(iocb))
>> +             if (!dio->wait_for_completion)
>>                       return -EIOCBQUEUED;
>>
>>               for (;;) {

Thanks,
Andreas



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux