xfs
[Top] [All Lists]

Re: Any notion of file affinity in XFS?

To: Jean Francois Martinez <jfm2@xxxxxxxxxxxxxxxx>
Subject: Re: Any notion of file affinity in XFS?
From: Eric Sandeen <sandeen@xxxxxxx>
Date: 16 Aug 2002 14:34:06 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <1029525773.21439.215.camel@xxxxxxxxxxxxxxxxx>
References: <1029525773.21439.215.camel@xxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
The allocator itself has notions of how to do this; allocations happen
with these flags:

typedef enum xfs_alloctype
{
        XFS_ALLOCTYPE_ANY_AG,           /* allocate anywhere, use rotor */
        XFS_ALLOCTYPE_FIRST_AG,         /* ... start at ag 0 */
        XFS_ALLOCTYPE_START_AG,         /* anywhere, start in this a.g. */
        XFS_ALLOCTYPE_THIS_AG,          /* anywhere in this a.g. */
        XFS_ALLOCTYPE_START_BNO,        /* near this block else anywhere */
        XFS_ALLOCTYPE_NEAR_BNO,         /* in this a.g. and near this block */
        XFS_ALLOCTYPE_THIS_BNO          /* at exactly this block */
} xfs_alloctype_t;

However, there is not any sort of ioctl to pick and choose an allocation
method for a file...  might be an interesting project, but it's not on
the radar here.

There are allocate space / reserve space ioctls, if you're ambitious,
you could possibly write new versions that take in more information
about how/where to allocate the space.  Of course, you also may not get
what you ask for...

-Eric


On Fri, 2002-08-16 at 14:22, Jean Francois Martinez wrote:
> I see many cases where for performance reasons I would like being able
> to tell XFS that two files should be physically close (affine) so disk
> space allcation should treat them as a whole.  It could be something
> like that:
> 
> -tell the filesystem that the files I will create are affine
> -create them
> -revoke affinity.
> 
> Does this exist?
> -Any plans to implement it or know of a filesystem where this exists?
> 
>                       JFM
> 
-- 
Eric Sandeen      XFS for Linux     http://oss.sgi.com/projects/xfs
sandeen@xxxxxxx   SGI, Inc.         651-683-3102


<Prev in Thread] Current Thread [Next in Thread>