[Top] [All Lists]

Re: [PATCH 31/36] db: enable metadump on CRC filesystems

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 31/36] db: enable metadump on CRC filesystems
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 14 Nov 2013 08:00:51 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131113160937.GC32627@xxxxxxxxxxxxx>
References: <1384324860-25677-1-git-send-email-david@xxxxxxxxxxxxx> <1384324860-25677-32-git-send-email-david@xxxxxxxxxxxxx> <20131113160937.GC32627@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Nov 13, 2013 at 08:09:37AM -0800, Christoph Hellwig wrote:
> On Wed, Nov 13, 2013 at 05:40:55PM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > Now that we can calculate CRCs through xfs_db, we can add support
> > for recalculating CRCs on obfuscated metadump images. This simply
> > requires us to call the write verifier manually before writing the
> > buffer to the metadump image.
> > 
> > We don't need to do anything special to mdrestore, as the metadata
> > blocks it reads from the image file will already have all the
> > correct CRCs in them. Hence it can be mostly oblivious to the fact
> > that the filesystem it is restoring contains CRCs.
> All the changes in here look reasonable, but don't we need a way to
> recalculate dquot crcs in metadump as well?

The dquot buffers are read in and written unmodified. We don't want
to recalculate the CRC if we haven't modified the objects directly
(i.e. obfuscated them). Hence I think the way they are currently
handled is fine.

> We seem to need a special
> case for them elsewhere at least.

Only if we modify them, and metadump doesn't do that.

> Do we have a testcase that exercises metadump on a filesystems with
> quotas enabled and check that they still work after restore?

No, nothing that directly verifies quota sanity after a restore.
Doing something like:

# MOUNT_OPTIONS="-o uquota" ./check xfs/253

Doesn't make the test fail, but it's not actually checking the quota
values are correct...


Dave Chinner

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