From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 18/18] xfs: add xfs_da_geometry to inode forks
Date: Wed, 21 May 2014 08:33:57 +1000 [thread overview]
Message-ID: <20140520223357.GJ8554@dastard> (raw)
In-Reply-To: <20140509073127.GC7882@infradead.org>
On Fri, May 09, 2014 at 12:31:27AM -0700, Christoph Hellwig wrote:
> On Thu, May 08, 2014 at 06:19:48PM +1000, Dave Chinner wrote:
> > While this might seem wasteful to burn a pointer in the data fork
> > for all files, consider that the geometry information
> > for data allocation can be abstracted from the xfs_mount in exactly
> > the same way as has been done for the directory geometry.
> > Effectively it's a hook to carry allocation policy around in....
> >
> > So, add the geometry pointer to the inode fork, and initialise is
> > appropriately and use it for all the directory and attribute
> > operation setup instead ofthe xfs_mount version.
>
> A definitively NAK to bloating the inode without actually making
> use of this. I can see where you might want to go with this, but
> until we actuall support different dir block sizes per inodes or
> similar, and it actually proves to be useful this is not something
> that should go in.
Yeah, that's fine. it's more just a demonstration of where this
takes us. That said, it's pretty trivial to add directory block size
config to the on-disk format. We can use the high bits of the extent
size hint field so we don't take any more sapce.
That is, di_extsize is a 32 bit field that holds a log2 value of the
hint. The hint is set in bytes via a u32 in the ioctl structure,
so at most can have a value that represents an extent size of 4GB.
That's an ondisk value range of 0-25, which only requires the lower
5 bits of the di_extsize field on disk.
For directories, we currently set the value only with the
XFS_XFLAG_EXTSZINHERIT flag to indicate that the di_extsize hint
field contains the value new children should inherit. If we allow
the XFS_XFLAG_EXTSZ to also be set and use the upper
16 bits of the di_extsize field to indicate the directory block
size, then we have a method for configuring per-directory block
sizes without needing to add any new userspace interfaces....
> The rest of the series looks okay as long as we don't touch the
> inode, but I'll have to do a slightly more detailed review.
I need to clean it up and make it work properly before that. Wait
for the resend. ;)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2014-05-20 22:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 8:19 [RFC PATCH 00/18] xfs: directory/attribute geometry abstraction Dave Chinner
2014-05-08 8:19 ` [PATCH 01/18] xfs: remove redundant checks from xfs_da_read_buf Dave Chinner
2014-05-08 8:19 ` [PATCH 02/18] xfs: introduce directory geometry structure Dave Chinner
2014-05-08 8:19 ` [PATCH 03/18] xfs: move directory block translatiosn to xfs_da_btree.h Dave Chinner
2014-05-08 8:19 ` [PATCH 04/18] xfs: kill XFS_DIR2...FIRSTDB macros Dave Chinner
2014-05-08 8:19 ` [PATCH 05/18] xfs: convert dir byte/off conversion to xfs_da_geometry Dave Chinner
2014-05-08 8:19 ` [PATCH 06/18] xfs: convert directory dablk " Dave Chinner
2014-05-08 8:19 ` [PATCH 07/18] xfs: convert directory db " Dave Chinner
2014-05-08 8:19 ` [PATCH 08/18] xfs: convert directory segment limits " Dave Chinner
2014-05-08 8:19 ` [PATCH 09/18] xfs: convert m_dirblkfsbs " Dave Chinner
2014-05-08 8:19 ` [PATCH 10/18] xfs: convert m_dirblksize " Dave Chinner
2014-05-08 8:19 ` [PATCH 11/18] xfs: convert dir/attr btree threshold " Dave Chinner
2014-05-08 8:19 ` [PATCH 12/18] xfs: reduce direct usage of mp->m_dir_geo Dave Chinner
2014-05-08 8:19 ` [PATCH 13/18] xfs: remove mp->m_dir_geo from directory logging Dave Chinner
2014-05-08 8:19 ` [PATCH 14/18] xfs: move node entry counts to xfs_da_geometry Dave Chinner
2014-05-08 8:19 ` [PATCH 15/18] xfs: use xfs_da_geometry for block size in attr code Dave Chinner
2014-05-08 8:19 ` [PATCH 16/18] xfs: pass xfs_da_args to xfs_attr_leaf_newentsize Dave Chinner
2014-05-08 8:19 ` [PATCH 17/18] xfs: repalce attr LBSIZE with xfs_da_geometry Dave Chinner
2014-05-08 8:19 ` [PATCH 18/18] xfs: add xfs_da_geometry to inode forks Dave Chinner
2014-05-09 7:31 ` Christoph Hellwig
2014-05-20 22:33 ` Dave Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140520223357.GJ8554@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox