gexto icon indicating copy to clipboard operation
gexto copied to clipboard

Support 256 inode size

Open luxas opened this issue 6 years ago • 2 comments

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!

luxas avatar Feb 22 '19 19:02 luxas

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.

ayushr2 avatar Jun 18 '19 18:06 ayushr2

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.

ayushr2 avatar Jun 18 '19 20:06 ayushr2