Linux-Fsdevel Archive on
help / color / mirror / Atom feed
From: Qu Wenruo <>
To: Goldwyn Rodrigues <>
Subject: Re: [PATCH 0/3] Transient errors in Direct I/O
Date: Fri, 12 Jun 2020 20:56:30 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20200611141127.ir7b3ohd3c3qtunu@fiona>

[-- Attachment #1.1: Type: text/plain, Size: 1766 bytes --]

On 2020/6/11 下午10:11, Goldwyn Rodrigues wrote:
> On 13:31 10/06, Qu Wenruo wrote:
>> On 2020/6/6 上午4:48, Goldwyn Rodrigues wrote:
>>> In current scenarios, for XFS, it would mean that a page invalidation
>>> would end up being a writeback error. So, if iomap returns zero, fall
>>> back to biffered I/O. XFS has never supported fallback to buffered I/O.
>>> I hope it is not "never will" ;)
>>> With mixed buffered and direct writes in btrfs, the pages may not be
>>> released the extent may be locked in the ordered extents cleanup thread,
>> I'm wondering can we handle this case in a different way.
>> In fact btrfs has its own special handling for invalidating pages.
>> Btrfs will first look for any ordered extents covering the page, finish
>> the ordered extent manually, then invalidate the page.
>> I'm not sure why invalidate_inode_pages2_range() used in dio iomap code
>> does not use the fs specific invalidatepage(), but only do_lander_page()
>> then releasepage().
>> Shouldn'y we btrfs implement the lander_page() to handle ordered extents
>> properly?
>> Or is there any special requirement?
> The problem is aops->launder_page() is called only if PG_Dirty is
> set. In this case it is not because we just performed a writeback.

For the dio iomap code, before btrfs_finish_ordered_io(), the pages in
ordered ranges are still dirty.
So launder_page() here can still get triggered to finish the ordered extent.

> Also, it is not just ordered ordered extent writeback which may lock
> the extent, a buffered read can lock as well.
That's right.
But at least that would greatly reduce the possibility for btrfs to fall
back to buffered IO, right?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2020-06-12 12:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 20:48 Goldwyn Rodrigues
2020-06-05 20:48 ` [PATCH 1/3] iomap: dio Return zero in case of unsuccessful pagecache invalidation Goldwyn Rodrigues
2020-06-06  3:13   ` Matthew Wilcox
2020-06-05 20:48 ` [PATCH 2/3] btrfs: Wait for extent bits to release page Goldwyn Rodrigues
2020-06-08 10:20   ` Filipe Manana
2020-06-08 12:13     ` Goldwyn Rodrigues
2020-06-05 20:48 ` [PATCH 3/3] xfs: fallback to buffered I/O if direct I/O is short Goldwyn Rodrigues
2020-06-10  2:59 ` [PATCH 0/3] Transient errors in Direct I/O Dave Chinner
2020-06-10  5:05   ` Dave Chinner
2020-06-11 14:13     ` Goldwyn Rodrigues
2020-06-10  5:31 ` Qu Wenruo
2020-06-11 14:11   ` Goldwyn Rodrigues
2020-06-12 12:56     ` Qu Wenruo [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:

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

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH 0/3] Transient errors in Direct I/O' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).