public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Takashi Sato <t-sato@yk.jp.nec.com>
Cc: "linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/3] Implement generic freeze feature
Date: Sun, 25 May 2008 15:32:11 -0400	[thread overview]
Message-ID: <20080525193211.GA24328@infradead.org> (raw)
In-Reply-To: <20080522175020t-sato@mail.jp.nec.com>

> +	if (test_and_set_bit(BD_FREEZE_OP, &bdev->bd_state))
> +		return ERR_PTR(-EBUSY);
> +
> +	sb = get_super_without_lock(bdev);
> +
> +	/* If super_block has been already frozen, return. */
> +	if (sb && sb->s_frozen != SB_UNFROZEN) {
> +		put_super(sb);
> +		clear_bit(BD_FREEZE_OP, &bdev->bd_state);
> +		return sb;
> +	}

The BD_FREEZE_OP flag in the block_device already prevents multiple
freezes for a singe block device, so there is no need for this
additional check and the get_super_without_lock helper.

>  	down(&bdev->bd_mount_sem);

And with that flag bd_mount_sem is also obsolete for preventing the
multiple freeze operations.  We still need investigate what
synchronization we need vs unmount which also takes bd_mount_sem without
every having document what it exactly protects.

  reply	other threads:[~2008-05-25 19:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22  8:50 [RFC PATCH 1/3] Implement generic freeze feature Takashi Sato
2008-05-25 19:32 ` Christoph Hellwig [this message]
2008-05-27 10:20   ` Takashi Sato
  -- strict thread matches above, loose matches on Subject: below --
2008-05-14  8:06 Takashi Sato
2008-05-20  3:57 ` Andreas Dilger
2008-05-21  1:23   ` Takashi Sato
2008-04-28 10:31 Takashi Sato
2008-04-28 10:37 ` Christoph Hellwig
2008-04-28 12:59   ` Takashi Sato
2008-04-28 13:03     ` Christoph Hellwig
2008-04-30  1:10       ` Takashi Sato
2008-04-01 12:17 Takashi Sato

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=20080525193211.GA24328@infradead.org \
    --to=hch@infradead.org \
    --cc=dm-devel@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=t-sato@yk.jp.nec.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