1. 01 5月, 2007 1 次提交
  2. 08 3月, 2007 11 次提交
  3. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  4. 13 2月, 2007 3 次提交
  5. 12 2月, 2007 1 次提交
  6. 07 2月, 2007 3 次提交
  7. 06 2月, 2007 20 次提交
    • R
      [DLM/GFS2] indent help text · 9beeb9f3
      Randy Dunlap 提交于
      Indent help text as expected.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      9beeb9f3
    • R
      [GFS2] Fix unlink deadlocks · ddee7608
      Russell Cattelan 提交于
      Move the glock acquisition to outside of the transactions.
      
      Lock odering must be preserved in order to prevent ABBA
      deadlocks. The current gfs2_change_nlink code would tries
      to grab the glock after having started a transaction and thus is holding
      the log lock. This is inconsistent with other code paths in
      gfs that grab the resource group glock prior to staring
      a tranactions.
      
      One problem with this fix is that the resource group
      lock is always grabbed now even if the inode still has
      ref count and can not be marked for unlink.
      Signed-off-by: NRussell Cattelan <cattelan@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ddee7608
    • S
      [GFS2] Put back semaphore to avoid umount problem · 61be084e
      Steven Whitehouse 提交于
      Dave Teigland fixed this bug a while back, but I managed to mistakenly
      remove the semaphore during later development. It is required to avoid
      the list of inodes changing during an invalidate_inodes call. I have
      made it an rwsem since the read side will be taken frequently during
      normal filesystem operation. The write site will only happen during
      umount of the file system.
      
      Also the bug only triggers when using the DLM lock manager and only then
      under certain conditions as its timing related.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: David Teigland <teigland@redhat.com>
      61be084e
    • E
      [GFS2] more CURRENT_TIME_SEC · bbb28ab7
      Eric Sandeen 提交于
      Whoops, quilt user error, missed this one in the previous patch.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      bbb28ab7
    • A
      [GFS2/DLM] fix GFS2 circular dependency · 00117277
      Adrian Bunk 提交于
      On Sun, Jan 28, 2007 at 11:08:18AM +0100, Jiri Slaby wrote:
      > Andrew Morton napsal(a):
      > >Temporarily at
      > >
      > >	http://userweb.kernel.org/~akpm/2.6.20-rc6-mm1/
      >
      > Unable to select IPV6. Menuconfig doesn't offer it when INET is selected.
      > When it's not it appears in the menu, but after state change it gets away.
      > The same behaviour in xconfig, gconfig.
      >
      > $ mkdir ../a/tst
      > $ make O=../a/tst menuconfig
      >   HOSTCC  scripts/basic/fixdep
      > [...]
      >   HOSTLD  scripts/kconfig/mconf
      > scripts/kconfig/mconf arch/i386/Kconfig
      > Warning! Found recursive dependency: INET GFS2_FS_LOCKING_DLM SYSFS
      > OCFS2_FS INET
      >
      > Maybe this is the problem?
      
      Yes, patch below.
      
      > regards,
      
      cu
      Adrian
      
      <--  snip  -->
      
      This patch fixes a circular dependency by letting GFS2_FS_LOCKING_DLM
      and DLM depend on instead of select SYSFS.
      
      Since SYSFS depends on EMBEDDED this change shouldn't cause any problems
      for users.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      00117277
    • R
      [GFS2/DLM] use sysfs · 67f55897
      Randy Dunlap 提交于
      With CONFIG_DLM=m, CONFIG_PROC_FS=n, and CONFIG_SYSFS=n, kernel build
      fails with:
      
      WARNING: "kernel_subsys" [fs/gfs2/locking/dlm/lock_dlm.ko] undefined!
      WARNING: "kernel_subsys" [fs/dlm/dlm.ko] undefined!
      WARNING: "kernel_subsys" [fs/configfs/configfs.ko] undefined!
      make[1]: *** [__modpost] Error 1
      make: *** [modules] Error 2
      
      Since fs/dlm/lockspace.c and fs/gfs2/locking/dlm/sysfs.c use
      kernel_subsys, they should either DEPEND on it or SELECT it.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      67f55897
    • D
      [GFS2] make lock_dlm drop_count tunable in sysfs · ee32e4f3
      David Teigland 提交于
      We want to be able to change or disable the default drop_count (number at
      which the dlm asks gfs to limit the the number of locks it's holding).
      Add it to the collection of sysfs tunables for an fs.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ee32e4f3
    • D
      [GFS2] increase default lock limit · 2f708649
      David Teigland 提交于
      Increase the number of locks at which point the dlm begins asking gfs to
      reduce its lock usage.  The default value is largely arbitrary, but the
      current value of 50,000 ends up limiting performance unnecessarily for too
      many users.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      2f708649
    • S
      [GFS2] Fix list corruption in lops.c · 8bd95727
      Steven Whitehouse 提交于
      The patch below appears to fix the list corruption that we are seeing on
      occasion. Although the transaction structure is private to a single
      thread, when the queued structures are dismantled during an in-core
      commit, its possible for a different thread to be trying to add the same
      structure to another, new, transaction at the same time.
      
      To avoid this, this patch takes the log spinlock during this operation.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8bd95727
    • S
      [GFS2] Fix recursive locking attempt with NFS · d7c103d0
      Steven Whitehouse 提交于
      In certain cases, its possible for NFS to call the lookup code while
      holding the glock (when doing a readdirplus operation) so we need to
      check for that and not try and lock the glock twice. This also fixes a
      typo in a previous NFS related GFS2 patch.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d7c103d0
    • S
      [GFS2] Fix typo in glock.c · d043e190
      Steven Whitehouse 提交于
      This is a one letter typo fix in glock.c, spotted by Rob Kenna.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d043e190
    • E
      [GFS2] use CURRENT_TIME_SEC instead of get_seconds in gfs2 · ddfe0627
      Eric Sandeen 提交于
      I was looking something else up and came across this...
      
      I don't honestly have a good reason to change it other than to make it
      like every other Linux filesystem in this regard.  ;-)  It doesn't
      functionally change anything, but makes some lines shorter. :)
      
      I'm also curious; why does gfs2 have 64-bits of on-disk timestamps, but
      not in timespec_t format, and only stores second resolutions?  Seems like
      you're halfway to sub-second resolutions already.
      
      I suppose if that gets implemented then all of the below should
      instead be CURRENT_TIME not CURRENT_TIME_SEC.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ddfe0627
    • S
      [GFS2] Compile fix for glock.c · 90101c31
      Steven Whitehouse 提交于
      This one liner got missed from the previous patch.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      90101c31
    • S
      [GFS2] Remove queue_empty() function · 12132933
      Steven Whitehouse 提交于
      This function is not longer required since we do not do recursive
      locking in the glock layer. As a result all its callers can be
      replaceed with list_empty() calls.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      12132933
    • S
      [GFS2] Tidy up glops calls · b5d32bea
      Steven Whitehouse 提交于
      This patch doesn't make any changes to the ordering of the various
      operations related to glocking, but it does tidy up the calls to the
      glops.c functions to make the structure more obvious.
      
      The two functions: gfs2_glock_xmote_th() and gfs2_glock_drop_th() can be
      made static within glock.c since they are called by every set of glock
      operations. The xmote_th and drop_th glock operations are then made
      conditional upon those two routines existing and called from the
      previously mentioned functions in glock.c respectively.
      
      Also it can be seen that the go_sync operation isn't needed since it can
      easily be replaced by calls to xmote_bh and drop_bh respectively. This
      results in no longer (confusingly) calling back into routines in glock.c
      from glops.c and also reducing the glock operations by one member.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b5d32bea
    • S
      [GFS2] Remove local exclusive glock mode · 1c0f4872
      Steven Whitehouse 提交于
      Here is a patch for GFS2 to remove the local exclusive flag. In
      the places it was used, mutex's are always held earlier in the
      call path, so it appears redundant in the LM_ST_SHARED case.
      
      Also, the GFS2 holders were setting local exclusive in any case where
      the requested lock was LM_ST_EXCLUSIVE. So the other places in the glock
      code where the flag was tested have been replaced with tests for the
      lock state being LM_ST_EXCLUSIVE in order to ensure the logic is the
      same as before (i.e. LM_ST_EXCLUSIVE is always locally exclusive as well
      as globally exclusive).
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1c0f4872
    • S
      [GFS2] Remove unused go_callback operation · 6bd9c8c2
      Steven Whitehouse 提交于
      This is never used, so we might as well remove it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      6bd9c8c2
    • S
      [GFS2] Remove the "greedy" function from glock.[ch] · e5dab552
      Steven Whitehouse 提交于
      The "greedy" code was an attempt to retain glocks for a minimum length
      of time when they relate to mmap()ed files. The current implementation
      of this feature is not, however, ideal in that it required allocating
      memory in order to do this and its overly complicated.
      
      It also misses the mark by ignoring the other I/O operations which are
      just as likely to suffer from the same problem. So the plan is to remove
      this now and then add the functionality back as part of the glock state
      machine at a later date (and thus take into account all the possible
      users of this feature)
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      e5dab552
    • S
      [GFS2] Shrink gfs2_inode memory by half · fee852e3
      Steven Whitehouse 提交于
      Here is something I spotted (while looking for something entirely
      different) the other day.
      
      Rather than using a completion in each and every struct gfs2_holder,
      this removes it in favour of hashed wait queues, thus saving a
      considerable amount of memory both on the stack (where a number of
      gfs2_holder structures are allocated) and in particular in the
      gfs2_inode which has 8 gfs2_holder structures embedded within it.
      
      As a result on x86_64 the gfs2_inode shrinks from 2488 bytes to
      1912 bytes, a saving of 576 bytes per inode (no thats not a typo!).
      In actual practice we get a much better result than that since
      now that a gfs2_inode is under the 2048 byte barrier, we get two
      per 4k slab page effectively halving the amount of memory required
      to store gfs2_inodes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fee852e3
    • S
      [GFS2] Remove max_atomic_write tunable · 330005c2
      Steven Whitehouse 提交于
      This removes an unused sysfs tunable parameter.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      330005c2