Linux filesystem development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Lukas Czerner <lczerner@redhat.com>, Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org, eguan@redhat.com
Subject: Re: [PATCH] fs: Avoid invalidation in interrupt context in dio_complete()
Date: Tue, 17 Oct 2017 08:43:43 -0600	[thread overview]
Message-ID: <e2898186-bcc2-626c-0439-5dcfd3241527@kernel.dk> (raw)
In-Reply-To: <20171017104402.mm45va67ejxtgjta@rh_laptop>

On 10/17/2017 04:44 AM, Lukas Czerner wrote:
> 
> On Tue, Oct 17, 2017 at 11:53:56AM +0200, Jan Kara wrote:
>> On Tue 17-10-17 11:11:24, Lukas Czerner wrote:
>>> Currently we try to defer completion of async DIO to the process context
>>> in case there are any mapped pages associated with the inode so that we
>>> can invalidate the pages when the IO completes. However the check is racy
>>> and the pages can be mapped afterwards. If this happens we might end up
>>> calling invalidate_inode_pages2_range() in dio_complete() in interrupt
>>> context which could sleep. This can be reproduced by generic/451.
>>>
>>> Fix this by passing the information whether we can or can't invalidate
>>> to the dio_complete(). Thanks Eryu Guan for reporting this and Jan Kara
>>> for suggesting a fix.
>>>
>>> Fixes: 332391a9935d ("fs: Fix page cache inconsistency when mixing buffered and AIO DIO")
>>> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
>>> Reported-by: Eryu Guan <eguan@redhat.com>
>>
>> Looks good to me. You can add:
>>
>> Reviewed-by: Jan Kara <jack@suse.cz>
>>
>> BTW, I guess you should CC someone who can merge the patch...
> 
> Jens, could you please take this through your tree ?

Will do, queued it up for 4.14.

-- 
Jens Axboe

      reply	other threads:[~2017-10-17 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  9:11 [PATCH] fs: Avoid invalidation in interrupt context in dio_complete() Lukas Czerner
2017-10-17  9:53 ` Jan Kara
2017-10-17 10:41   ` Eryu Guan
2017-10-17 10:44   ` Lukas Czerner
2017-10-17 14:43     ` Jens Axboe [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=e2898186-bcc2-626c-0439-5dcfd3241527@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=eguan@redhat.com \
    --cc=jack@suse.cz \
    --cc=lczerner@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox