linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Kazuya Mio <k-mio@sx.jp.nec.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] wake up s_wait_unfrozen when ->freeze_fs fails
Date: Tue, 6 Dec 2011 10:20:31 -0500	[thread overview]
Message-ID: <20111206152031.GA15613@infradead.org> (raw)
In-Reply-To: <4ED731EB.2040104@sx.jp.nec.com>

On Thu, Dec 01, 2011 at 04:51:07PM +0900, Kazuya Mio wrote:
> dd slept infinitely when fsfeeze failed because of EIO.
> To fix this problem, if ->freeze_fs fails, freeze_super() wakes up
> the tasks waiting for the filesystem to become unfrozen.
> 
> When s_frozen isn't SB_UNFROZEN in __generic_file_aio_write(),
> the function sleeps until FITHAW ioctl wakes up s_wait_unfrozen.
> 
> However, if ->freeze_fs fails, s_frozen is set to SB_UNFROZEN and then
> freeze_super() returns an error number. In this case, FITHAW ioctl returns
> EINVAL because s_frozen is already SB_UNFROZEN. There is no way to wake up
> s_wait_unfrozen, so __generic_file_aio_write() sleeps infinitely.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

You don't happen to have testcase (e.g. by using dm-fauly or XFS error
injection) that we could add to xfstests for this?


  reply	other threads:[~2011-12-06 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01  7:51 [PATCH] wake up s_wait_unfrozen when ->freeze_fs fails Kazuya Mio
2011-12-06 15:20 ` Christoph Hellwig [this message]
2011-12-12  0:42   ` Kazuya Mio

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=20111206152031.GA15613@infradead.org \
    --to=hch@infradead.org \
    --cc=k-mio@sx.jp.nec.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).