1. 11 7月, 2007 7 次提交
    • J
      configfs: config item dependancies. · 631d1feb
      Joel Becker 提交于
      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: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      631d1feb
    • J
      configfs: accessing item hierarchy during rmdir(2) · 299894cc
      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: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      299894cc
    • J
      [PATCH] configsfs buffer: use mutex · 6d748924
      Johannes Berg 提交于
      Seems copied from sysfs, but I don't see a reason here nor there to use
      a semaphore instead of a mutex. Convert.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      6d748924
    • J
      configfs: Convert subsystem semaphore to mutex · e6bd07ae
      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
        3168b078 manually resolved. --Mark ]
      Inspired-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      e6bd07ae
    • S
      [PATCH] configfs+dlm: Rename config_group_find_obj and state semantics clearly · 3fe6c5ce
      Satyam Sharma 提交于
      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
        3168b078 manually resolved. --Mark ]
      Signed-off-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Cc: David Teigland <teigland@redhat.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      3fe6c5ce
    • S
      configfs: misc cleanups · 4c62b534
      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: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      4c62b534
    • J
      configfs: consistent attribute size · b23cdde4
      Joel Becker 提交于
      The attribute store/show code currently limits attributes at PAGE_SIZE.
      This code comes from sysfs, where it still works that way.
      
      However, PAGE_SIZE is not constant.  A 16k attribute string works on
      ia64 but not on x86.  Really a subsystem shouldn't allow different
      attribute sizes based on platform.
      
      As such, limit all simple attributes to 4k.  This works on all
      platforms, and is consistent with all current code.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      b23cdde4
  2. 22 5月, 2007 1 次提交
    • A
      Detach sched.h from mm.h · e8edc6e0
      Alexey Dobriyan 提交于
      First thing mm.h does is including sched.h solely for can_do_mlock() inline
      function which has "current" dereference inside. By dealing with can_do_mlock()
      mm.h can be detached from sched.h which is good. See below, why.
      
      This patch
      a) removes unconditional inclusion of sched.h from mm.h
      b) makes can_do_mlock() normal function in mm/mlock.c
      c) exports can_do_mlock() to not break compilation
      d) adds sched.h inclusions back to files that were getting it indirectly.
      e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
         getting them indirectly
      
      Net result is:
      a) mm.h users would get less code to open, read, preprocess, parse, ... if
         they don't need sched.h
      b) sched.h stops being dependency for significant number of files:
         on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
         after patch it's only 3744 (-8.3%).
      
      Cross-compile tested on
      
      	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
      	alpha alpha-up
      	arm
      	i386 i386-up i386-defconfig i386-allnoconfig
      	ia64 ia64-up
      	m68k
      	mips
      	parisc parisc-up
      	powerpc powerpc-up
      	s390 s390-up
      	sparc sparc-up
      	sparc64 sparc64-up
      	um-x86_64
      	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig
      
      as well as my two usual configs.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e8edc6e0
  3. 10 5月, 2007 1 次提交
  4. 03 5月, 2007 1 次提交
  5. 15 3月, 2007 1 次提交
  6. 13 2月, 2007 2 次提交
  7. 12 2月, 2007 1 次提交
  8. 08 2月, 2007 1 次提交
  9. 09 12月, 2006 1 次提交
  10. 08 12月, 2006 1 次提交
  11. 02 12月, 2006 2 次提交
  12. 21 10月, 2006 1 次提交
  13. 03 10月, 2006 1 次提交
  14. 01 10月, 2006 1 次提交
  15. 27 9月, 2006 2 次提交
  16. 21 9月, 2006 1 次提交
  17. 30 6月, 2006 1 次提交
  18. 29 6月, 2006 1 次提交
  19. 27 6月, 2006 1 次提交
  20. 23 6月, 2006 1 次提交
    • D
      [PATCH] VFS: Permit filesystem to override root dentry on mount · 454e2398
      David Howells 提交于
      Extend the get_sb() filesystem operation to take an extra argument that
      permits the VFS to pass in the target vfsmount that defines the mountpoint.
      
      The filesystem is then required to manually set the superblock and root dentry
      pointers.  For most filesystems, this should be done with simple_set_mnt()
      which will set the superblock pointer and then set the root dentry to the
      superblock's s_root (as per the old default behaviour).
      
      The get_sb() op now returns an integer as there's now no need to return the
      superblock pointer.
      
      This patch permits a superblock to be implicitly shared amongst several mount
      points, such as can be done with NFS to avoid potential inode aliasing.  In
      such a case, simple_set_mnt() would not be called, and instead the mnt_root
      and mnt_sb would be set directly.
      
      The patch also makes the following changes:
      
       (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
           pointer argument and return an integer, so most filesystems have to change
           very little.
      
       (*) If one of the convenience function is not used, then get_sb() should
           normally call simple_set_mnt() to instantiate the vfsmount. This will
           always return 0, and so can be tail-called from get_sb().
      
       (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
           dcache upon superblock destruction rather than shrink_dcache_anon().
      
           This is required because the superblock may now have multiple trees that
           aren't actually bound to s_root, but that still need to be cleaned up. The
           currently called functions assume that the whole tree is rooted at s_root,
           and that anonymous dentries are not the roots of trees which results in
           dentries being left unculled.
      
           However, with the way NFS superblock sharing are currently set to be
           implemented, these assumptions are violated: the root of the filesystem is
           simply a dummy dentry and inode (the real inode for '/' may well be
           inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
           with child trees.
      
           [*] Anonymous until discovered from another tree.
      
       (*) The documentation has been adjusted, including the additional bit of
           changing ext2_* into foo_* in the documentation.
      
      [akpm@osdl.org: convert ipath_fs, do other stuff]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      454e2398
  21. 09 6月, 2006 1 次提交
  22. 18 5月, 2006 2 次提交
  23. 11 4月, 2006 1 次提交
  24. 29 3月, 2006 1 次提交
  25. 04 2月, 2006 2 次提交
  26. 18 1月, 2006 1 次提交
  27. 10 1月, 2006 1 次提交
  28. 04 1月, 2006 1 次提交