Skip to content

Allow sysfs to be dynamically populated

Matthew Wilcox lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Fix updating of named attribute groupsfs/sysfs/group.c+13 -63 replies
2/3Sysfs: Allow directories to be populated dynamicallyfs/sysfs/dir.c fs/sysfs/group.c fs/sysfs/sysfs.h+150 -197 replies
3/3Expose MSI-X interrupts through a dynamically generated sysfs directorydrivers/pci/msi.c fs/sysfs/group.c include/linux/pci.h +1 more+90 -53 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Allow sysfs to be dynamically populated

The first patch in this series is just a bugfix.

The second and third patches offer progressively more flexibility to dynamically construct the contents of sysfs directories. The second patch delays the allocation of sysfs_dirents until the contents of the directory is requested. This functionality is only used by the attribute_groups in that patch, but could (in principle) be extended to other directory providers.

The third patch extends this to permit attribute groups to be dynamically constructed before the directory they're in is populated. I also add a user for this; the much-requested ability to display the MSI-X vectors in use by a device.

Both patches also deconstruct the directories / attribute groups when the dentry of the directory goes out of cache.

Signature · 4 lines
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."