xfs
[Top] [All Lists]

Re: [RFC PATCH 1/3] Implement generic freeze feature

To: Takashi Sato <t-sato@xxxxxxxxxxxxx>
Subject: Re: [RFC PATCH 1/3] Implement generic freeze feature
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 28 Apr 2008 09:03:58 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <2E042A67F72447F6AAA0CC0605DBFA84@xxxxxxxxxxxxxxxx>
References: <20080428193123t-sato@xxxxxxxxxxxxxxx> <20080428103719.GA16030@xxxxxxxxxxxxx> <2E042A67F72447F6AAA0CC0605DBFA84@xxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
On Mon, Apr 28, 2008 at 09:59:55PM +0900, Takashi Sato wrote:
>> I think the protection against double freezes would be better done by
>> using a trylock on bd_mount_sem.
>
> bd_mount_sem can protect against only freezes and cannot protect against
> unfreezes.  If multiple unfreezes run in parallel,  the multiple up() for
> bd_mount_sem might occur incorrectly.

Indeed.  The bit flag would fix that because unfreeze could then check
for the bit beeing set first.  So that's probably the easiest way to go.


<Prev in Thread] Current Thread [Next in Thread>