xfs
[Top] [All Lists]

Re: [PATCH] xfsdump: exempt quota files from filesize checks

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: [PATCH] xfsdump: exempt quota files from filesize checks
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 3 Apr 2010 05:22:58 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100401203956.GA28295@xxxxxxx>
References: <20100401203956.GA28295@xxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
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@xxxxxxx>
> 
> 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?

>  /* 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.




Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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