• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

How to store “extended attributes” in ext4 inode block as we have inode extra size “i_extra_isize”

S

Swapan

Guest
As per

struct ext4_inode { ..... __le16 i_extra_isize; ..... }

I see that this can be used to store extended attributes, given the fact that I am using the inode size = 256 bytes. Few questions :

  1. How do I know if my FS inode size is 256 or 128 bytes ?

  2. How do I set the small extended attributes (<10 bytes) and get it stored in the extra region ? (Reason : Performance matters), as I believe there will be not extra IO block read as its contiguous. Whats the FIleystem/C lib call for that ? Will the typical System call "setattr" do this ? I have been setting using command line "setfattr" and not being sure if its goind to extra area allocated after inode 128 bytes.

  3. Whats the in-memory structure for mapping the extra bytes after 128 bytes of inode, the place where I want to store my small extended attributes.
Thanks for providing answers.

-Swapan
 


Members online


Top