From: Christoph Hellwig <hch@infradead.org>
To: Amit Sahrawat <amit.sahrawat83@gmail.com>
Cc: Nam-Jae Jeon <linkinjeon@gmail.com>,
Alex Elder <elder@kernel.org>,
linux-kernel@vger.kernel.org, xfs@oss.sgi.com,
Christoph Hellwig <hch@infradead.org>,
xfs-masters@oss.sgi.com, Ben Myers <bpm@sgi.com>
Subject: Re: [PATCH 1/1] xfs: fix buffer flushing during log unmount
Date: Fri, 17 Feb 2012 14:15:23 -0500 [thread overview]
Message-ID: <20120217191522.GB13870@infradead.org> (raw)
In-Reply-To: <1329306980-17997-1-git-send-email-amit.sahrawat83@gmail.com>
> Whenever there is a mount/unmount failure - there is a chance of calling the
> callbacks functions once - transaction ail mount pointer is destroyed. So, it results
> in NULL pointer exception followed by hang. So, before unmount of the log - flush all
> the pending buffers.
> void
> xfs_log_unmount(xfs_mount_t *mp)
> {
> + int error = 0;
> + /*
> + * Make sure all buffers have been flushed and completed before
> + * unmounting the log.
> + */
> + error = xfs_flush_buftarg(mp->m_ddev_targp, 1);
> + if (error)
> + cmn_err(CE_WARN, "%d busy buffers during log unmount.", error);
> + xfs_wait_buftarg(mp->m_ddev_targp);
> +
We do exactly that sequence before the xfs_log_unmount_write call on
umount. Care to explain what code in xfs_log_unmount_write would
require this to be called again?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-02-17 19:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 11:56 [PATCH 1/1] xfs: fix buffer flushing during log unmount Amit Sahrawat
2012-02-15 12:26 ` Amit Sahrawat
2012-02-17 5:38 ` Namjae Jeon
2012-02-17 19:15 ` Christoph Hellwig [this message]
2012-02-18 16:30 ` Amit Sahrawat
2012-02-19 22:27 ` Christoph Hellwig
2012-02-20 1:33 ` Dave Chinner
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=20120217191522.GB13870@infradead.org \
--to=hch@infradead.org \
--cc=amit.sahrawat83@gmail.com \
--cc=bpm@sgi.com \
--cc=elder@kernel.org \
--cc=linkinjeon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xfs-masters@oss.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