Bug 485236 - with -b N and block count, mkfs.ext4 fails with dev-too-big
Summary: with -b N and block count, mkfs.ext4 fails with dev-too-big
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: 11
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Valerie Aurora Henson
QA Contact: Fedora Extras Quality Assurance
URL: http://thread.gmane.org/gmane.comp.fi...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-12 15:29 UTC by Jim Meyering
Modified: 2013-03-13 20:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-28 11:15:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jim Meyering 2009-02-12 15:29:51 UTC
Description of problem:
[this is on rawhide: mke2fs 1.41.4 (27-Jan-2009)
        Using EXT2FS Library version 1.41.4 ]

FWIW, I was trying to create an ext4 file system with more than 2^32
blocks to demonstrate a parted bug fix, but with the particular device
I was using, I couldn't even create one with 2^31-1 blocks.

When I try to create an ext4 file system specifying both block size and
the number of blocks, the size of the underlying device should not matter,
as long as it is large enough.

However, when the underlying device too large, it fails like this:

Set-up: Create a 10TB sparse device called /dev/mapper/s1 with
/dev/sdb6 (just ~20GB) for backing store:

  N=$(echo '10*2*1024^3'|bc)
  echo "0 $N zero" | dmsetup create zero1
  echo "0 $N snapshot /dev/mapper/zero1 /dev/sdb6 p 128" | dmsetup create s1

Try to create an ext4 file system with 2^31-1 1024-byte blocks:
(note that I specify an explicit number of blocks)

  # mkfs.ext4 -b 1024 /dev/mapper/s1 $(echo '2*1024^3-1'|bc|tee /dev/tty)
  2147483647
  mke2fs 1.41.4 (27-Jan-2009)
  mkfs.ext4: Size of device /dev/mapper/s1 too big to be expressed in 32 bits
          using a blocksize of 4096.
  [Exit 1]

I can understand failing like that when the "blocks-count" argument
is omitted, because then we're asking mkfs.ext4 to use the entire
device.

Version-Release number of selected component (if applicable):
mke2fs 1.41.4 (27-Jan-2009)

How reproducible: always


Steps to Reproduce: see above
  
Actual results: mkfs.ext4 fails


Expected results: it succeeds


Additional info:

Comment 1 Bug Zapper 2009-06-09 11:18:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Eric Sandeen 2009-07-30 21:35:04 UTC
Val has fixed this upstream, it's wending its way through Ted's branches:

commit 7eca8515425e697e56cafafe3264bb915282751a
Author: Valerie Aurora Henson <vaurora>
Date:   Mon Jun 1 16:15:40 2009 -0400

    Fix bug in selecting fs type, resulting in 1K blocksize
    
    One of the previous 64-bit patches (20ce9ade: 64-bit mke2fs cleanup,top
    of the 'js/new-64-bit' branch) moved the fs type and feature detection
    code to precede the determination of the device size so that we could
    check the 64bit flag if the device size would overflow 32 bits.
    Unfortunately, the fs type code uses the device size to determine the
    default set of parameters, and since the device size wasn't set yet, it
    was clearly "small enough" to fit the floppy profile.
    
    The solution is a bit complex.  One problem is that you can't set the
    blocks count to > 32 bits if the 64bit feature isn't enabled.  So I
    created a function to automatically set the 64bit feature if
    necessary.  After we parse the user supplied options, I check if the
    64bit feature has been disabled and bail out then.
    
    Signed-off-by: Valerie Aurora Henson <vaurora>
    Signed-off-by: "Theodore Ts'o" <tytso>

Comment 3 Eric Sandeen 2009-07-30 21:37:38 UTC
Since Val actually fixed this one upstream I'm going to put it on her plate; Val, closing it as UPSTREAM is probably ok, although we should make sure it doesn't get lost, and to that end perhaps keeping it open would be good.

maaaaaybe a regression test in e2fsprogs would be good?  We could make a sparse 10T file on ext4 to do the test w/o needing dm ....

Just a thought :)

-Eric

Comment 4 Bug Zapper 2010-04-27 12:57:05 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2010-06-28 11:15:56 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Eric Sandeen 2010-06-29 17:33:06 UTC
Eh, just marking this CLOSED/RAWHIDE since it did get fixed upstream.


Note You need to log in before you can comment on or make changes to this bug.