linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
	torvalds@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] vfs: move generic_remap_checks out of mm
Date: Thu, 15 Oct 2020 09:39:34 -0700	[thread overview]
Message-ID: <20201015163934.GA9825@magnolia> (raw)
In-Reply-To: <20201015113826.GX20115@casper.infradead.org>

On Thu, Oct 15, 2020 at 12:38:26PM +0100, Matthew Wilcox wrote:
> On Wed, Oct 14, 2020 at 05:31:21PM -0700, Darrick J. Wong wrote:
> > I would like to move all the generic helpers for the vfs remap range
> > functionality (aka clonerange and dedupe) into a separate file so that
> > they won't be scattered across the vfs and the mm subsystems.  The
> > eventual goal is to be able to deselect remap_range.c if none of the
> > filesystems need that code, but the tricky part here is picking a
> > stable(ish) part of the merge window to rearrange code.
> 
> This makes sense to me.  There's nothing page-cache about this function.
> 
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index 99c49eeae71b..cf20e5aeb11b 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -3098,8 +3098,7 @@ EXPORT_SYMBOL(read_cache_page_gfp);
> >   * LFS limits.  If pos is under the limit it becomes a short access.  If it
> >   * exceeds the limit we return -EFBIG.
> >   */
> > -static int generic_write_check_limits(struct file *file, loff_t pos,
> > -				      loff_t *count)
> > +int generic_write_check_limits(struct file *file, loff_t pos, loff_t *count)
> >  {
> >  	struct inode *inode = file->f_mapping->host;
> >  	loff_t max_size = inode->i_sb->s_maxbytes;
> 
> I wonder if generic_write_check_limits should be in fs/read_write.c --
> it has nothing to do with the pagecache either.

Yeah, probably.

--D

  reply	other threads:[~2020-10-15 16:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  0:31 [PATCH 0/2] vfs: move the clone/dedupe/remap helpers to a single file Darrick J. Wong
2020-10-15  0:31 ` [PATCH 1/2] vfs: move generic_remap_checks out of mm Darrick J. Wong
2020-10-15 11:38   ` Matthew Wilcox
2020-10-15 16:39     ` Darrick J. Wong [this message]
2020-10-15  0:31 ` [PATCH 2/2] vfs: move the remap range helpers to remap_range.c Darrick J. Wong
2020-10-15  2:48 ` [PATCH 0/2] vfs: move the clone/dedupe/remap helpers to a single file Linus Torvalds
2020-10-15  3:18 ` Al Viro
2020-10-15 16:46   ` Darrick J. Wong
2020-10-15 16:42 ` [PATCH 3/2] vfs: move the generic write and copy checks out of mm Darrick J. Wong

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=20201015163934.GA9825@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=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).