04 Jan, 2012

1 commit


27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

31 Mar, 2011

1 commit


24 Sep, 2009

1 commit


01 Aug, 2008

2 commits

  • Sysfs has the _ATTR() and _ATTR_RO() macros to make defining extended
    form attributes easier. configfs should have something similiar.

    - _CONFIGFS_ATTR() and _CONFIGFS_ATTR_RO() are the counterparts to the
    sysfs macros.
    - CONFIGFS_ATTR_STRUCT() creates the extended form attribute structure.
    - CONFIGFS_ATTR_OPS() defines the show_attribute()/store_attribute()
    operations that call the show()/store() operations of the extended
    form configfs_attributes.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • We now use PTR_ERR() in the ->make_item() and ->make_group() operations.
    Folks including configfs.h need err.h.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     

18 Jul, 2008

2 commits


15 Jul, 2008

1 commit

  • The configfs operations ->make_item() and ->make_group() currently
    return a new item/group. A return of NULL signifies an error. Because
    of this, -ENOMEM is the only return code bubbled up the stack.

    Multiple folks have requested the ability to return specific error codes
    when these operations fail. This patch adds that ability by changing the
    ->make_item/group() ops to return an int.

    Also updated are the in-kernel users of configfs.

    Signed-off-by: Joel Becker

    Joel Becker
     

30 Apr, 2008

1 commit


15 Feb, 2008

1 commit


11 Jul, 2007

6 commits

  • Sometimes other drivers depend on particular configfs items. For
    example, ocfs2 mounts depend on a heartbeat region item. If that
    region item is removed with rmdir(2), the ocfs2 mount must BUG or go
    readonly. Not happy.

    This provides two additional API calls: configfs_depend_item() and
    configfs_undepend_item(). A client driver can call
    configfs_depend_item() on an existing item to tell configfs that it is
    depended on. configfs will then return -EBUSY from rmdir(2) for that
    item. When the item is no longer depended on, the client driver calls
    configfs_undepend_item() on it.

    These API cannot be called underneath any configfs callbacks, as
    they will conflict. They can block and allocate. A client driver
    probably shouldn't calling them of its own gumption. Rather it should
    be providing an API that external subsystems call.

    How does this work? Imagine the ocfs2 mount process. When it mounts,
    it asks for a heart region item. This is done via a call into the
    heartbeat code. Inside the heartbeat code, the region item is looked
    up. Here, the heartbeat code calls configfs_depend_item(). If it
    succeeds, then heartbeat knows the region is safe to give to ocfs2.
    If it fails, it was being torn down anyway, and heartbeat can gracefully
    pass up an error.

    [ Fixed some bad whitespace in configfs.txt. --Mark ]

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • Add a notification callback, ops->disconnect_notify(). It has the same
    prototype as ->drop_item(), but it will be called just before the item
    linkage is broken. This way, configfs users who want to do work while
    the object is still in the heirarchy have a chance.

    Client drivers will still need to config_item_put() in their
    ->drop_item(), if they implement it. They need do nothing in
    ->disconnect_notify(). They don't have to provide it if they don't
    care. But someone who wants to be notified before ci_parent is set to
    NULL can now be notified.

    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • Convert the su_sem member of struct configfs_subsystem to a struct
    mutex, as that's what it is. Also convert all the users and update
    Documentation/configfs.txt and Documentation/configfs_example.c
    accordingly.

    [ Conflict in fs/dlm/config.c with commit
    3168b0780d06ace875696f8a648d04d6089654e5 manually resolved. --Mark ]

    Inspired-by: Satyam Sharma
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     
  • Configfs being based upon sysfs code, config_group_find_obj() is probably
    so named because of the similar kset_find_obj() in sysfs. However,
    "kobject"s in sysfs become "config_item"s in configfs, so let's call it
    config_group_find_item() instead, for sake of uniformity, and make
    corresponding change in the users of this function.

    BTW a crucial difference between kset_find_obj and config_group_find_item
    is in locking expectations. kset_find_obj does its locking by itself, but
    config_group_find_item expects the *caller* to do the locking. The reason
    for this: kset's have their own locks, config_group's don't but instead
    rely on the subsystem mutex. And, subsystem needn't necessarily be around
    when config_group_find_item() is called.

    So let's state these locking semantics explicitly, and rectify the comment,
    otherwise bugs could continue to occur in future, as they did in the past
    (refer commit d82b8191e238 in gfs2-2.6-fixes.git).

    [ I also took the opportunity to fix some bad whitespace and
    double-empty lines. --Joel ]

    [ Conflict in fs/dlm/config.c with commit
    3168b0780d06ace875696f8a648d04d6089654e5 manually resolved. --Mark ]

    Signed-off-by: Satyam Sharma
    Cc: David Teigland
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Satyam Sharma
     
  • fs/dlm/config.c contains a useful generic macro called __CONFIGFS_ATTR
    that is similar to sysfs' __ATTR macro that makes defining attributes
    easy for any user of configfs. Separate it out into configfs.h so that
    other users (forthcoming in dynamic netconsole patchset) can use it too.

    Signed-off-by: Satyam Sharma
    Cc: David Teigland
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Satyam Sharma
     
  • 1. item.c:config_item_cleanup() is a private function (only called by
    config_item_release() in same file). However, it is spuriously
    exported in include/linux/configfs.h, so remove that export and make
    it static in item.c. Also, it is no longer exported / interface
    function, so no need to give comment for this function (the comment
    was stating obvious thing, anyway).

    2. Kernel-doc comment format does not allow empty line between end of
    comment and start of function (declaration line). There were several
    such spurious empty lines in item.c, so fix them.

    fs/configfs/item.c | 15 +++------------
    include/linux/configfs.h | 1 -
    2 files changed, 3 insertions(+), 13 deletions(-)

    Signed-off-by: Satyam Sharma
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Satyam Sharma
     

13 Dec, 2006

1 commit


04 Feb, 2006

1 commit


04 Jan, 2006

1 commit