Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1720913

Re: Kernels v4.9+ cause short reads of block devices

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: Kernels v4.9+ cause short reads of block devices
Date 2017-08-27 21:50 +0200
Message-ID <ujbJf-3FY-1@gated-at.bofh.it> (permalink)
References <uhJFq-4ES-55@gated-at.bofh.it> <uhJFq-4ES-53@gated-at.bofh.it> <uhJYK-4LE-15@gated-at.bofh.it> <uhKi6-59l-17@gated-at.bofh.it> <uhL4v-5FB-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Kernels v4.9+ cause short reads of block devices Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-27 21:50 +0200
  Re: Kernels v4.9+ cause short reads of block devices Dave Kleikamp <dave.kleikamp@oracle.com> - 2017-08-27 22:00 +0200
  Re: Kernels v4.9+ cause short reads of block devices Doug Nazar <nazard@nazar.ca> - 2017-08-29 12:50 +0200

csiph-web