19 Jul, 2007

1 commit


12 Jul, 2007

1 commit

  • As kobj sysfs dentries and inodes are gonna be made reclaimable,
    dentry can't be used as naming token for sysfs file/directory, replace
    kobj->dentry with kobj->sd. The only external interface change is
    shadow directory handling. All other changes are contained in kobj
    and sysfs.

    Signed-off-by: Tejun Heo
    Signed-off-by: Greg Kroah-Hartman

    Tejun Heo
     

03 May, 2007

1 commit


28 Apr, 2007

3 commits


08 Feb, 2007

1 commit

  • 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
    Cc: Maneesh Soni
    Signed-off-by: Greg Kroah-Hartman

    Eric W. Biederman
     

21 Dec, 2006

1 commit

  • Since kobject_uevent() function does not return an integer value to
    indicate if its operation was completed with success or not, it is worth
    changing it in order to report a proper status (success or error) instead
    of returning void.

    [randy.dunlap@oracle.com: Fix inline kobject functions]
    Cc: Mauricio Lin
    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Aneesh Kumar K.V
     

02 Dec, 2006

1 commit

  • Provide a function device_move() to move a device to a new parent device. Add
    auxilliary functions kobject_move() and sysfs_move_dir().
    kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
    previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
    interface kobject_uevent_env() is created that allows to add further
    environmental data to the uevent at the kobject layer.

    Signed-off-by: Cornelia Huck
    Acked-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     

26 Sep, 2006

1 commit

  • We're getting a lot of crashes in the sysfs/kobject/device/bus/class code and
    they're very hard to diagnose.

    I'm suspecting that in some cases this is because drivers aren't checking
    return values and aren't handling errors correctly. So the code blithely
    blunders on and crashes later in very obscure ways.

    There's just no reason to ignore errors which can and do occur. So the patch
    sprinkles __must_check all over these APIs.

    Causes 1,513 new warnings. Heh.

    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Andrew Morton
     

04 Aug, 2006

1 commit

  • Remove uevent dock notifications. There are no consumers
    of these events at present, and uevents are likely not the
    correct way to send this type of event anyway.

    Until I get some kind of idea if anyone in userspace cares
    about dock events, I will just not send any.

    Signed-off-by: Kristen Carlson Accardi
    Signed-off-by: Greg Kroah-Hartman

    Kristen Carlson Accardi
     

27 Jun, 2006

1 commit


22 Jun, 2006

1 commit


28 Apr, 2006

2 commits

  • This patch contains the following possible cleanups:
    - #if 0 the following unused global function:
    - subsys_remove_file()
    - remove the following unused EXPORT_SYMBOL's:
    - kset_find_obj
    - subsystem_init
    - remove the following unused EXPORT_SYMBOL_GPL:
    - kobject_add_dir

    Signed-off-by: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • This fixes a build error for various odd combinations of CONFIG_HOTPLUG
    and CONFIG_NET.

    Signed-off-by: Kay Sievers
    Cc: Nigel Cunningham
    Cc: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

15 Apr, 2006

1 commit

  • It works like this:
    Open the file
    Read all the contents.
    Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
    When poll returns,
    close the file and go to top of loop.
    or lseek to start of file and go back to the 'read'.

    Events are signaled by an object manager calling
    sysfs_notify(kobj, dir, attr);

    If the dir is non-NULL, it is used to find a subdirectory which
    contains the attribute (presumably created by sysfs_create_group).

    This has a cost of one int per attribute, one wait_queuehead per kobject,
    one int per open file.

    The name "sysfs_notify" may be confused with the inotify
    functionality. Maybe it would be nice to support inotify for sysfs
    attributes as well?

    This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
    to be pollable

    Signed-off-by: Neil Brown
    Signed-off-by: Greg Kroah-Hartman

    NeilBrown
     

21 Mar, 2006

2 commits


23 Feb, 2006

1 commit

  • This change reverts the 033b96fd30db52a710d97b06f87d16fc59fee0f1 commit
    from Kay Sievers that removed the mount/umount uevents from the kernel.
    Some older versions of HAL still depend on these events to detect when a
    new device has been mounted. These events are not correctly emitted,
    and are broken by design, and so, should not be relied upon by any
    future program. Instead, the /proc/mounts file should be polled to
    properly detect this kind of event.

    A feature-removal-schedule.txt entry has been added, noting when this
    interface will be removed from the kernel.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Jan, 2006

5 commits

  • lib/lib.a(kobject_uevent.o)(.text+0x25f): In function `kobject_uevent':
    : undefined reference to `__alloc_skb'
    lib/lib.a(kobject_uevent.o)(.text+0x2a1): In function `kobject_uevent':
    : undefined reference to `skb_over_panic'
    lib/lib.a(kobject_uevent.o)(.text+0x31d): In function `kobject_uevent':
    : undefined reference to `skb_over_panic'
    lib/lib.a(kobject_uevent.o)(.text+0x356): In function `kobject_uevent':
    : undefined reference to `netlink_broadcast'
    lib/lib.a(kobject_uevent.o)(.init.text+0x9): In function `kobject_uevent_init':
    : undefined reference to `netlink_kernel_create'
    make: *** [.tmp_vmlinux1] Error 1

    Netlink is unconditionally enabled if CONFIG_NET, so that's OK.

    kobject_uevent.o is compiled even if !CONFIG_HOTPLUG, which is lazy.

    Let's compound the sin.

    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    akpm@osdl.org
     
  • Leave the overloaded "hotplug" word to susbsystems which are handling
    real devices. The driver core does not "plug" anything, it just exports
    the state to userspace and generates events.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • The distinction between hotplug and uevent does not make sense these
    days, netlink events are the default.

    udev depends entirely on netlink uevents. Only during early boot and
    in initramfs, /sbin/hotplug is needed. So merge the two functions and
    provide only one interface without all the options.

    The netlink layer got a nice generic interface with named slots
    recently, which is probably a better facility to plug events for
    subsystem specific events.
    Also the new poll() interface to /proc/mounts is a nicer way to
    notify about changes than sending events through the core.
    The uevents should only be used for driver core related requests to
    userspace now.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • The names of these events have been confusing from the beginning
    on, as they have been more like claim/release events. We needed these
    events for noticing HAL if storage devices have been mounted.

    Thanks to Al, we have the proper solution now and can poll()
    /proc/mounts instead to get notfied about mount tree changes.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • It makes zero sense to have hotplug, but not the netlink
    events enabled today. Remove this option and merge the
    kobject_uevent.h header into the kobject.h header file.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

28 Oct, 2005

1 commit


21 Jun, 2005

2 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds