[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A965BD1.205@oss.ntt.co.jp>
Date: Thu, 27 Aug 2009 19:11:29 +0900
From: Fernando Luis Vázquez Cao
<fernando@....ntt.co.jp>
To: Christoph Hellwig <hch@....de>
CC: t-sato@...jp.nec.com, m-hamaguchi@...jp.nec.com,
Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Eric Sandeen <sandeen@...hat.com>
Subject: Re: [RFC, PATCH] filesystem freeze: fix sys_umount induced perpetual
freeze
Christoph Hellwig wrote:
> On Wed, Aug 26, 2009 at 02:00:01PM +0900, Fernando Luis V??zquez Cao wrote:
>> The current locking scheme for filesystem freeze avoids races between
>> freeze_bdev() and do_umount() by taking the s_umount semaphore.
>>
>> If freeze_bdev() wins the race the process that invoked sys_umount
>> will sleep until thaw_bdev releases the semaphore. Unfortunately, this
>> will never happen because thaw_bdev bails out early the
>> bd_fsfreeze_count check having failed (the count is 0).
>>
>> The problem is that the block_device that ioctl_fsthaw() passes to
>> thaw_bdev() is not the one that we freezed because before sleeping in
>> deactivate_super() do_umount() released the dentry (dput()) and freed
>> the vfs mount (free_vfsmnt()).
>>
>> This patch works around this issue by checking the freeze level in
>> do_umount()
>
>
> This should be solved my my freeze locking rewrite:
>
> http://marc.info/?l=linux-fsdevel&m=124933489118480&w=2
> http://marc.info/?l=linux-fsdevel&m=124933491918517&w=2
Hi Christoph,
Thank you for the pointers. I gave those patches a spin, but it seems
the umount case is not being tackled. I suggest rejecting the umount
for frozen filesystems. What do you think?
I will be replying to this email with a forward port of your patches
along with my own patches that fix the locking for umount and add a
new ioctl to check the freeze state of the filesystem (this is helpful
to create clean resource agents for HA solutions).
- Fernando
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists