On Sat 10-11-07 19:37:03, Theodore Tso wrote: > On Wed, Nov 07, 2007 at 05:09:39PM +0100, Jan Kara wrote: > > > Subject: Support for 64KB blocksize in ext2-4 directories. > > > > When block size is 64KB, we have to take care that rec_len does not overflow. > > Kernel stores 0xffff in case 0x10000 should be stored - perform appropriate > > conversion when reading from / writing to disk. > > NACK. You can't do the conversion in the reader/writer routines > because the fundamentally rec_len is only a 16 bit field. So when you > read a directory block where the rec_len field is encoded as 0xFFFF, > and you translate it to 0x10000, when you assign it to > dirent->rec_len, the 0x10000 gets chopped off and rec_len gets a value > of zero. Did you test this patch before submitting it? Argh, stupid me. I've just tested that I didn't break anything for normal block size and thought that I cannot make mistake in such a simple thing ;). > The only way to do this is to find all of the places that reference > rec_len, and do the check there. Yes.. Thanks for having look. Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR - 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