From: Bill Kendall <wkendall@sgi.com>
To: aelder@sgi.com
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsdump: prune inventory sessions by session id
Date: Fri, 25 Feb 2011 15:03:32 -0600 [thread overview]
Message-ID: <4D681924.7030707@sgi.com> (raw)
In-Reply-To: <1298662049.1990.7053.camel@doink>
On 02/25/2011 01:27 PM, Alex Elder wrote:
> On Thu, 2011-02-24 at 10:25 -0600, Bill Kendall wrote:
>> Allow xfsinvutil to prune inventory sessions by their ID
>> instead of only by filesystem and cutoff date.
>
> This would have been a bit nicer with a little more
> explanation. I.e.:
> - You specify the session id using the new "-s<sessid>"
> command line option.
> - The "-s" option is mutually exclusive with "-u<UUID>"
> and "-M<mount_point> <mm/dd/yy>". It also cannot be
> used together with the "-i" (interactive) or "-C"
> (consistency check) options.
> - The change is implemented by adding a session id argument
> to CheckAndPruneFstab(), CheckAndPruneInvIndexFile(), and
> CheckAndPruneStObjFile(). That session becomes a third
> way of identifying entries to be pruned (in addition
> to mount point and UUID).
Feel free to amend the commit message when you check this
in. I agree that at least it should have mentioned that
this adds a new xfsinvutil -s option.
>
> Anyway, this looks good to me. I have one question
> below, but regardless of your answer...
>
> Reviewed-by: Alex Elder<aelder@sgi.com>
>
>> Signed-off-by: Bill Kendall<wkendall@sgi.com>
>>
>> ---
> . . .
>
>> diff --git a/invutil/invutil.c b/invutil/invutil.c
>> index af6836b..37489c0 100644
>> --- a/invutil/invutil.c
>> +++ b/invutil/invutil.c
>
> . . .
>
>> @@ -594,14 +648,8 @@ CheckAndPruneInvIndexFile( bool_t checkonly,
>> removeflag = BOOL_TRUE;
>> }
>>
>> - if (( !removeflag )&& (checkonly == BOOL_FALSE)&&
>> - ( invIndexEntry[i].ie_timeperiod.tp_start< prunetime))
>> - {
>> - IdxCheckOnly = BOOL_FALSE;
>> - printf(" Mount point match\n");
>> - }
>
> Why do you no longer print this in this case?
The message did not seem to serve a purpose. To reach the print
we already had to match on the mount point, and a message is
already issued for that.
As you probably noticed, the 'if' statement did not serve a
functional purpose since the prune time has to be checked for
each session anyway, and further the 'if' statement would have
to be reworked to consider whether this is a prune-by-session run.
As a side note, it's too bad that the consistency checking and
pruning is coupled together. It would be much cleaner to
implement the various pruning filters as separate functions.
Bill
>
>> - if (CheckAndPruneStObjFile(IdxCheckOnly, invIndexEntry[i].ie_filename,
>> - prunetime, r_mf_label) == -1) {
>> + if (CheckAndPruneStObjFile(checkonly, invIndexEntry[i].ie_filename,
>> + sessionp, prunetime, r_mf_label) == -1) {
>> removeflag = BOOL_TRUE; /* The StObj is gone */
>> }
>>
>
> . . .
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2011-02-25 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 16:25 [PATCH] xfsdump: prune inventory sessions by session id Bill Kendall
2011-02-25 19:27 ` Alex Elder
2011-02-25 21:03 ` Bill Kendall [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=4D681924.7030707@sgi.com \
--to=wkendall@sgi.com \
--cc=aelder@sgi.com \
--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