From: Christoph Hellwig <hch@infradead.org>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
Christoph Hellwig <hch@infradead.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: silent truncation for large file offsets
Date: Mon, 8 Feb 2016 11:58:06 -0800 [thread overview]
Message-ID: <20160208195806.GA16422@infradead.org> (raw)
In-Reply-To: <CAHQdGtRN16=oYbsgtf_XEpxyWpz-H8+u6j2ekckqumiHh5Yv7g@mail.gmail.com>
On Mon, Feb 08, 2016 at 02:45:54PM -0500, Trond Myklebust wrote:
> I'll bet it's this:
>
> static inline loff_t nfs_size_to_loff_t(__u64 size)
> {
> if (size > (__u64) OFFSET_MAX - 1)
> return OFFSET_MAX - 1;
> return (loff_t) size;
> }
>
> Should be "return OFFSET_MAX", no?
Yes. That (or rather a slighty nicer version using min_t) fixes the
test case for me.
prev parent reply other threads:[~2016-02-08 19:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-08 18:33 silent truncation for large file offsets Christoph Hellwig
2016-02-08 19:30 ` J. Bruce Fields
2016-02-08 19:45 ` Trond Myklebust
2016-02-08 19:54 ` J. Bruce Fields
2016-02-08 20:04 ` Trond Myklebust
2016-02-08 19:58 ` Christoph Hellwig [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=20160208195806.GA16422@infradead.org \
--to=hch@infradead.org \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.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).