From: John Garry <john.g.garry@oracle.com>
To: "Darrick J. Wong" <djwong@kernel.org>, Christoph Hellwig <hch@lst.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Chandan Babu R <chandan.babu@oracle.com>,
Hongbo Li <lihongbo22@huawei.com>,
Ryusuke Konishi <konishi.ryusuke@gmail.com>,
linux-nilfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] xfs: report the correct read/write dio alignment for reflinked inodes
Date: Tue, 7 Jan 2025 09:00:11 +0000 [thread overview]
Message-ID: <e2ed4bf1-fe55-4d22-b55c-ca230307e186@oracle.com> (raw)
In-Reply-To: <20250107070355.GH6174@frogsfrogsfrogs>
On 07/01/2025 07:03, Darrick J. Wong wrote:
> On Tue, Jan 07, 2025 at 07:10:12AM +0100, Christoph Hellwig wrote:
>> On Mon, Jan 06, 2025 at 06:37:06PM +0000, John Garry wrote:
>>>> + /*
>>>> + * On COW inodes we are forced to always rewrite an entire file system
>>>> + * block or RT extent.
>>>> + *
>>>> + * Because applications assume they can do sector sized direct writes
>>>> + * on XFS we fall back to buffered I/O for sub-block direct I/O in that
>>>> + * case. Because that needs to copy the entire block into the buffer
>>>> + * cache it is highly inefficient and can easily lead to page cache
>>>> + * invalidation races.
>>>> + *
>>>> + * Tell applications to avoid this case by reporting the natively
>>>> + * supported direct I/O read alignment.
>>>
>>> Maybe I mis-read the complete comment, but did you really mean "natively
>>> supported direct I/O write alignment"? You have been talking about writes
>>> only, but then finally mention read alignment.
>>
>> No, this is indeed intended to talk about the different (smaller) read
>> alignment we are now reporting. But I guess the wording is confusing
>> enough that I should improve it?
I know what you are saying, but I found the last paragraph odd. All
along we talk about writes, but then conclude by mentioning reads (and
not writes at all).
>
> How about:
>
> /*
> * For COW inodes, we can only perform out of place writes of entire
> * file allocation units (clusters). For a sub-cluster directio write,
> * we must fall back to buffered I/O to perform the RMW. At best this
> * is highly inefficient; at worst it leads to page cache invalidation
> * races. Tell applications to avoid this by reporting separately the
> * read and (larger) write alignments.
yeah, that ending is better, but maybe Christoph wants to keep the more
wordy original previous paragraphs.
> */
>
> --D
>
next prev parent reply other threads:[~2025-01-07 9:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 15:15 add STATX_DIO_READ_ALIGN Christoph Hellwig
2025-01-06 15:15 ` [PATCH 1/4] fs: reformat the statx definition Christoph Hellwig
2025-01-06 16:28 ` Jan Kara
2025-01-06 15:15 ` [PATCH 2/4] fs: add STATX_DIO_READ_ALIGN Christoph Hellwig
2025-01-06 16:32 ` Jan Kara
2025-01-06 16:40 ` Christoph Hellwig
2025-01-06 15:15 ` [PATCH 3/4] xfs: cleanup xfs_vn_getattr Christoph Hellwig
2025-01-06 17:07 ` John Garry
2025-01-06 15:15 ` [PATCH 4/4] xfs: report the correct read/write dio alignment for reflinked inodes Christoph Hellwig
2025-01-06 17:33 ` Darrick J. Wong
2025-01-06 18:37 ` John Garry
2025-01-07 6:10 ` Christoph Hellwig
2025-01-07 7:03 ` Darrick J. Wong
2025-01-07 9:00 ` John Garry [this message]
2025-01-06 15:19 ` [PATCH] statx.2: document STATX_DIO_READ_ALIGN Christoph Hellwig
2025-01-06 17:40 ` Darrick J. Wong
2025-01-06 18:09 ` Christoph Hellwig
2025-01-06 19:09 ` Darrick J. Wong
2025-01-06 22:01 ` Alejandro Colomar
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=e2ed4bf1-fe55-4d22-b55c-ca230307e186@oracle.com \
--to=john.g.garry@oracle.com \
--cc=brauner@kernel.org \
--cc=chandan.babu@oracle.com \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=konishi.ryusuke@gmail.com \
--cc=lihongbo22@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=linux-xfs@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 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).