public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: tinguely@sgi.com
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: synchronously write the superblock on unmount
Date: Wed, 27 Jun 2012 20:08:38 +1000	[thread overview]
Message-ID: <20120627100838.GH19223@dastard> (raw)
In-Reply-To: <20120626160102.898671754@sgi.com>

On Tue, Jun 26, 2012 at 11:00:52AM -0500, tinguely@sgi.com wrote:
> xfs_wait_buftarg() does not wait for the completion of the write of the uncached
> superblock. This write can race with the shutdown of the log and cause a panic if the
> write does not win the race. Per Dave's suggestion, turn the final write of the
> superblock into a syncronous write.

Not quite what I suggested. You removed the transaction that logs
the changes first. That needs to stay, otherwise we are writing
unlogged changes to the superblock, and have the possibility of a
crash before the unmount record is written causing log recovery to
modify the superblock and not have all the correct changes in the
log.

So it first needs to log the changes (synchronously), then write the
changes (synchronously).

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2012-06-27 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120626160051.364635296@sgi.com>
2012-06-26 16:00 ` [PATCH] xfs: synchronously write the superblock on unmount tinguely
2012-06-26 18:09   ` Carlos Maiolino
2012-06-26 21:06   ` Christoph Hellwig
2012-06-27 10:08   ` 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=20120627100838.GH19223@dastard \
    --to=david@fromorbit.com \
    --cc=tinguely@sgi.com \
    --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