xfs
[Top] [All Lists]

Re: [PATCH 1/2] xfsprogs: Introduce a new subcommand agstate to xfs_fio

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] xfsprogs: Introduce a new subcommand agstate to xfs_fio
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Sat, 17 Nov 2012 12:33:10 +0800
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121117020231.GP14281@dastard>
References: <50A5E258.3000509@xxxxxxxxxx> <20121117020231.GP14281@dastard>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2
On 11/17/2012 10:02 AM, Dave Chinner wrote:
> On Fri, Nov 16, 2012 at 02:51:04PM +0800, Jeff Liu wrote:
>> Introduce a new xfs_io command: agstate.
>>
>> This command is used to get/set state for a given allocation group.
> 
> xfs_io is not the place for this command.
I was also wonder why we place the agflags command on there since xfs_io is 
aimed
at examining the regular file I/O paths, but I can not found out a better place
while implementing it.

> 
> A couple of weeks ago I started writing an xfs_spaceman module and
> an ioctl interface for exactly this purpose, I just hadn't got
> around to completing it and the kernel patch to test it so I hadn't
> posted it.  Once the userspace release is out of the way, I'll post
> the patches to get xfs_spaceman into xfs_progs, and we can use that
> for this AG control from the start.
> 
> The reason for this is that the AG state in future is going to be a
> lot more complex than just enabling/disabling allocation, and the
> ioctl interface I prototyped supports a lot of that future
> functionality.
Definitely, so that we can have fine-granted AG controls, that's why I didn't
chose to re-base/post the previous agflags patch but proposed the agstate 
command
because the naming would sounds more reasonable.
> 
> The patch is below so you can see what sort of AG control/state
> functionality I think we'll be needing sooner rather than later, and
> the interface I think we should be using...
Ok, I'll waiting for this feature. :)

BTW, Does it sounds make sense if we implement parent pointer support at first?
http://www.xfs.org/index.php/Unfinished_work#Parent_Pointers.2FCreate.2BEA
I propose this because it would reduce many efforts for implementing 
xfs_shrinkfs
command, and reduce the overhead for iterating overall file systems to find out
files which are located at offline AGs.
> 
>> Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
>> ---
>>  include/xfs_ag.h |   32 ++++++++++++++++++++++++++++----
>>  include/xfs_fs.h |    2 ++
>>  io/Makefile      |    2 +-
>>  io/init.c        |    1 +
>>  4 files changed, 32 insertions(+), 5 deletions(-)
> 
> FWIW, I think you forgot to include the file that introduces the
> command in the patch :)
Oops! sorry for the mistake.

Thanks,
-Jeff

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