On 6 June 2018 at 12:26, Christoph Hellwig wrote:
> On Tue, Jun 05, 2018 at 02:10:24PM +0200, David Sterba wrote:
>> 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)
>
On Tue, Jun 05, 2018 at 02:10:24PM +0200, David Sterba wrote:
> 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);
> >
> > +
2018-06-05 14:10 GMT+02:00 David Sterba :
> 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
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);
>
> + smp_mb__before_atomic();
> if (!atomic_dec_and_test(&dio->ref))
According to xfstest generic/240, applications seem to expect direct I/O
writes to either complete as a whole or to fail; short direct I/O writes
are apparently not appreciated. This means that when only part of an
asynchronous direct I/O write succeeds, we can either fail the entire
write, or we