xfs
[Top] [All Lists]

Re: [PATCH RFC] xfs_spaceman: updated preallocation support (eofblocks v

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH RFC] xfs_spaceman: updated preallocation support (eofblocks v6)
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 7 Nov 2012 09:43:37 +1100
Cc: xfs@xxxxxxxxxxx, dchinner@xxxxxxxxxx
In-reply-to: <1352213704-59959-1-git-send-email-bfoster@xxxxxxxxxx>
References: <1352213704-59959-1-git-send-email-bfoster@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Nov 06, 2012 at 09:55:04AM -0500, Brian Foster wrote:
> This is an update to Dave's patch to xfs_spaceman to support
> preallocation trimming. The original patch is here:
> 
> http://oss.sgi.com/archives/xfs/2012-10/msg00418.html
> 
> The code is updated as follows:
> 
> - Update to latest struct xfs_eofblocks (supports v6 of the
>   speculative preallocation inode tracking set).
> - Support multiple id scan.
> - Fix the minimum argument count (no args means a trylock scan).
> 
> Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
> ---
> 
> Dave,
> 
> I can also squash this into the original and post a new version if that is
> preferred. 

I'll probably do that myself - the current code I have is a little
different so the patch probably won't apply, anyway.  I'll need to
munge it to suit the eventual struct xfs_eofblocks format, anyway.

....

> @@ -136,7 +142,7 @@ prealloc_help(void)
>  "\n"
>  "Control speculative preallocation\n"
>  "\n"
> -"Options: [-s] [-ugp id] [-m minlen]\n"
> +"Options: [-s] [-u id] [-g id] [-p id] [-m minlen]\n"
>  "\n"
>  " -s -- synchronous flush - wait for flush to complete\n"
>  " -u id -- remove prealloc on files matching user quota id <id>\n"
> @@ -153,11 +159,11 @@ prealloc_init(void)
>       prealloc_cmd.name = "prealloc";
>       prealloc_cmd.altname = "prealloc";
>       prealloc_cmd.cfunc = prealloc_f;
> -     prealloc_cmd.argmin = 1;
> +     prealloc_cmd.argmin = 0;

While technically correct, it's not the desired behaviour.  I wanted
it to issue the usage if you just type the comment. I think I need
to add a "-a" flag for "flush all" here.

> -     prealloc_cmd.oneline = _("Control specualtive preallocation");
> +     prealloc_cmd.oneline = _("Control speculative preallocation");

Good catch, Brain! :)

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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