Bug 207143 - remove xfs inode size patch from xfsprogs in favor of attr2
remove xfs inode size patch from xfsprogs in favor of attr2
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: xfsprogs (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Russell Cattelan
:
Depends On: 208323
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-19 13:54 EDT by Eric Sandeen
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-27 17:03:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Sandeen 2006-09-19 13:54:35 EDT
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
(bz 120622)

However, the new attr2 format is much more efficient at how it uses
inode space, and selinux should be fine with default inode sizes
now.

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. 

See also
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg113594.html
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
 most people).

 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
 option.
 
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.
Comment 1 Russell Coker 2006-09-19 17:39:01 EDT
Makes sense to me.
Comment 2 Russell Cattelan 2006-09-27 16:33:34 EDT
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.

Comment 3 Russell Cattelan 2006-09-27 17:03:21 EDT
new bug opened to track the anaconda issues.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=208323

Note You need to log in before you can comment on or make changes to this bug.