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
     

15 Mar, 2007

1 commit

  • d_alloc() failure in configfs_register_subsystem() would fail to unlock
    the mutex taken above. Reorganize the exit path to ensure the unlock
    happens.

    Reported-by: Akinobu Mita
    Signed-off-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Joel Becker
     

13 Feb, 2007

1 commit

  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

12 Feb, 2007

1 commit

  • Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
    corresponding "kmem_cache_zalloc()" call.

    Signed-off-by: Robert P. J. Day
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Roland McGrath
    Cc: James Bottomley
    Cc: Greg KH
    Acked-by: Joel Becker
    Cc: Steven Whitehouse
    Cc: Jan Kara
    Cc: Michael Halcrow
    Cc: "David S. Miller"
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

09 Dec, 2006

1 commit


02 Dec, 2006

2 commits


01 Oct, 2006

1 commit


21 Sep, 2006

1 commit

  • For all child objects, creation comes through mkdir(2), so duplicate names
    are prevented.

    Subsystems, though, are registered by client drivers at init_module()/__init
    time. This patch prevents duplicate subsystem names.

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

    Joel Becker
     

30 Jun, 2006

1 commit


27 Jun, 2006

1 commit

  • This patch converts the combination of list_del(A) and list_add(A, B) to
    list_move(A, B) under fs/.

    Cc: Ian Kent
    Acked-by: Joel Becker
    Cc: Neil Brown
    Cc: Hans Reiser
    Cc: Urban Widmark
    Acked-by: David Howells
    Acked-by: Mark Fasheh
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

18 May, 2006

2 commits


11 Apr, 2006

1 commit


29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

04 Feb, 2006

1 commit


10 Jan, 2006

1 commit


04 Jan, 2006

1 commit