linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org,
	dhowells@redhat.com, marc.dionne@auristor.com,
	viro@zeniv.linux.org.uk
Subject: Re: [PATCH] vfs/dedupe: Pass file pointer to read_mapping_page
Date: Tue, 11 May 2021 19:33:52 +0100	[thread overview]
Message-ID: <YJrOEAnWxOrEgNz+@casper.infradead.org> (raw)
In-Reply-To: <20210511154056.GA8543@magnolia>

On Tue, May 11, 2021 at 08:40:56AM -0700, Darrick J. Wong wrote:
> > -static int vfs_dedupe_file_range_compare(struct inode *src, loff_t srcoff,
> > -					 struct inode *dest, loff_t destoff,
> > +static int vfs_dedupe_file_range_compare(struct file *src, loff_t srcoff,
> > +					 struct file *dst, loff_t destoff,
> 
> I kinda wish you'd maintained the name pairing here.  Why does destoff
> go with dst instead of dst/dstoff or dest/destoff?
> 
> FWIW I try to vary the name lengths for similar variables these days,
> because while my eyes are /fairly/ quick to distingiush 's' and 'd',
> they're even faster if the width of the entire word is different.
> 
> (And yes, I had to break myself of the 'columns-must-line-up' habit.)
> 
> Using this method I've caught a few stupid variable name mixups in the
> exchange-range code by doing a quick scan while ld takes an eternity to
> link vmlinux together.

OK, if that's a preference you have, I'll redo it.  I have a later patch
as part of the folio work which rename destfoo to dstfoo, but now I know
that's a preference you have, I'll go back to dest.

> That aside, passing file pointers in seems like a good idea to me.

Cheers.  v2 coming up.

      reply	other threads:[~2021-05-11 18:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 14:56 [PATCH] vfs/dedupe: Pass file pointer to read_mapping_page Matthew Wilcox (Oracle)
2021-05-11 15:40 ` Darrick J. Wong
2021-05-11 18:33   ` 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=YJrOEAnWxOrEgNz+@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).