linux-stable/fs/sysfs
Eric W. Biederman 4e4d6d860b sysfs: Add s_hash to sysfs_dirent and order directory entries by hash
Compute a 31 bit hash of directory entries (that can fit in a signed
32bit off_t) and index the sysfs directory entries by that hash,
replacing the per directory indexes by name and by inode.  Because we
now only use a single rbtree this reduces the size of sysfs_dirent by 2
pointers.  Because we have fewer cases to deal with the code is now
simpler.

For now I use the simple hash that the dcache uses as that is easy to
use and seems simple enough.

In addition to makeing the code simpler using a hash for the file
position in readdir brings sysfs in line with other filesystems that
have non-trivial directory structures.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 12:36:17 -08:00
..
bin.c sysfs: only access bin file vm_ops with the active lock 2010-10-22 10:16:43 -07:00
dir.c sysfs: Add s_hash to sysfs_dirent and order directory entries by hash 2012-01-24 12:36:17 -08:00
file.c sysfs: propagate umode_t 2012-01-03 22:55:03 -05:00
group.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
inode.c sysfs: propagate umode_t 2012-01-03 22:55:03 -05:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile
mount.c Delay struct net freeing while there's a sysfs instance refering to it 2011-06-12 17:45:41 -04:00
symlink.c
sysfs.h sysfs: Add s_hash to sysfs_dirent and order directory entries by hash 2012-01-24 12:36:17 -08:00