From: Joel Becker <Joel.Becker@oracle.com>
To: linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: [PATCH 0/2] [RFC] configfs: Pin config_items when in use by other subsystems
Date: Thu, 14 Jun 2007 21:40:47 -0700 [thread overview]
Message-ID: <20070615044046.GA17382@tasint.org> (raw)
Many folks know that I've been pretty stubborn on the subject of
configfs item removal. configfs_rmdir() cannot currently be aborted by
a client driver. This is to ensure that userspace has control - if
userspace wants to remove an item, it should have that ability. The
client driver is left to handle the event.
However, there are dependencies in the kernel. One kernel
subsystem may depend on a configfs item and be unable to handle that
item disappearing. So we need a mechanism to describe this dependency.
After lots of beating me over my head, I've been convinced to give it a
shot.
The canonical example is ocfs2 and its heartbeat. Today, you
can stop o2cb heartbeat (o2hb) by rmdir(2) of the heartbeat object in
configfs. o2hb handles this just fine - all of o2hb's clients get
node-down notifications. However, ocfs2 can't handle this. When the
node stops speaking to the cluster it can't just continue, and it can't
force an unmount of itself. It only has one solution - crash. This is
ugly any way you look at it.
With the configfs_depend_item() API,
heartbeat_register_callback() can then pin the heartbeat item. Any
rmdir(2) of the heartbeat item will return -EBUSY until
heartbeat_unregister_callback() removes the dependancy. A similar API
can be created for any other configfs client driver.
The first patch is the configfs mechanism. The second patch is
the heartbeat use thereof.
Comments and curses welcome.
Joel
--
"You must remember this:
A kiss is just a kiss,
A sigh is just a sigh.
The fundamental rules apply
As time goes by."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next reply other threads:[~2007-06-15 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 4:40 Joel Becker [this message]
2007-06-15 4:40 ` [PATCH 1/2] configfs: config item dependancies Joel Becker
2007-06-15 4:40 ` [PATCH 2/2] ocfs2: Depend on configfs heartbeat items Joel Becker
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=20070615044046.GA17382@tasint.org \
--to=joel.becker@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).