From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: don't hold onto reserved blocks on remount,ro
Date: Tue, 26 Jan 2010 15:09:45 +1100 [thread overview]
Message-ID: <20100126040945.GA15853@discord.disaster> (raw)
In-Reply-To: <20100125114433.GA8595@infradead.org>
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@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2010-01-26 4:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 5:32 [PATCH] xfs: don't hold onto reserved blocks on remount,ro Dave Chinner
2010-01-25 11:44 ` Christoph Hellwig
2010-01-26 4:09 ` Dave Chinner [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=20100126040945.GA15853@discord.disaster \
--to=david@fromorbit.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