4

Why directory record length is variable in ext2 filesystem?

view full story
linux-howto

http://www.linuxquestions.org – Hi, The declaration for directory record length in ext2 filesystem is as follows: Code: #define EXT2_NAME_LEN 255 struct ext2_dir_entry_2 {   __u32 inode;      /* Inode number */   __u16 rec_len;    /* Directory entry length */   __u8  name_len;  /* Name length */   __u8  file_type;   char  name[EXT2_NAME_LEN];  /* File name */ }; Some say because the record is not in a fixed length so rec_len is the real record length. Why is the length of the array `name' not fixed? I thought C arrays like this should be fixed (HowTos)