From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Doug Nazar <nazard@nazar.ca>, Al Viro <viro@zeniv.linux.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Wei Fang <fangwei1@huawei.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Mark Fasheh <mfasheh@versity.com>,
Joel Becker <jlbec@evilplan.org>,
Dave Kleikamp <shaggy@kernel.org>
Subject: Re: Kernels v4.9+ cause short reads of block devices
Date: Sun, 27 Aug 2017 12:47:03 -0700 [thread overview]
Message-ID: <CA+55aFz9XrD49-w3OpUH-5amPgxqDMD9p3_fdtRt0kpqHKR84g@mail.gmail.com> (raw)
In-Reply-To: <FCA4A132-E6E1-4568-8A89-3DE441F189AB@dilger.ca>
On Wed, Aug 23, 2017 at 2:01 PM, Andreas Dilger <adilger@dilger.ca> wrote:
>
> Doug,
> I noticed while checking for other implications of changing MAX_LFS_FILESIZE
> that fs/jfs/super.c is also working around this limit.
Note to people: I just committed the patch to update MAX_LFS_FILESIZE.
I made it use the simpler (and clearer) calculation of
((loff_t)ULONG_MAX << PAGE_SHIFT)
for the 32-bit case, and I did *not* change any other users.
The jfs comment was a bit confusing, and talks about "wraps around" at
8TB, when that actually happens at 16TB. Yes, if you use a signed
number for the index, it does wrap at 8TB, but you really shouldn't
(and the code the jfs comment points to doesn't).
So I didn't touch that. Nor did I touch:
> it also makes sense to fix jfs_fill_super() to
> use MAX_LFS_FILESIZE instead of JFS rolling its own, something like:
>
> /* logical blocks are represented by 40 bits in pxd_t, etc.
> * and page cache is indexed by long. */
> sb->s_maxbytes = min((u64)sb->s_blocksize) << 40,
> MAX_LFS_FILESIZE);
which I agree should be modified. The new MAX_LFS_FILESIZE should be
the right size, but the difference now is only one page less one byte.
Linus
next prev parent reply other threads:[~2017-08-27 19:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 19:15 Kernels v4.9+ cause short reads of block devices Doug Nazar
2017-08-23 19:37 ` Linus Torvalds
2017-08-23 19:53 ` Doug Nazar
2017-08-23 20:13 ` Linus Torvalds
2017-08-23 21:01 ` Andreas Dilger
2017-08-24 10:20 ` Doug Nazar
2017-08-24 15:22 ` Dave Kleikamp
2017-08-24 15:22 ` Dave Kleikamp
2017-08-27 19:47 ` Linus Torvalds [this message]
2017-08-27 19:54 ` Dave Kleikamp
2017-08-29 10:40 ` Doug Nazar
2017-08-24 10:03 ` Doug Nazar
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=CA+55aFz9XrD49-w3OpUH-5amPgxqDMD9p3_fdtRt0kpqHKR84g@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=adilger@dilger.ca \
--cc=fangwei1@huawei.com \
--cc=jlbec@evilplan.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@versity.com \
--cc=nazard@nazar.ca \
--cc=shaggy@kernel.org \
--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 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.