All of lore.kernel.org
 help / color / mirror / Atom feed
* mkfs'ing a 48-bit fs... or not.
@ 2011-10-03 21:55 Eric Sandeen
  2011-10-04  4:00 ` Ted Ts'o
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Eric Sandeen @ 2011-10-03 21:55 UTC (permalink / raw)
  To: ext4 development

Has anyone tried mke2fs at its limits?  The latest git tree seems to fail in several ways.
(Richard Jones reported the initial failure)

# truncate --size 1152921504606846976 reallybigfile 
# mke2fs -t ext4 reallybigfile

first,

Warning: the fs_type huge is not defined in mke2fs.conf

(when types "big" and "huge" got added, they never got a mke2fs.conf update?)

Then, I got:

reallybigfile: Not enough space to build proposed filesystem while setting up superblock


because:

        fs->group_desc_count = (blk_t) ext2fs_div64_ceil(
                ext2fs_blocks_count(super) - super->s_first_data_block,
                EXT2_BLOCKS_PER_GROUP(super));
        if (fs->group_desc_count == 0) {
                retval = EXT2_ET_TOOSMALL;

The div64_ceil returns > 2^32 (2^33, actually), and the cast to blk_t
(which should be dgrp_t?) turns that into a 0.

Trying it with "-O bigalloc" (which should be automatic at this size,
I think?) just goes away for a very long time, I'm not sure what it's
thinking about, or if it's in a loop somewhere (looking now).

I also came across this in ext2fs_initialize() in the bigalloc case:

                if (super->s_clusters_per_group > EXT2_MAX_CLUSTERS_PER_GROUP(super))
                        super->s_blocks_per_group = EXT2_MAX_CLUSTERS_PER_GROUP(super);
                super->s_blocks_per_group = EXT2FS_C2B(fs,
                                       super->s_clusters_per_group);

which seems to be incorrect; I doubt that you meant to set s_blocks_per_group under
a conditional, and then unconditionally set it immediately after.  I assume
that should be super->s_clusters_per_group in the first case?  I'll send a patch,
assuming so.

TBH I've kind of lost the thread on bigalloc, so just putting this out there for
now while I look into things a bit more.

-Eric

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-10-04 18:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 21:55 mkfs'ing a 48-bit fs... or not Eric Sandeen
2011-10-04  4:00 ` Ted Ts'o
2011-10-04  4:26   ` [PATCH 1/2] Add "big" and "huge" types to mke2fs.conf Theodore Ts'o
2011-10-04  4:27     ` [PATCH 2/2] libext2fs: fix bad cast which causes problems for file systems > 512EB Theodore Ts'o
2011-10-04 11:47       ` Eric Sandeen
2011-10-04 18:05         ` Ted Ts'o
2011-10-04 18:15           ` Eric Sandeen
2011-10-04  5:31   ` mkfs'ing a 48-bit fs... or not Andreas Dilger
2011-10-04  4:03 ` Eric Sandeen
2011-10-04  4:28   ` Ted Ts'o
2011-10-04  7:06 ` Richard W.M. Jones

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.