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.
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|