Clarification on inode alignment

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

 



Hi Dave,

Last week, during a discussion on #xfs you stated that,

"inode alignment is necessary to avoid needing to do an inobt lookup to find
the location of the inode every time we map an inode to disk".

Also, The following statement appears at
http://xfs.org/index.php/Improving_inode_Caching,

"The main problem we have is that XFS uses inode chunk size and alignment to
optimise inode number to disk location conversion. That is, the conversion
becomes a single set of shifts and masks instead of an AGI btree lookup. This
optimisation substantially reduces the CPU and I/O overhead of inode lookups,
but it does limit our flexibility. If we break the alignment restriction,
every lookup has to go back to a btree search. Hence we really want to avoid
breaking chunk alignment and size rules."

For the 4k block size scenario, I noticed that we have inode alignment of 4
blocks. I did go through macros such as XFS_INO_TO_AGNO(),
XFS_INO_TO_AGBNO() and XFS_INO_TO_OFFSET() which deal with extracting the
components from an inode number.

However I still don't understand how non-aligned inode clusters (64 inodes in
a single cluster) would break the inode number to disk location
arithmetic calculations. Could you please explain it?

-- 
chandan

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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux