linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Fernando Luis Vazquez Cao <fernando_b1@lab.ntt.co.jp>
Cc: Jan Kara <jack@suse.cz>, Al Viro <viro@zeniv.linux.org.uk>,
	Dave Chinner <dchinner@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/7] fsfreeze: Prevent emergency thaw from looping infinitely
Date: Wed, 11 Jul 2012 11:02:30 +0200	[thread overview]
Message-ID: <20120711090230.GC1316@quack.suse.cz> (raw)
In-Reply-To: <4FFCE434.601@lab.ntt.co.jp>

On Wed 11-07-12 11:25:56, Fernando Luis Vazquez Cao wrote:
> On 2012/07/10 21:08, Jan Kara wrote:
> 
> >On Tue 10-07-12 17:20:57, Fernando Luis Vázquez Cao wrote:
> >>The thawing of a filesystem through sysrq-j loops infinitely as it
> >>incorrectly detects a thawed filesytsem as frozen and tries to
> >>unfreeze repeatedly. This is a regression caused by
> >>4504230a71566785a05d3e6b53fa1ee071b864eb ("freeze_bdev: grab active
> >>reference to frozen superblocks") in that it no longer returned
> >>-EINVAL for superblocks that were not frozen.
> >   Umm, I don't think above mentioned commit is really guilty.
> 
> Well, it is after that commit that
> 
> -       if (!bdev->bd_fsfreeze_count) {
> -               mutex_unlock(&bdev->bd_fsfreeze_mutex);
> -               return -EINVAL;
> -       }
> 
> became
> 
> +       if (!bdev->bd_fsfreeze_count)
> +               goto out_unlock;
> [...]
> +out_unlock:
>         mutex_unlock(&bdev->bd_fsfreeze_mutex);
>         return 0;
> 
> which breaks emergency thaw.
  Ah, OK. I misread the code... Sorry for the noise.

> >Also I think your patch breaks thawing of a block device without mounted
> >filesystem - you end up returning EINVAL for that...
> 
> It returns EINVAL only after the last thaw and the block device
> is still properly thawed (i.e. bd_fsfreeze_count becomes 0).
  Yes, after your patch thaw_bdev() returns EINVAL although the device is
thawed. That is just wrong regardless whether any caller cares or not. And
before your patch this was working correctly. So please fix your patch.

								Honza

-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-07-11  9:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10  8:16 [RFC, PATCH 0/7] fsfreeze: miscellaneous fixes and cleanups Fernando Luis Vázquez Cao
2012-07-10  8:20 ` [PATCH 1/7] fsfreeze: Prevent emergency thaw from looping infinitely Fernando Luis Vázquez Cao
2012-07-10 12:08   ` Jan Kara
2012-07-11  2:25     ` Fernando Luis Vazquez Cao
2012-07-11  9:02       ` Jan Kara [this message]
2012-07-12  1:49         ` Fernando Luis Vazquez Cao
2012-07-10  8:23 ` [PATCH 2/7] fsfreeze: emergency thaw will deadlock on s_umount Fernando Luis Vázquez Cao
2012-07-10  9:09   ` Jan Kara
2012-07-10  9:13     ` Jan Kara
2012-07-10  9:30       ` Fernando Luis Vazquez Cao
2012-07-10 12:15         ` Jan Kara
2012-07-11  2:38           ` Fernando Luis Vazquez Cao
2012-07-11  9:06             ` Jan Kara
2012-07-12  2:08               ` Fernando Luis Vazquez Cao
2012-07-10  8:25 ` [PATCH 3/7] fsfreeze: freeze_super and thaw_bdev don't play well together Fernando Luis Vázquez Cao
2012-07-10  8:30 ` [PATCH 4/7] fsfreeze: switch to using super methods where possible Fernando Luis Vázquez Cao
2012-07-10  8:32 ` [PATCH 5/7] fsfreeze: move emergency thaw code to fs/super.c Fernando Luis Vázquez Cao
2012-07-10  8:34 ` [PATCH 6/7] fsfreeze: add vfs ioctl to check freeze state Fernando Luis Vázquez Cao
2012-07-10  8:35 ` [PATCH 7/7] fsfreeze: add block device " Fernando Luis Vázquez Cao

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=20120711090230.GC1316@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=dchinner@redhat.com \
    --cc=fernando_b1@lab.ntt.co.jp \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).