lkml.org 
[lkml]   [2006]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Ext2-devel] [RFC 1/2] ext3: enlarge blocksize and fix rec_lenoverflow
Date
Hi,

> 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.

Oh, that's right.

> 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.

What does "64 bytes" mean?
Do you mean that the following dummy entry should be added
at the tail of the directory block?

struct ext3_dir_entry_2 {
__le32 inode = 0
__le16 rec_len = 16
__u8 name_len = 4
__u8 file_type = 0
char name = "dir_end"
};

Cheers, sho
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-29 12:49    [W:0.077 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site