public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Kendall <wkendall@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsdump: exempt quota files from filesize checks
Date: Mon, 05 Apr 2010 07:29:41 -0500	[thread overview]
Message-ID: <4BB9D7B5.9030805@sgi.com> (raw)
In-Reply-To: <20100403092258.GA20166@infradead.org>

On 04/03/2010 04:22 AM, Christoph Hellwig wrote:
> On Thu, Apr 01, 2010 at 03:39:56PM -0500, Bill Kendall wrote:
>> xfsdump backs up quota information by generating quota dump files
>> ("xfs_quota -c dump") in the root of the filesystem being dumped.  If the
>> user filters files from the dump based on max file size (-z option) the
>> quota files may not be dumped. The following patch makes the quota files
>> exempt from the max filesize checks.
>>
>> Signed-off-by: Bill Kendall <wkendall@sgi.com>
>>
>> diff --git a/common/content.h b/common/content.h
>> index e21f38e..03b72f0 100644
>> --- a/common/content.h
>> +++ b/common/content.h
>> @@ -65,6 +65,8 @@ typedef struct content_hdr content_hdr_t;
>>  #define CONTENT_PQUOTAFILE	"xfsdump_quotas_proj"
>>  #define CONTENT_GQUOTAFILE	"xfsdump_quotas_group"
>>  
>> +#ifdef DUMP
> 
> How is this related to the rest of the patch?

is_quota_file() is not defined for xfsrestore. I then noticed
that quota_info_t is not used in xfsrestore, so I expanded the
ifdef to exclude it as well.

> 
>>  /* save quota information in dump
>>   */
>>  static quota_info_t quotas[] = {
>> -	{ "user quota",		BOOL_TRUE,	CONTENT_QUOTAFILE,	"", "-uf", XFS_QUOTA_UDQ_ACCT },
>> -	{ "project quota",	BOOL_TRUE,	CONTENT_PQUOTAFILE,	"", "-pf", XFS_QUOTA_PDQ_ACCT },
>> -	{ "group quota",	BOOL_TRUE,	CONTENT_GQUOTAFILE,	"", "-gf", XFS_QUOTA_GDQ_ACCT }
>> +	{ "user quota",		BOOL_TRUE,	CONTENT_QUOTAFILE,	"", "-uf", XFS_QUOTA_UDQ_ACCT, 0 },
>> +	{ "project quota",	BOOL_TRUE,	CONTENT_PQUOTAFILE,	"", "-pf", XFS_QUOTA_PDQ_ACCT, 0 },
>> +	{ "group quota",	BOOL_TRUE,	CONTENT_GQUOTAFILE,	"", "-gf", XFS_QUOTA_GDQ_ACCT, 0 }
>>  };
> 
> trailing fields in static structures are implicitly filled with zeroes.

I guess I'm accustomed to seeing missing-initializer warnings. Guess
they're not turned on for xfsdump. Better to be explicit anyway, IMHO.

Thanks for the review.

Bill

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2010-04-05 12:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 20:39 [PATCH] xfsdump: exempt quota files from filesize checks Bill Kendall
2010-04-03  9:22 ` Christoph Hellwig
2010-04-05 12:29   ` 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=4BB9D7B5.9030805@sgi.com \
    --to=wkendall@sgi.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