Re: [RFC 1/2] ext3: enlarge blocksize and fix rec_len overflow
Daniel Phillips <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.comp.file-systems.ext2.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Andreas, Andreas Dilger wrote: > On Jun 28, 2006 17:50 +0200, Johann Lombardi wrote: >>ext2/ext3_dir_entry_2 has a 16-bit entry(rec_len) and it would overflow >>with 64KB blocksize. This patch prevent from overflow by limiting >>rec_len to 65532. > > Having a max rec_len of 65532 is rather unfortunate, since the dir > blocks always need to filled with dir entries. 65536 - 65532 = 4, and > the minimum ext3_dir_entry size is 8 bytes. I would instead make this > maybe 64 bytes less so that there is room for a filename in the "tail" > dir_entry. Then why not introduce a little symmetry by making max rec_len 2**15 and treat big directory blocks as an array of smaller ones? I dimly recall the page-cache oriented Ext2 dir code already does this. Regards, Daniel