How to add new fields into inode?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently I'm working on (yet another attempt of) project id and quota
for ext4. Obviously I want to add new u32 field into inode for holding
it's project id.

As I see policy for that isn't well defined:

Kernel tries to allocate extra space according to sizeof(struct
ext4_inode). If EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE is set then it takes
maximum of sizeof, s_want_extra_isize and s_min_extra_isize.

Libext2fs always allocates space for it's own structure and in some
cases checks s_want_extra_isize but without checking related feature.

Thus in some cases default extra size of inodes doesn't depend on
present features and changes if we add new fields into structure.
For example expected output of some unit tests depends on that value.

Question is: it's ok to waste some bytes for unused fields at the of
inode or default extra size should depend on actually enabled features?

--
Konstantin
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux