From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 3/3] ocfs2:freeze-thaw: make it work
Date: Fri, 22 Jan 2010 14:35:35 -0800 [thread overview]
Message-ID: <4B5A2837.2000304@oracle.com> (raw)
In-Reply-To: <20100122042214.GA3797@laptop.oracle.com>
Wengang Wang wrote:
>>>> Though we don't support it, we hope to make the operation succeed.
>>>> the big pain is the we have no way to know if a nested freeze is done
>>>> againt ocfs2 volume. the second freeze doesn't come to ocfs2, it returns
>>>> by vfs(in freeze_bdev()). so we can prevent user to do a nested freeze.
>>>>
>>>> we can't return error. if we do, the thaw fails with volume still frozen
>>>> and no further operation can recover the state.
>>>>
>>> Taking the superblock lock will prevent this.
>
> could you give me the detail for that?
So is your concern racing freeze requests on multiple nodes?
Multiple freeze requests on a single node should work as is because
we only care about the final thaw().
But if there are multiple freeze requests on multiple nodes, both nodes
will race in freeze_fs(sb). The first node to get the sb lock, will attempt
to take the freeze lock. The loser will wait, but it will get the bast
on the
freeze lock. In it, it will do mutex_trylock(&sb->bdev->bd_fsfreeze_mutex)
and fail.
One solution is for this node to refuse to downconvert the freeze lock. Wait
for the timeout at which time the freezer node will be forced to cancel
convert.
At that time the loser node will get the freeze lock and everyone will live
happily ever after. ;)
Get my drift.
prev parent reply other threads:[~2010-01-22 22:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 18:00 [Ocfs2-devel] [PATCH 3/3] ocfs2:freeze-thaw: make it work Wengang Wang
2010-01-16 2:22 ` Sunil Mushran
2010-01-18 13:06 ` Wengang Wang
2010-01-18 16:17 ` Wengang Wang
2010-01-20 0:50 ` Sunil Mushran
2010-01-20 4:55 ` Wengang Wang
2010-01-20 18:22 ` Sunil Mushran
2010-01-21 2:18 ` Wengang Wang
2010-01-21 2:32 ` Sunil Mushran
2010-01-27 18:14 ` Wengang Wang
2010-01-27 20:09 ` Sunil Mushran
2010-01-28 13:00 ` Wengang Wang
2010-01-28 18:08 ` Sunil Mushran
2010-01-22 4:22 ` Wengang Wang
2010-01-22 22:35 ` Sunil Mushran [this message]
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=4B5A2837.2000304@oracle.com \
--to=sunil.mushran@oracle.com \
--cc=ocfs2-devel@oss.oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.