mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	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 14:54:10 -0500	[thread overview]
Message-ID: <371f0acc-2385-f026-f017-b80cdce305f0@oracle.com> (raw)
In-Reply-To: <CA+55aFz9XrD49-w3OpUH-5amPgxqDMD9p3_fdtRt0kpqHKR84g@mail.gmail.com>

On 08/27/2017 02:47 PM, Linus Torvalds wrote:
> 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.

I'll submit a patch to clean up jfs.

Thanks,
Shaggy

> 
>                 Linus
> 

  reply	other threads:[~2017-08-27 19:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 19:15 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-27 19:47         ` Linus Torvalds
2017-08-27 19:54           ` Dave Kleikamp [this message]
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=371f0acc-2385-f026-f017-b80cdce305f0@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --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=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®