All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: Jeff Layton <jlayton@kernel.org>,
	linux-cachefs@redhat.com, idryomov@gmail.com, pfmeec@rit.edu,
	ceph-devel@vger.kernel.org, Andrew W Elble <aweits@rit.edu>
Subject: Re: [PATCH] netfs: fix test for whether we can skip read when writing beyond EOF
Date: Mon, 14 Jun 2021 12:51:05 +0100	[thread overview]
Message-ID: <YMdCqWtMVpwYKaj2@casper.infradead.org> (raw)
In-Reply-To: <338981.1623665093@warthog.procyon.org.uk>

On Mon, Jun 14, 2021 at 11:04:53AM +0100, David Howells wrote:
> (btw, can offset_in_thp() have it's second arg renamed to 'pos', not just 'p'?
>  'p' is normally used to indicate a pointer of some sort).

the argument is sometimes a pointer.  for example:

arch/arm64/kernel/mte.c:                offset = offset_in_page(addr);
fs/jbd2/commit.c:               (void *)(addr + offset_in_page(bh->b_data)), bh->b_size);

yes, those are offset_in_page(), not offset_in_thp(), but i'll bet
you a cadbury's creme egg that we find someone who needs to use
offset_in_thp() (or offset_in_folio()) on a pointer within three years.

  parent reply	other threads:[~2021-06-14 11:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13 23:33 [PATCH] netfs: fix test for whether we can skip read when writing beyond EOF Jeff Layton
2021-06-14  0:08 ` Matthew Wilcox
2021-06-14  9:50 ` David Howells
2021-06-14 10:04 ` David Howells
2021-06-14 11:35   ` Jeff Layton
2021-06-14 11:45   ` David Howells
2021-06-14 11:58     ` Matthew Wilcox
2021-06-14 11:51   ` Matthew Wilcox [this message]
2021-06-14 10:19 ` David Howells
2021-06-14 10:23 ` David Howells
2021-06-14 12:25 ` David Howells
2021-06-14 12:31   ` Jeff Layton
2021-06-14 12:54   ` Matthew Wilcox

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=YMdCqWtMVpwYKaj2@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=aweits@rit.edu \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dhowells@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cachefs@redhat.com \
    --cc=pfmeec@rit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.