All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: Christoph Hellwig <hch@lst.de>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>,
	jack@suse.cz, akpm@linux-foundation.org,
	linux-block@vger.kernel.org
Subject: Re: [PATCH 0/10 v13] merge request: No wait AIO
Date: Tue, 20 Jun 2017 06:53:26 -0500	[thread overview]
Message-ID: <1c21d544-b5b4-fd81-b2cf-202eab7848c9@suse.de> (raw)
In-Reply-To: <20170620072010.GA8245@lst.de>



On 06/20/2017 02:20 AM, Christoph Hellwig wrote:
> On Tue, Jun 20, 2017 at 01:24:28AM +0100, Al Viro wrote:
>> On Mon, Jun 19, 2017 at 05:36:05PM -0600, Jens Axboe wrote:
>>> On 06/19/2017 05:34 PM, Al Viro wrote:
>>>> On Mon, Jun 19, 2017 at 05:15:16PM -0600, Jens Axboe wrote:
>>>>> On 06/19/2017 10:33 AM, Goldwyn Rodrigues wrote:
>>>>>> Jens,
>>>>>>
>>>>>> As Christoph suggested, I am sending the patches against the block
>>>>>> tree for merge since the block layer changes had the most conflicts.
>>>>>> My tree is at https://github.com/goldwynr/linux/tree/nowait-block
>>>>>
>>>>> I can merge it for 4.13, but I need Al to be happy with it first.
>>>>
>>>> FWIW, it's really a matter of who gets more conflicts - I'm OK with the
>>>> general shape of that code and it could go through either tree (or both,
>>>> for that matter, if an immutable branch is promised).
>>>
>>> I'm still hopeful that the write hint patchset will make it as well,
>>> which will definitely conflict with this. So if you don't mind, I'd
>>> like to queue it through the block tree. The block for-4.x/ branches
>>> are not rebased.
>>
>> Fine by me; the only problem I see there at the moment is with ext4 and
>> xfs ->read_iter() not buggering off on nowait (xfs one has
>>         xfs_ilock(ip, XFS_IOLOCK_SHARED);
>> done before it gets to generic_file_read_iter()).
> 
> Something like the patch below should take care of the XFS, free feel
> to fold.
> 

I had missed on the dax support completely so I added a chunk for
xfs_file_dax_write() as well (and also ext4). Patches coming shortly,
after their usual round of testing. They are pushed onto
https://github.com/goldwynr/linux/tree/nowait-block

> 
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index e159eb381d9f..c74847f71b3d 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -216,7 +216,11 @@ xfs_file_dio_aio_read(
>  
>  	file_accessed(iocb->ki_filp);
>  
> -	xfs_ilock(ip, XFS_IOLOCK_SHARED);
> +	if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
> +		if (iocb->ki_flags & IOCB_NOWAIT)
> +			return -EAGAIN;
> +		xfs_ilock(ip, XFS_IOLOCK_SHARED);
> +	}
>  	ret = iomap_dio_rw(iocb, to, &xfs_iomap_ops, NULL);
>  	xfs_iunlock(ip, XFS_IOLOCK_SHARED);
>  
> @@ -237,7 +241,11 @@ xfs_file_dax_read(
>  	if (!count)
>  		return 0; /* skip atime */
>  
> -	xfs_ilock(ip, XFS_IOLOCK_SHARED);
> +	if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) {
> +		if (iocb->ki_flags & IOCB_NOWAIT)
> +			return -EAGAIN;
> +		xfs_ilock(ip, XFS_IOLOCK_SHARED);
> +	}
>  	ret = dax_iomap_rw(iocb, to, &xfs_iomap_ops);
>  	xfs_iunlock(ip, XFS_IOLOCK_SHARED);
>  
> 

-- 
Goldwyn

      reply	other threads:[~2017-06-20 11:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 16:33 [PATCH 0/10 v13] merge request: No wait AIO Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 01/10] fs: Separate out kiocb flags setup based on RWF_* flags Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 02/10] fs: Introduce filemap_range_has_page() Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 03/10] fs: Use RWF_* flags for AIO operations Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 04/10] fs: Introduce RWF_NOWAIT and FMODE_AIO_NOWAIT Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 05/10] fs: return if direct I/O will trigger writeback Goldwyn Rodrigues
2017-06-19 16:44   ` Al Viro
2017-06-19 16:33 ` [PATCH 06/10] fs: Introduce IOMAP_NOWAIT Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 07/10] block: return on congested block device Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 08/10] ext4: nowait aio support Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 09/10] xfs: " Goldwyn Rodrigues
2017-06-19 16:33 ` [PATCH 10/10] btrfs: " Goldwyn Rodrigues
2017-06-19 23:15 ` [PATCH 0/10 v13] merge request: No wait AIO Jens Axboe
2017-06-19 23:20   ` Goldwyn Rodrigues
2017-06-19 23:34   ` Al Viro
2017-06-19 23:36     ` Jens Axboe
2017-06-20  0:24       ` Al Viro
2017-06-20  7:20         ` Christoph Hellwig
2017-06-20 11:53           ` Goldwyn Rodrigues [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c21d544-b5b4-fd81-b2cf-202eab7848c9@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.