public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zach Brown <zab@zabbo.net>
To: Matt Mackall <mpm@selenic.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] configfs, a filesystem for userspace-driven kernel object configuration
Date: Tue, 05 Apr 2005 11:16:51 -0700	[thread overview]
Message-ID: <4252D613.4070204@zabbo.net> (raw)
In-Reply-To: <20050405064153.GI25554@waste.org>

Matt Mackall wrote:
> On Sun, Apr 03, 2005 at 12:57:28PM -0700, Joel Becker wrote:
> 

>>	An interface in /proc where the API is: 

>>or an ioctl(2) interface where the API is:

>>
>>becomes this in configfs:
>>
>>	# cd /config/mythingy
>>	# mkdir foo
>>	# echo 1 > foo/index
>>	# echo 3 > foo/count
>>	# echo 0x00013 > foo/address
>>
>>	Instead of a binary blob that's passed around or a cryptic
>>string that has to be formatted just so, configfs provides an interface
>>that's completely scriptable and navigable.
> 
> How does the kernel know when to actually create the object?

"actually create", huh? :)

In the trivial case Joel describes, the item is almost certainly
allocated during "# mkdir foo" when the subsystem will get a
->make_item() call for the 'mythingy' group it registerd.  The various
attribute writes then find the item by following their
configfs_attribute argument to the item that its embedded in.

But I bet you're not really asking about creation.  I bet you're
wondering how the kernel will know when enough attributes have been
filled and that it's safe to use the object.  Misguided items could
assign magical ordering to the attribute filling such that once a final
attribute is set, and others have been set, the item goes live.  That's
what ocfs2 does now, sadly, but certainly not as a long-term solution.

The missing piece is the 'commit_item' group operation that is yet to be
implemented.  The intent is to have a directory of pending items that
can have their attributes filled before being rename()ed into a
directory of items that are in active use.  The commit_item() call that
hits at rename() would give the kernel the chance to refuse the item
because attributes haven't been filled in or conflict with existing
items, or whatever.

- z

      reply	other threads:[~2005-04-05 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-03 19:57 [PATCH] configfs, a filesystem for userspace-driven kernel object configuration Joel Becker
2005-04-03 20:40 ` Joel Becker
2005-04-04 17:17 ` Arjan van de Ven
2005-04-05 18:03   ` Zach Brown
2005-04-05  6:41 ` Matt Mackall
2005-04-05 18:16   ` Zach Brown [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=4252D613.4070204@zabbo.net \
    --to=zab@zabbo.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.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