linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Christoph Hellwig <hch@infradead.org>,
	"Darrick J . Wong" <djwong@kernel.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Gao Xiang <xiang@kernel.org>
Subject: [PATCH 0/2] folio_copy_tail
Date: Fri,  3 Mar 2023 06:43:13 +0000	[thread overview]
Message-ID: <20230303064315.701090-1-willy@infradead.org> (raw)

I'm trying to make it easy & efficient for a filesystem to read its file
tails into a folio.  iomap's implementation was pretty good, but had
some limitations (eg tails couldn't cross a page boundary).

This should be an all-singing, all-dancing implementation which copies
the correct part of the buffer into the correct part of the folio and
zeroes the remainder of the folio.  It should work with highmem, but
the calculations are a bit tricky and I may have got something wrong.

For some reason I'm currently running an XFS test against it, even
though I know XFS doesn't support inline data.  If there's good feedback,
I'll take a look at converting udf_adinicb_readpage() and other similar
functions.

Matthew Wilcox (Oracle) (2):
  filemap: Add folio_copy_tail()
  iomap: Use folio_copy_tail()

 fs/iomap/buffered-io.c  | 23 +++++------------
 include/linux/pagemap.h |  1 +
 mm/filemap.c            | 56 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 17 deletions(-)

-- 
2.39.1


             reply	other threads:[~2023-03-03  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  6:43 Matthew Wilcox (Oracle) [this message]
2023-03-03  6:43 ` [PATCH 1/2] filemap: Add folio_copy_tail() Matthew Wilcox (Oracle)
2023-03-03 12:05   ` kernel test robot
2023-03-03  6:43 ` [PATCH 2/2] iomap: Use folio_copy_tail() Matthew Wilcox (Oracle)

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=20230303064315.701090-1-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=agruenba@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xiang@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;
as well as URLs for NNTP newsgroup(s).