From: Matthew Wilcox <willy@infradead.org>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Amir Goldstein <amir73il@gmail.com>
Subject: Re: [PATCH 1/3] vfs: dedpue: return s64
Date: Mon, 7 May 2018 04:11:42 -0700 [thread overview]
Message-ID: <20180507111142.GA18116@bombadil.infradead.org> (raw)
In-Reply-To: <20180507082108.28186-2-mszeredi@redhat.com>
On Mon, May 07, 2018 at 10:21:06AM +0200, Miklos Szeredi wrote:
> f_op->dedupe_file_range() gets a u64 length to dedup and returns an ssize_t
> actual length deduped. This breaks badly on 32bit archs since the returned
> length will be truncated and possibly overflow into the sign bit (xfs and
> ocfs2 are affected, btrfs limits actual length to 16MiB).
>
> Returning s64 should be good, since clone_verify_area() makes sure that the
> supplied length doesn't overflow.
Why s64 rather than loff_t? Particularly since the next patch turns
the paramters into loff_t.
next prev parent reply other threads:[~2018-05-07 11:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 8:21 [PATCH 0/3] vfs: dedupe: cleanup API and implementation Miklos Szeredi
2018-05-07 8:21 ` [PATCH 1/3] vfs: dedpue: return s64 Miklos Szeredi
2018-05-07 11:11 ` Matthew Wilcox [this message]
2018-05-07 11:32 ` Miklos Szeredi
2018-05-07 12:17 ` Matthew Wilcox
2018-05-07 14:26 ` Miklos Szeredi
2018-05-07 8:21 ` [PATCH 2/3] vfs: dedupe: rationalize args Miklos Szeredi
2018-05-07 11:16 ` Matthew Wilcox
2018-05-07 11:36 ` Miklos Szeredi
2018-05-07 8:21 ` [PATCH 3/3] vfs: dedupe: extract helper for a single dedup Miklos Szeredi
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=20180507111142.GA18116@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=amir73il@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.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).