gexto
gexto copied to clipboard
Support 256 inode size
Hi,
Thanks for this great library! How easy/hard would it be to start supporting 256 inode size instead of only 128? That'd be awesome to have
Cheers!
I think the library does have support for 256 inode size. What makes you say it does not?
Ext2/3 had 128 inode size but ext4 introduced the new inode struct which is 156 bytes. Ext4 inode records are 256 bytes and that is determined when the filesystem is created. The extra gap (256 - 156 = 100 bytes) in the inode records can be used to store extended attributes. This doc explains this pretty well.
So if you look at this line, int64(fs.sb.Inode_size) over here would resolve to 256 IF the filesystem being used in ext4. ext2/3 only support 128 sized inodes.