Re: [PATCH 7/8] nowait aio: xfs

2017-05-11 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- 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

[PATCH 7/8] nowait aio: xfs

2017-05-09 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable immediately. IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin if it needs allocation either due to file extension, writing to a hole, or COW or waiting for other DIOs to finish.

Re: [PATCH 7/8] nowait aio: xfs

2017-04-19 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- 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

[PATCH 7/8] nowait aio: xfs

2017-04-14 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable immediately. IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin if it needs allocation either due to file extension, writing to a hole, or COW or waiting for other DIOs to finish.

Re: [PATCH 7/8] nowait aio: xfs

2017-04-07 Thread Darrick J. Wong
On Fri, Apr 07, 2017 at 06:34:28AM -0500, Goldwyn Rodrigues wrote: > > > On 04/06/2017 05:54 PM, Darrick J. Wong wrote: > > On Mon, Apr 03, 2017 at 11:52:11PM -0700, Christoph Hellwig wrote: > >>> + if (unaligned_io) { > >>> + /* If we are going to wait for other DIO to finish, bail */ >

Re: [PATCH 7/8] nowait aio: xfs

2017-04-07 Thread Goldwyn Rodrigues
On 04/06/2017 05:54 PM, Darrick J. Wong wrote: > On Mon, Apr 03, 2017 at 11:52:11PM -0700, Christoph Hellwig wrote: >>> + if (unaligned_io) { >>> + /* If we are going to wait for other DIO to finish, bail */ >>> + if ((iocb->ki_flags & IOCB_NOWAIT) && >>> +

Re: [PATCH 7/8] nowait aio: xfs

2017-04-06 Thread Darrick J. Wong
On Mon, Apr 03, 2017 at 11:52:11PM -0700, Christoph Hellwig wrote: > > + if (unaligned_io) { > > + /* If we are going to wait for other DIO to finish, bail */ > > + if ((iocb->ki_flags & IOCB_NOWAIT) && > > +atomic_read(>i_dio_count)) > > +

Re: [PATCH 7/8] nowait aio: xfs

2017-04-04 Thread Christoph Hellwig
> + if (unaligned_io) { > + /* If we are going to wait for other DIO to finish, bail */ > + if ((iocb->ki_flags & IOCB_NOWAIT) && > + atomic_read(>i_dio_count)) > + return -EAGAIN; > inode_dio_wait(inode); This checks

[PATCH 7/8] nowait aio: xfs

2017-04-03 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable immediately. IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin if it needs allocation either due to file extension, writing to a hole, or COW or waiting for other DIOs to finish.

[PATCH 7/8] nowait aio: xfs

2017-03-15 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable immediately. IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin if it needs allocation either due to file extension, writing to a hole, or COW or waiting for other DIOs to finish.

Re: [PATCH 7/8] nowait aio: xfs

2017-03-01 Thread Christoph Hellwig
> @@ -528,12 +528,17 @@ xfs_file_dio_aio_write( > ((iocb->ki_pos + count) & mp->m_blockmask)) { > unaligned_io = 1; > iolock = XFS_IOLOCK_EXCL; > + if (iocb->ki_flags & IOCB_NOWAIT) > + return -EAGAIN; So all unaligned I/O will

[PATCH 7/8] nowait aio: xfs

2017-02-28 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If IOCB_NOWAIT is set, bail if the i_rwsem is not lockable immediately. IF IOMAP_NOWAIT is set, return EAGAIN in xfs_file_iomap_begin if it needs allocation either due to file extending, writing to a hole, or COW. Signed-off-by: Goldwyn Rodrigues