Bug 207143 - remove xfs inode size patch from xfsprogs in favor of attr2
Summary: remove xfs inode size patch from xfsprogs in favor of attr2
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: xfsprogs
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Russell Cattelan
QA Contact:
URL:
Whiteboard:
Depends On: 208323
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-19 17:54 UTC by Eric Sandeen
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-27 21:03:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eric Sandeen 2006-09-19 17:54:35 UTC
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 21:39:01 UTC
Makes sense to me.

Comment 2 Russell Cattelan 2006-09-27 20:33:34 UTC
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 21:03:21 UTC
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.