01 Dec, 2016

1 commit

  • Documentation/filesystems/configfs/configfs.txt says:

    "When unlink(2) is called on the symbolic link, the source item is
    notified via the ->drop_link() method. Like the ->drop_item() method,
    this is a void function and cannot return failure."

    The ->drop_item() is indeed a void function, the ->drop_link() is
    actually not. This, together with the fact that the value of ->drop_link()
    is silently ignored suggests, that it is the ->drop_link() return
    type that should be corrected and changed to void.

    This patch changes drop_link() signature and all its users.

    Signed-off-by: Andrzej Pietrasiewicz
    [hch: reverted reformatting of some code]
    Signed-off-by: Christoph Hellwig

    Andrzej Pietrasiewicz
     

06 Mar, 2016

1 commit

  • Replace the current NULL-terminated array of default groups with a linked
    list. This gets rid of lots of nasty code to size and/or dynamically
    allocate the array.

    While we're at it also provide a conveniant helper to remove the default
    groups.

    Signed-off-by: Christoph Hellwig
    Acked-by: Felipe Balbi [drivers/usb/gadget]
    Acked-by: Joel Becker
    Acked-by: Nicholas Bellinger
    Reviewed-by: Sagi Grimberg

    Christoph Hellwig
     

04 Jan, 2016

1 commit

  • ConfigFS lacked binary attributes up until now. This patch
    introduces support for binary attributes in a somewhat similar
    manner of sysfs binary attributes albeit with changes that
    fit the configfs usage model.

    Problems that configfs binary attributes fix are everything that
    requires a binary blob as part of the configuration of a resource,
    such as bitstream loading for FPGAs, DTBs for dynamically created
    devices etc.

    Look at Documentation/filesystems/configfs/configfs.txt for internals
    and howto use them.

    This patch is against linux-next as of today that contains
    Christoph's configfs rework.

    Signed-off-by: Pantelis Antoniou
    [hch: folded a fix from Geert Uytterhoeven ]
    [hch: a few tiny updates based on review feedback]
    Signed-off-by: Christoph Hellwig

    Pantelis Antoniou
     

14 Oct, 2015

1 commit

  • Remove the old show_attribute and store_attribute methods and update
    the documentation. Also replace the two C samples with a single new
    one in the proper samples directory where people expect to find it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Christoph Hellwig
     

04 Jan, 2012

1 commit


27 May, 2011

1 commit

  • When configfs_register_subsystem() fails, we unregister too many
    subsystems in configfs_example_init. Decrement i by one to not unregister
    non-registered subsystem.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Jiri Slaby
    Cc: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

31 Mar, 2011

1 commit


19 Nov, 2010

1 commit

  • If "p" is NULL then it will cause an oops when we pass it to
    simple_strtoul(). In this case "p" can not be NULL so I removed the
    check. I also changed the check a little to make it more explicit that
    we are testing whether p points to the NUL char.

    Signed-off-by: Dan Carpenter
    Acked-by: Joel Becker
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

13 Aug, 2008

1 commit

  • Currently source files in the Documentation/ sub-dir can easily bit-rot
    since they are not generally buildable, either because they are hidden in
    text files or because there are no Makefile rules for them. This needs to
    be fixed so that the source files remain usable and good examples of code
    instead of bad examples.

    Add the ability to build source files that are in the Documentation/ dir.
    Add to Kconfig as "BUILD_DOCSRC" config symbol.

    Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
    Documentation/ sources. Or enable BUILD_DOCSRC in the *config system.
    However, this symbol depends on HEADERS_CHECK since the header files need
    to be installed (for userspace builds).

    Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
    sparc64, powerpc, sh, m68k, & mips.

    Signed-off-by: Randy Dunlap
    Reviewed-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

01 Aug, 2008

1 commit

  • 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
     

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
     

03 Feb, 2008

1 commit


20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

11 Jul, 2007

3 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
     

30 Nov, 2006

1 commit

  • This patch fixes typos in various Documentation txts. The patch addresses some
    +words starting with the letters 'U-Z'.

    Looks like I made it through the alphabet...just in time to start over again
    +too! Maybe I can fit more profound fixes into the next round...? Time will
    +tell. :)

    Signed-off-by: Matt LaPlante
    Acked-by: Randy Dunlap
    Signed-off-by: Adrian Bunk

    Matt LaPlante
     

04 Oct, 2006

4 commits


30 Jun, 2006

1 commit


04 Feb, 2006

1 commit


04 Jan, 2006

1 commit