cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v3 2/3] iomap: Don't create iomap_page objects for inline files
Date: Wed, 7 Jul 2021 15:28:47 +0100	[thread overview]
Message-ID: <YOW6Hz0/FgQkQDgm@casper.infradead.org> (raw)
In-Reply-To: <20210707115524.2242151-3-agruenba@redhat.com>

On Wed, Jul 07, 2021 at 01:55:23PM +0200, Andreas Gruenbacher wrote:
> @@ -252,6 +253,7 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
>  	}
>  
>  	/* zero post-eof blocks as the page may be mapped */
> +	iop = iomap_page_create(inode, page);
>  	iomap_adjust_read_range(inode, iop, &pos, length, &poff, &plen);
>  	if (plen == 0)
>  		goto done;

I /think/ a subsequent patch would look like this:

+	/* No need to create an iop if the page is within an extent */
+	loff_t page_pos = page_offset(page);
+	if (pos > page_pos || pos + length < page_pos + page_size(page))
+		iop = iomap_page_create(inode, page);

but that might miss some other reasons to create an iop.



  reply	other threads:[~2021-07-07 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 11:55 [Cluster-devel] [PATCH v3 0/3] iomap: small block problems Andreas Gruenbacher
2021-07-07 11:55 ` [Cluster-devel] [PATCH v3 1/3] iomap: Permit pages without an iop to enter writeback Andreas Gruenbacher
2021-07-09  4:23   ` Darrick J. Wong
2021-07-07 11:55 ` [Cluster-devel] [PATCH v3 2/3] iomap: Don't create iomap_page objects for inline files Andreas Gruenbacher
2021-07-07 14:28   ` Matthew Wilcox [this message]
2021-07-09  4:27     ` Darrick J. Wong
2021-07-09  6:21       ` Christoph Hellwig
2021-07-09 12:01       ` Matthew Wilcox
2021-07-09  4:28   ` Darrick J. Wong
2021-07-09  6:20   ` Christoph Hellwig
2021-07-07 11:55 ` [Cluster-devel] [PATCH v3 3/3] iomap: Don't create iomap_page objects in iomap_page_mkwrite_actor Andreas Gruenbacher
2021-07-07 14:03   ` Matthew Wilcox
2021-07-09  4:29   ` Darrick J. Wong
2021-07-09 11:07     ` Andreas Gruenbacher
2021-07-09  6:22   ` Christoph Hellwig

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=YOW6Hz0/FgQkQDgm@casper.infradead.org \
    --to=willy@infradead.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).