[Top] [All Lists]

Re: [PATCH] xfs: don't hold onto reserved blocks on remount,ro

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: don't hold onto reserved blocks on remount,ro
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 26 Jan 2010 15:09:45 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100125114433.GA8595@xxxxxxxxxxxxx>
References: <1264397572-18230-1-git-send-email-david@xxxxxxxxxxxxx> <20100125114433.GA8595@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Jan 25, 2010 at 06:44:33AM -0500, Christoph Hellwig wrote:
> On Mon, Jan 25, 2010 at 04:32:52PM +1100, Dave Chinner wrote:
> > If we hold onto reserved blocks when doing a remount,ro we end
> > up writing the blocks used count to disk that includes the reserved
> > blocks. Reserved blocks are not actually used, so this results in
> > the values in the superblock being incorrect.
> > 
> > Hence if we run xfs_check or xfs_repair -n while the filesystem is
> > mounted remount,ro we end up with an inconsistent filesystem being
> > reported. Also, running xfs_copy on the remount,ro filesystem will
> > result in an inconsistent image being generated.
> > 
> > To fix this, unreserve the blocks when doing the remount,ro, and
> > reserved them again on remount,rw. This way a remount,ro filesystem
> > will appear consistent on disk to all utilities.
> Looks good to me, the only thing that was rather confusing when trying
> to read the patch is the m_resblks_ro field in struct xfs_mount, it's
> more a m_resblks_save, as in the saved value before we modified the
> block count during remount,ro.

Ok, I changed the variable name.


Dave Chinner

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