Re: [PATCH] dir_index: error out instead of BUG on corrupt hash dir limit

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

 



On Aug 10, 2007  13:39 -0500, Eric Sandeen wrote:
> Andreas Dilger wrote:
> > It would be interesting to check if mounting a dir_index filesystem on
> > linux with ext2 has the same problem.  It _should_ have been that 
> > if rec_len % 4 == 0 (i.e. any valid dirent) we would fail the hash_version
> > check, but we left in the DX_HASH_LEGACY (0) and that check is blown.
> 
> Hmmm...
> 
> > The unused_flags & 1 is only hit for a dirent with DT_FIFO (no good).
> > The remaining check is indirect_levels > 1, which should be hit for
> > any dirent with name_len > 1 (i.e. most, but not all).
> > 
> > So, I think you could reproduce this in linux by making an indexed directory
> > in ext3/4, mounting it as ext2, and then creating a 1-character filename
> > in the directory, or any length filename and then deleting it.
> 
> With those quick tests I don't see any problems... you may be giving the
> windows driver too much credit here.  :)

Ah, true - I forgot about the "EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;"
line that has existed since time immemorial in ext2.  Isn't foresight
a wonderful thing.

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