Lines Matching refs:configfs
13 What is configfs?
16 configfs is a ram-based filesystem that provides the converse of
18 kernel objects, configfs is a filesystem-based manager of kernel
29 A configfs config_item is created via an explicit userspace operation:
37 Both sysfs and configfs can and should exist together on the same
40 Using configfs
43 configfs can be compiled as a module or into the kernel. You can access
46 mount -t configfs none /config
48 The configfs tree will be empty unless client modules are also loaded.
49 These are modules that register their item types with configfs as
52 configfs tree is always there, whether mounted on /config or not.
59 There are two types of configfs attributes:
65 normal configfs attributes, userspace processes should first read the entire
87 access remote block devices. Call it FakeNBD. FakeNBD uses configfs
90 the driver about it. Here's where configfs comes in.
92 When the FakeNBD driver is loaded, it registers itself with configfs.
118 Coding With configfs
121 Every object in configfs is a config_item. A config_item reflects an
123 object. configfs handles the filesystem representation of that object
129 Items are created by mkdir(2) and removed by rmdir(2), but configfs
133 the client module registers the subsystem with configfs, the subsystem
134 appears as a directory at the top of the configfs filesystem. A
164 configfs.
175 By itself, a config_item cannot do much more than appear in configfs.
220 configfs directory, it must define a configfs_attribute describing it.
222 config_item_type->ct_attrs. When the item appears in configfs, the
243 appear as the contents of a file in the item's configfs directory.
245 config_item_type->ct_bin_attrs, and the item appears in configfs, the
303 and returns it to configfs. Configfs will then populate the filesystem
315 the ct_group_ops->drop_item() method, and configfs will call
320 is called, configfs WILL remove the item from the filesystem tree
325 is gone from configfs.
332 configfs has removed the item from the filesystem view but before the
338 is implemented in the configfs rmdir(2) code. ->drop_item() will not be
346 tells configfs to make the subsystem appear in the file tree::
364 will be visible via configfs. At that point, mkdir(2) can be called and
372 samples/configfs/configfs_sample.c. It shows a trivial object displaying
379 There is an extra bonus that configfs provides. The config_groups and
387 to see the tree created by the subsystem. This can race with configfs'
388 management of the hierarchy, so configfs uses the subsystem mutex to
397 never be NULL while the item is in configfs, and that an item will only
405 configfs provides a simple group via the group->item parent/child
413 These links are only allowed between configfs config_items. Any
414 symlink(2) attempt outside the configfs filesystem will be denied.
429 allowed in configfs.
439 others, configfs provides a method whereby one or many subgroups are
450 A configfs subsystem specifies default groups by adding them using the
452 structure. Each added group is populated in the configfs tree at the same
465 Sometimes other drivers depend on particular configfs items. For
470 configfs provides two additional API calls: configfs_depend_item() and
472 configfs_depend_item() on an existing item to tell configfs that it is
473 depended on. configfs will then return -EBUSY from rmdir(2) for that
477 These API cannot be called underneath any configfs callbacks, as
513 initialized in a way that makes sense. configfs provides this as
516 configfs still uses only normal filesystem operations. An item is
521 committable items. When this group appears in configfs, mkdir(2) will