linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] mke2fs: fix check for absurdly large devices
Date: Sun, 5 May 2019 18:34:38 -0400	[thread overview]
Message-ID: <20190505223438.GD10038@mit.edu> (raw)
In-Reply-To: <1556227470-47076-1-git-send-email-adilger@dilger.ca>

On Thu, Apr 25, 2019 at 11:24:30PM +0200, Andreas Dilger wrote:
> The check in mke2fs is intended to be for the number of blocks in the
> filesystem exceeding the maximum number of addressable blocks in 2^32
> bitmaps, which is (2^32 * 8 bits/byte * blocksize) = 2^47 blocks,
> or 2^59 bytes = 512PiB for the common 4KiB blocksize.
> 
> However, s_log_blocksize holds log2(blocksize_in_kb), so the current
> calculation is a factor of 2^10 too small.  This caused mke2fs to fail
> while trying to format a 900TB filesystem.
> 
> Fixes: 101ef2e93c25 ("mke2fs: Avoid crashes / infinite loops for absurdly large devices")
> Signed-off-by: Andreas Dilger <adilger@dilger.ca>

Thanks, applied.

					- Ted

      reply	other threads:[~2019-05-05 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 21:24 [PATCH] mke2fs: fix check for absurdly large devices Andreas Dilger
2019-05-05 22:34 ` Theodore Ts'o [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=20190505223438.GD10038@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    /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).