Re: [PATCH V2] fix mballoc oopses on mkdir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Aug 28, 2007  00:25 -0500, Eric Sandeen wrote:
> Tried out Ted's git tree + all pending patches today, and 
> immediately oopsed on a mkdir thanks to this in 
> ext4_mb_new_group_pa()
> 
> 	BUG_ON(!S_ISREG(ac->ac_inode->i_mode));

Ah, yes.  We never enable mballoc on the MDS (metadata server), and the
OST (object storage target) never creates directories with extents
(it is usually less efficient because of fragmented allocation of the
directory blocks).  We don't have any > 32-bit block support so that
isn't an issue as yet.

We might consider:
(a) disabling extents on directories unless the fs is huge (say > 2^30 blocks)
    and likely to have directories with blocks > 2^32
(b) preallocating 4 blocks to each directory (wasteful of space for small
    dirs), but would be good for larger directories
(c) make a decision when a file grows past EXT4_NDIR_BLOCKS logical blocks
    whether it should be block mapped or extent mapped based on sequential
    vs random block layout

Some combination of the above.

> (there are 54 BUGs and BUG_ONs in this file...!)

Yes, we like lots of assertions in our code, because it is exceedingly
complex to debug otherwise.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux