From: "Fernando Luis Vázquez Cao" <fernando@oss.ntt.co.jp>
To: Christoph Hellwig <hch@lst.de>
Cc: t-sato@yk.jp.nec.com, m-hamaguchi@ys.jp.nec.com,
Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Eric Sandeen <sandeen@redhat.com>
Subject: Re: [RFC, PATCH] filesystem freeze: fix sys_umount induced perpetual freeze
Date: Thu, 27 Aug 2009 19:11:29 +0900 [thread overview]
Message-ID: <4A965BD1.205@oss.ntt.co.jp> (raw)
In-Reply-To: <20090826173839.GA20175@lst.de>
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
next prev parent reply other threads:[~2009-08-27 10:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 5:00 [RFC, PATCH] filesystem freeze: fix sys_umount induced perpetual freeze Fernando Luis Vázquez Cao
2009-08-26 17:38 ` Christoph Hellwig
2009-08-27 10:11 ` Fernando Luis Vázquez Cao [this message]
2009-08-27 11:54 ` Christoph Hellwig
2009-08-27 12:16 ` Fernando Luis Vázquez Cao
2009-08-27 14:05 ` [PATCH 1/4] freeze_bdev: kill bd_mount_sem Fernando Luis Vázquez Cao
2009-08-27 14:06 ` [PATCH 2/4] freeze_bdev: grab active reference to frozen superblocks Fernando Luis Vázquez Cao
2009-08-27 14:06 ` [PATCH 3/4] Do not allow umounting of frozen filesystems Fernando Luis Vázquez Cao
2009-09-22 11:07 ` Al Viro
2009-09-22 15:57 ` Eric Sandeen
2009-09-22 16:46 ` Fernando Luis Vazquez Cao
2009-09-22 16:41 ` Fernando Luis Vazquez Cao
2009-08-27 14:06 ` [PATCH 4/4] filesystem freeze: add ISFROZEN ioctl 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=4A965BD1.205@oss.ntt.co.jp \
--to=fernando@oss.ntt.co.jp \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=m-hamaguchi@ys.jp.nec.com \
--cc=sandeen@redhat.com \
--cc=t-sato@yk.jp.nec.com \
--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