linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Christoph Hellwig <hch@lst.de>
Cc: zhengbin <zhengbin13@huawei.com>,
	Goldwyn Rodrigues <rgoldwyn@suse.com>, Jan Kara <jack@suse.cz>,
	Jens Axboe <axboe@kernel.dk>,
	akpm@linux-foundation.org, darrick.wong@oracle.com,
	amir73il@gmail.com, david@fromorbit.com, hannes@cmpxchg.org,
	jrdr.linux@gmail.com, hughd@google.com, linux-mm@kvack.org,
	houtao1@huawei.com, yi.zhang@huawei.com
Subject: Re: [PATCH] mm/filemap: pass inclusive 'end_byte' parameter to filemap_range_has_page
Date: Fri, 1 Feb 2019 11:32:27 -0800	[thread overview]
Message-ID: <20190201193227.GA11123@bombadil.infradead.org> (raw)
In-Reply-To: <20190201074359.GA15026@lst.de>

On Fri, Feb 01, 2019 at 08:43:59AM +0100, Christoph Hellwig wrote:
> On Mon, Jan 28, 2019 at 12:18:05PM -0800, Matthew Wilcox wrote:
> > On Mon, Jan 28, 2019 at 08:31:19PM +0800, zhengbin wrote:
> > > The 'end_byte' parameter of filemap_range_has_page is required to be
> > > inclusive, so follow the rule.
> > 
> > Reviewed-by: Matthew Wilcox <willy@infradead.org>
> > Fixes: 6be96d3ad34a ("fs: return if direct I/O will trigger writeback")
> > 
> > Adding the people in the sign-off chain to the Cc.
> 
> This looks correct to me:
> 
> Acked-by: Christoph Hellwig <hch@lst.de>
> 
> I wish we'd kill these stupid range calling conventions, though - 
> offset + len is a lot more intuitive, and we already use it very
> widely all over the kernel.

It has its own problems though; you have to check that offset + len -
1 doesn't wrap past zero.  Really, it's the transition from (offset,
len) to (min, max) that needs to be avoided as much as possible within
a subsystem.


      parent reply	other threads:[~2019-02-01 19:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 12:31 [PATCH] mm/filemap: pass inclusive 'end_byte' parameter to filemap_range_has_page zhengbin
2019-01-28 12:31 ` zhengbin
2019-01-28 20:18 ` Matthew Wilcox
2019-02-01  7:43   ` Christoph Hellwig
2019-02-01 15:14     ` Jens Axboe
2019-02-01 19:32     ` Matthew Wilcox [this message]

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=20190201193227.GA11123@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=amir73il@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hannes@cmpxchg.org \
    --cc=hch@lst.de \
    --cc=houtao1@huawei.com \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=rgoldwyn@suse.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhengbin13@huawei.com \
    /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).