android_kernel_xiaomi_sm8350/include
Eric W. Biederman b592fcfe7f sysfs: Shadow directory support
The problem.  When implementing a network namespace I need to be able
to have multiple network devices with the same name.  Currently this
is a problem for /sys/class/net/*. 

What I want is a separate /sys/class/net directory in sysfs for each
network namespace, and I want to name each of them /sys/class/net.

I looked and the VFS actually allows that.  All that is needed is
for /sys/class/net to implement a follow link method to redirect
lookups to the real directory you want. 

Implementing a follow link method that is sensitive to the current
network namespace turns out to be 3 lines of code so it looks like a
clean approach.  Modifying sysfs so it doesn't get in my was is a bit
trickier. 

I am calling the concept of multiple directories all at the same path
in the filesystem shadow directories.  With the directory entry really
at that location the shadow master. 

The following patch modifies sysfs so it can handle a directory
structure slightly different from the kobject tree so I can implement
the shadow directories for handling /sys/class/net/.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 10:37:14 -08:00
..
acpi
asm-alpha [PATCH] alpha: fix epoll syscall enumerations 2007-02-03 11:26:06 -08:00
asm-arm [ARM] 4111/1: Allow VFP to work with thread migration on SMP 2007-01-25 16:35:29 +00:00
asm-arm26
asm-avr32
asm-cris
asm-frv [PATCH] fix frv headers_check 2007-02-01 16:17:05 -08:00
asm-generic Fix Maple PATA IRQ assignment. 2007-01-26 17:27:40 -05:00
asm-h8300
asm-i386 [PATCH] i386 vDSO: use VM_ALWAYSDUMP 2007-01-26 13:50:58 -08:00
asm-ia64 [IA64] swiotlb abstraction (e.g. for Xen) 2007-02-05 18:53:04 -08:00
asm-m32r
asm-m68k [PATCH] m68k: uaccess.h needs sched.h 2007-01-30 08:26:45 -08:00
asm-m68knommu
asm-mips [MIPS] Comment fix 2007-02-06 16:53:24 +00:00
asm-parisc
asm-powerpc [PATCH] dma-mapping.h stubs fix 2007-01-30 08:39:21 -08:00
asm-ppc
asm-s390 [S390] Mark kernel text section read-only. 2007-02-05 21:18:41 +01:00
asm-sh
asm-sh64
asm-sparc [SPARC32]: Fix over-optimization by GCC near ip_fast_csum. 2007-02-01 20:24:35 -08:00
asm-sparc64
asm-um [PATCH] uml-i386: fix build breakage with CONFIG_HIGHMEM 2007-02-01 16:17:06 -08:00
asm-v850
asm-x86_64 [IA64] swiotlb abstraction (e.g. for Xen) 2007-02-05 18:53:04 -08:00
asm-xtensa [PATCH] FD_ZERO build fix 2007-01-11 18:18:22 -08:00
crypto
keys
linux sysfs: Shadow directory support 2007-02-07 10:37:14 -08:00
math-emu
media
mtd
net [TCP]: Restore SKB socket owner setting in tcp_transmit_skb(). 2007-01-26 01:04:55 -08:00
pcmcia Driver core: convert pcmcia code to use struct device 2007-02-07 10:37:11 -08:00
rdma IB: Make sure struct ib_user_mad.data is aligned 2007-02-04 14:11:56 -08:00
rxrpc
scsi
sound [PATCH] ALSA: Fix sysfs breakage 2007-01-29 14:32:53 -08:00
video
Kbuild