Skip to content

Sysfs cleanups & tagged directory support

Eric W. Biederman containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest25 patches 53 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25sysfs: Move all of inode initialization into sysfs_init_inodefs/sysfs/dir.c fs/sysfs/inode.c fs/sysfs/mount.c+45 -451 reply
2/25sysfs: Remove sysfs_instantiatefs/sysfs/dir.c fs/sysfs/inode.c fs/sysfs/sysfs.h+1 -191 reply
3/25sysfs: Use kill_anon_superfs/sysfs/mount.c+1 -11 reply
4/25sysfs: Make sysfs_mount staticfs/sysfs/dir.c fs/sysfs/mount.c fs/sysfs/symlink.c +1 more+5 -91 reply
5/25sysfs: In sysfs_lookup don't open code sysfs_find_direntfs/sysfs/dir.c+1 -31 reply
6/25sysfs: Simplify readdir.fs/sysfs/dir.c+44 -1311 reply
7/25sysfs: Rewrite sysfs_drop_dentry.fs/sysfs/dir.c+26 -271 reply
8/25sysfs: Implement __sysfs_get_dentryfs/sysfs/dir.c+38 -01 reply
9/25sysfs: Move sysfs_get_dentry below __sysfs_get_dentryfs/sysfs/dir.c+98 -981 reply
10/25sysfs: Rewrite sysfs_get_dentry in terms of __sysfs_get_dentryfs/sysfs/dir.c+6 -171 reply
11/25sysfs: Remove s_dentryfs/sysfs/dir.c fs/sysfs/mount.c fs/sysfs/sysfs.h+4 -301 reply
12/25sysfs: Introduce sysfs_rename_mutexfs/sysfs/dir.c fs/sysfs/file.c fs/sysfs/sysfs.h+12 -13 replies
13/25sysfs: Simply sysfs_get_dentryfs/sysfs/dir.c+6 -421 reply
14/25sysfs: Don't use lookup_one_len_kernfs/sysfs/dir.c+39 -23 replies
15/25vfs: Remove lookup_one_len_kernfs/namei.c include/linux/namei.h+11 -361 reply
16/25sysfs: Support for preventing unmounts.fs/sysfs/mount.c fs/sysfs/sysfs.h+81 -80 replies
17/25sysfs: Rewrite rename in terms of sysfs direntsfs/sysfs/dir.c+16 -202 replies
18/25sysfs: Rewrite sysfs_move_dir in terms of sysfs direntsfs/sysfs/dir.c+18 -161 reply
19/25sysfs: sysfs_get_dentry add a sb parameterfs/sysfs/dir.c fs/sysfs/file.c fs/sysfs/sysfs.h+10 -82 replies
20/25sysfs: Rename Support multiple superblocksfs/sysfs/dir.c+136 -576 replies
21/25sysfs: sysfs_chmod_file handle multiple superblocksfs/sysfs/file.c+25 -161 reply
22/25sysfs: sysfs_uptdate_file handle multiple superblocksfs/sysfs/file.c+21 -141 reply
23/25sysfs: Implement sysfs tagged directory support.fs/sysfs/bin.c fs/sysfs/dir.c fs/sysfs/file.c +6 more+253 -331 reply
24/25sysfs: Implement sysfs_delete_link and sysfs_rename_linkfs/sysfs/symlink.c include/linux/sysfs.h+49 -00 replies
25/25driver core: Implement tagged directory support for device classes.drivers/base/class.c drivers/base/core.c include/linux/device.h+52 -250 replies

Reviews trailers per patch

12 of 25 patches have a Reviewed-by or Acked-by.

PatchTejun Heo
1/25A-b
2/25A-b
3/25A-b
4/25A-b
5/25A-b
6/25A-b
7/25
8/25A-b
9/25A-b
10/25A-b
11/25A-b
12/25
13/25A-b
14/25
15/25A-b
16/25
17/25
18/25
19/25
20/25
21/25
22/25
23/25
24/25
25/25

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/25] Sysfs cleanups & tagged directory support

The following patchset applies on top of the last round of sysfs cleanups that Tejun sent out on the 2nd.

My target with this patchset is to support sysfs directories with a tag on struct sysfs_dirent making them visible only on selected mounts of sysfs.

After going around and around the different possibilities I believe I have finally found something that works and is
reasonably maintainable. I believe I have achieved that
with only introducing some extra complexity in a few very localized places.

The worst part is the code to support multiple superblocks and thus multiple dentry tress for sysfs. I had allocate a linked list in sysfs_move_dir for all of the possible dentries I would need to call d_move on. Bleh. It works, it is correct and it is an atomic rename.

Eric

sysfs: Move all of inode initialization into sysfs_init_inode
sysfs: Remove sysfs_instantiate
sysfs: Use kill_anon_super
sysfs: Make sysfs_mount static
sysfs: In sysfs_lookup don't open code sysfs_find_dirent
sysfs: Simplify readdir.
sysfs: Rewrite sysfs_drop_dentry.
sysfs: Implement __sysfs_get_dentry
sysfs: Move sysfs_get_dentry below __sysfs_get_dentry
sysfs: Rewrite sysfs_get_dentry in terms of __sysfs_get_dentry
sysfs: Remove s_dentry
sysfs: Introduce sysfs_rename_mutex
sysfs: Simply sysfs_get_dentry
sysfs: Don't use lookup_one_len_kern
vfs: Remove lookup_one_len_kern
sysfs: Support for preventing unmounts.
sysfs: Rewrite rename in terms of sysfs dirents
sysfs: Rewrite sysfs_move_dir in terms of sysfs dirents
sysfs: sysfs_get_dentry add a sb parameter
sysfs: Rename Support multiple superblocks
sysfs: sysfs_chmod_file handle multiple superblocks
sysfs: sysfs_uptdate_file handle multiple superblocks
sysfs: Implement sysfs tagged directory support.
sysfs: Implement sysfs_delete_link and sysfs_rename_link driver core: Implement tagged directory support for device classes.