From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: jfs-discussion@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org,
"Darrick J . Wong" <djwong@kernel.org>,
linux-ext4@vger.kernel.org, Jan Kara <jack@suse.com>
Subject: generic_quota_read
Date: Fri, 3 Jun 2022 15:40:13 +0100 [thread overview]
Message-ID: <YpodTd+YN/FtiaP3@casper.infradead.org> (raw)
In-Reply-To: <YpBlF2xbfL2yY98n@infradead.org>
On Thu, May 26, 2022 at 10:43:51PM -0700, Christoph Hellwig wrote:
> > static ssize_t jfs_quota_read(struct super_block *sb, int type, char *data,
> > + size_t len, loff_t pos)
>
> And this whole helper is generic now. It might be worth to move it
> into fs/quota/dquot.c as generic_quota_read.
I've been working on that this week. Unfortunately, you have to convert
both quota_read and quota_write at the same time, it turns out. At
least ext4_quota_write() uses the bdev's inode's page cache to back
the buffer_heads, so quota_read() and quota_write() are incoherent
with each other:
00017 gqr: mapping:00000000ee19acfb index:0x1 pos:0x1470 len:0x30
00017 4qw: mapping:000000007f9a811e index:0x18405 pos:0x1440 len:0x30
I don't know if there's a way around this. Can't really use
read_mapping_folio() on the bdev's inode in generic_quota_read() -- the
blocks for a given page might be fragmented on disk. I don't know
if there's a way to tell ext4_bread() to use the inode's page cache
instead of the bdev's. And if we did that, would it even work as
being part of a transaction?
next parent reply other threads:[~2022-06-03 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220526192910.357055-1-willy@infradead.org>
[not found] ` <20220526192910.357055-8-willy@infradead.org>
[not found] ` <YpBlF2xbfL2yY98n@infradead.org>
2022-06-03 14:40 ` Matthew Wilcox [this message]
2022-06-06 7:37 ` generic_quota_read Jan Kara
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=YpodTd+YN/FtiaP3@casper.infradead.org \
--to=willy@infradead.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-ext4@vger.kernel.org \
--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