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

2018-06-06 Thread Andreas Gruenbacher
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) >

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

2018-06-06 Thread Christoph Hellwig
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); > > > > +

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

2018-06-05 Thread Andreas Grünbacher
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

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

2018-06-05 Thread 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); > > + smp_mb__before_atomic(); > if (!atomic_dec_and_test(&dio->ref))

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

2018-06-04 Thread Andreas Gruenbacher
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