On 2009-11-18, at 09:43, Dmitry Monakhov wrote:
In other point of view it may be too expensive reserve the last 4
bytes in EXT4_GOOD_OLD_INODE. At the same time store tree_id as xattr.
result in space wasting.
Since the xattr is stored inside the inode, and you are accessing this
from the kernel, it is using only 24 bytes of space used for your tree
ID (20 bytes ext4_xattr_entry, including 3-byte name, 4 bytes data).
It also has virtually no performance overhead because it is kept in
the inode itself.
If you consider that the use of tree_id is not likely to be commonly
used, then it would be "wasting" 4 bytes of space in everyone else's
inodes to reserve this field in the inode (whether in the old inode or
the larger ext4 inode).
But in fact new inode has room for space
reservation. We may store it like it is done for i_version_hi field
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -494,6 +494,7 @@ struct ext4_inode {
__le32 i_crtime; /* File Creation time */
__le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 |
epoch) */
__le32 i_version_hi; /* high 32 bits for 64-bit version */
+ __le32 i_disk_tree_id; /* directory tree quota id */
};
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
--
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