Inode structure - record rec_len?

499 Views Asked by At

I need to know how to exactly computed record rec_len. How it is count ?

enter image description here

1

There are 1 best solutions below

0
zerocool On

the inode is 4bytes + 1byte of the file_type + 1byte of the name_len + 2bytes of the rec_len + name data which is 1byte per character and the record must be padded to x4 ( 4 bytes boundaries ) that's why we add the "\0" for padding


for the first example . you have 4+1+1+2+4=12 and the same for others