A patch exists in the xfsprogs rpm to bump the size of inodes, in
order to make more room for SELinux attributes and the like
However, the new attr2 format is much more efficient at how it uses
inode space, and selinux should be fine with default inode sizes
attr2 went into the xfsprogs 2.7 series, so we do have an xfsprogs
version that can handle it now.
Here's how Nathan describes the attr2 change (from about a year ago):
Ondisk format extension for extended attributes (attr2).
Basically, the data/attr forks now grow up/down from either end
of the literal area, rather than dividing the literal area into
two chunks and growing both upward. Means we can now make much
more efficient use of the attribute space, incl. fitting DMF
attributes inline in 256 byte inodes, and large jumps in dbench3
performance numbers. It is self enabling, but can be forced
on/off via the attr2/noattr2 mount options.
in response to debian Bug#336350:
Changing the default inode size to be larger is not going to happen.
While it will (currently) improve extended attribute performance, it
has performance implications for everyone not using those (which is
However, we recently extended XFS to use a different algorithm for
managing the "literal area" of the inode (after the stat stat, where
inline data and attr information is stored) to use a more efficient
representation - ultimately, this will mean 256 byte inodes will
perform as well as 512 byte inodes in many situations that previously
they would not have.
This code will first be in the xfsprogs-2.7.x userspace package, and
kernels after 2.6.15 (or perhaps 2.6.16). Look for the attr2 mount
also from the mkfs.xfs man page in 2.8.11:
The option attr[=value] is used to specify the version
of extended attribute inline allocation policy to be
used. By default, this is zero. Once extended
attributes are used for the first time, the version
will be set to either one or two. The current version
(two) uses a more efficient algorithm for managing the
available inline inode space than version one does,
however, for backward compatibility reasons (and in the
absence of the attr=2 mkfs option, or the attr2 mount
option), version one will be selected by default when
attributes are first used on a filesystem.
The latest anaconda now makes filesystems with attr2 enabled:
rc = iutil.execWithRedirect("/usr/sbin/mkfs.xfs",
["-f", "-l", "internal", "-i",
"size=" + str(xfsBytesPerInode),
"-i", "attr=2", devicePath],
stdout = "/dev/tty5",
stderr = "/dev/tty5")
so at this point I think that rather than patching xfsprogs, making
use of attr2 is the more efficient choice.
Makes sense to me.
xfsprogs has been updated to 2.8.11
The inode 512 patch has been dropped in favor attr=2
Note while anaconda has turned on attr 2 it is still
setting the inode size to 2048 vs the default of 256.
Which is much larger than is needed and should
be dropped from the mkfs.xfs line.
new bug opened to track the anaconda issues.