public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@osdl.org>, Greg KH <greg@kroah.com>,
	Patrick Mochel <mochel@digitalimplant.org>
Subject: Re: [PATCH] configfs, a filesystem for userspace-driven kernel object configuration
Date: Mon, 4 Apr 2005 23:41:53 -0700	[thread overview]
Message-ID: <20050405064153.GI25554@waste.org> (raw)
In-Reply-To: <20050403195728.GH31163@ca-server1.us.oracle.com>

On Sun, Apr 03, 2005 at 12:57:28PM -0700, Joel Becker wrote:
> Folks,
> 	I humbly submit configfs.  With configfs, a configfs
> config_item is created via an explicit userspace operation: mkdir(2).
> It is destroyed via rmdir(2).  The attributes appear at mkdir(2) time,
> and can be read or modified via read(2) and write(2).  readdir(3)
> queries the list of items and/or attributes.
> 	The lifetime of the filesystem representation is completely
> driven by userspace.  The lifetime of the objects themselves are managed
> by a kref, but at rmdir(2) time they disappear from the filesystem.
> 	configfs is not intended to replace sysfs or procfs, merely to
> coexist with them.
> 	An interface in /proc where the API is: 
> 
> 	# echo "create foo 1 3 0x00013" > /proc/mythingy
> 
> or an ioctl(2) interface where the API is:
> 
> 	struct mythingy_create {
> 		char *name;
> 		int index;
> 		int count;
> 		unsigned long address;
> 	}
> 
> 	do_create {
> 		mythingy_create = {"foo", 1, 3, 0x0013};
> 		return ioctl(fd, MYTHINGY_CREATE, &mythingy_create);
> 	}
> 
> 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?

-- 
Mathematics is the supreme nostalgia of our time.

  parent reply	other threads:[~2005-04-05  6:42 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 [this message]
2005-04-05 18:16   ` Zach Brown

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=20050405064153.GI25554@waste.org \
    --to=mpm@selenic.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@digitalimplant.org \
    /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