Re: [PATCH] ext4: Fix to read empty directory blocks correctly in 64k blocksize filesystems

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

 



On Feb 10, 2009  10:20 -0500, Theodore Ts'o wrote:
> The rec_len field in the directory entry is 16 bits, so there was a
> problem representing rec_len for filesystems with a 64k block size in
> the case where the directory entry takes the entire 64k block.
> Unfortunately, there were two schemes that were proposed; one where
> all zeros meant 65536 and one where all ones (65535) meant 65536.
> E2fsprogs used 0, whereas the kernel used 65535.  Oops.  Fortunately
> this case happens extremely rarely, with the most common case being
> the lost+found directory, created by mke2fs.
> 
> So we will be liberal in what we accept, and accept both encodings,
> but we will continue to encode 65536 as 65535.  This will require a
> change in e2fsprogs, but with fortunately ext4 filesystems normally
> have the dir_index feature enabled, which precludes having a
> completely empty directory block.

I'm glad that the MAX_REC_LEN value is being kept, because "0" is
too easily hit due to disk corruption.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, 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