From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
"Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [git pull] vfs.git pile 2
Date: Sun, 18 Dec 2016 03:26:12 +0000 [thread overview]
Message-ID: <20161218032605.GW1555@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFwdh+VBdNY_gHc+CKMDznBwft+THQE9jBwfSojqOf72BQ@mail.gmail.com>
[Darrick Cc'd]
On Sat, Dec 17, 2016 at 06:49:55PM -0800, Linus Torvalds wrote:
> On Fri, Dec 16, 2016 at 2:12 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> > In this pile:
> > * autofs-namespace series
> > * dedupe stuff
> > * more struct path constification
>
> When looking at the conflict, I looked at that part of
> vfs_clone_file_prep_inodes(), and reacted to the insanity.
>
> WTF?
>
> /* Zero length dedupe exits immediately; reflink goes to EOF. */
> if (*len == 0) {
> if (is_dedupe) {
> *len = 0;
> return 0;
> }
> *len = isize - pos_in;
> }
>
> I'll just leave you to read through that part a bit more. Because
> there are two completely insane things going on in that code sequence.
One, AFAICS - pointless *len = 0 in case of is_dedupe. That's a counterpart of
/* Zero length dedupe exits immediately; reflink goes to EOF. */
if (len == 0) {
if (is_dedupe) {
ret = 0;
goto out_unlock;
}
len = isize - pos_in;
}
in mainline xfs_reflink_remap_range(). What else am I missing there?
I'm not thrilled with the calling conventions they'd used, and that
*len = 0; shouldn't have been slapped there (at a guess, by inertia from
the conversion of the chunk right before that one -
/* Are we going all the way to the end? */
isize = i_size_read(inode_in);
if (isize == 0) {
ret = 0;
goto out_unlock;
}
in mainline, needing *len = 0; after conversion), but I don't see what else
are you refering to in that snippet...
next prev parent reply other threads:[~2016-12-18 3:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 22:12 [git pull] vfs.git pile 2 Al Viro
2016-12-16 22:12 ` Al Viro
2016-12-18 2:49 ` Linus Torvalds
2016-12-18 3:26 ` Al Viro [this message]
2016-12-18 3:34 ` Linus Torvalds
2016-12-18 4:06 ` Al Viro
2016-12-18 23:40 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2017-03-02 12:38 [git pull] vfs.git, " Al Viro
2014-12-15 23:51 [git pull] vfs.git " Al Viro
2014-12-16 13:33 ` Al Viro
2014-12-16 18:06 ` Al Viro
2013-05-04 20:23 Al Viro
2012-10-12 1:19 [git pull] vfs.git, " Al Viro
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=20161218032605.GW1555@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=darrick.wong@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 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.