1. 30 7月, 2009 5 次提交
    • B
      GFS2: Don't put unlikely reclaim candidates on the reclaim list. · 8ff22a6f
      Benjamin Marzinski 提交于
      GFS2 was placing far too many glocks on the reclaim list that were not good
      candidates for freeing up from cache.  These locks would sit there and
      repeatedly get scanned to see if they could be reclaimed, wasting a lot
      of time when there was memory pressure. This fix does more checks on the
      locks to see if they are actually likely to be removable from cache.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8ff22a6f
    • S
      GFS2: Don't try and dealloc own inode · 1e19a195
      Steven Whitehouse 提交于
      When searching for unlinked, but still allocated inodes during block
      allocation, avoid the block relating to the inode that is doing the
      allocation. This fixes a hang caused when an unlinked, but still
      open, inode tries to allocate some more blocks and lands up
      finding itself during the search for deallocatable inodes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1e19a195
    • B
      GFS2: Fix panic in glock memory shrinker · a51b56ff
      Benjamin Marzinski 提交于
      It is possible for gfs2_shrink_glock_memory() to check a glock for
      demotion
      that's in the process of being freed by gfs2_glock_put().  In this case,
      gfs2_shrink_glock_memory() will acquire a new reference to this glock,
      and
      then try to free the glock itself when it drops the refernce.  To solve
      this, gfs2_shrink_glock_memory() just needs to check if the glock is in
      the process of being freed, and if so skip it without ever unlocking the
      lru_lock.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Acked-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      a51b56ff
    • B
      GFS2: keep statfs info in sync on grows · 1946f70a
      Benjamin Marzinski 提交于
      GFS2 wasn't syncing its statfs info on grows.  This causes a problem
      when you grow the filesystem on multiple nodes.  GFS2 would calculate
      the new space based on the resource groups (which are always current),
      and then assume that the filesystem had grown the from the existing
      statfs size.  If you grew the filesystem on two different nodes in a
      short time, the second node wouldn't see the statfs size change from the
      first node, and would assume that it was grown by a larger amount than
      it was.  When all these changes were synced out, the total fileystem
      size would be incorrect (the first grow would be counted twice).
      
      This patch syncs makes GFS2 read in the statfs changes from disk before
      a grow, and write them out after the grow, while the master statfs inode
      is locked.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1946f70a
    • S
      GFS2: Shrink the shrinker · 2163b1e6
      Steven Whitehouse 提交于
      This patch removes some of the special cases that the shrinker
      was trying to deal with. As a result we leave fewer items on
      the list and none at all which cannot be demoted. This makes
      the list scanning more efficient and solves some issues seen
      with large numbers of inodes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      2163b1e6
  2. 13 7月, 2009 1 次提交
    • L
      tracing/events: Move TRACE_SYSTEM outside of include guard · d0b6e04a
      Li Zefan 提交于
      If TRACE_INCLDUE_FILE is defined, <trace/events/TRACE_INCLUDE_FILE.h>
      will be included and compiled, otherwise it will be
      <trace/events/TRACE_SYSTEM.h>
      
      So TRACE_SYSTEM should be defined outside of #if proctection,
      just like TRACE_INCLUDE_FILE.
      
      Imaging this scenario:
      
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == foo
       ...
       #include <trace/events/bar.h>
          -> TRACE_SYSTEM == bar
       ...
       #define CREATE_TRACE_POINTS
       #include <trace/events/foo.h>
          -> TRACE_SYSTEM == bar !!!
      
      and then bar.h will be included and compiled.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4A5A9CF1.2010007@cn.fujitsu.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d0b6e04a
  3. 19 6月, 2009 1 次提交
  4. 12 6月, 2009 4 次提交
  5. 10 6月, 2009 2 次提交
  6. 05 6月, 2009 1 次提交
  7. 03 6月, 2009 1 次提交
  8. 02 6月, 2009 1 次提交
  9. 26 5月, 2009 2 次提交
    • S
      GFS2: Remove args subdir from gfs2 sysfs files · f6eb5349
      Steven Whitehouse 提交于
      Since we can cat /proc/mounts there is no need to have this
      subdirectory in the gfs2 sysfs files. In fact this does not
      reflect the full range of possible mount argumenmts, where
      as /proc/mounts does.
      
      There was only one userland user of this set of sysfs files
      and it will function perfectly well without these files
      being present (in fact that subcommand of gfs2_tool is
      obsolete anyway).
      
      The tune/* subdirectory is also considered mostly obsolete,
      but there are a few uses of this until mount arguments can
      be added for the last few functions for which there are no
      equivalents currently. However the tune/* directory is still
      in my sights and new code should avoid using it. Only the gfs2_quota
      and gfs2_tool programs are know to use tune/* at the moment.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f6eb5349
    • S
      GFS2: Remove lockstruct subdir from gfs2 sysfs files · e1b28aab
      Steven Whitehouse 提交于
      The lockstruct sub directory contained two entries, both of
      which are duplicated elsewhere in the gfs2 sysfs files as
      well as being available via /proc/mounts. There is no userland program
      using either of them, so this patch removes them.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      e1b28aab
  10. 23 5月, 2009 1 次提交
  11. 22 5月, 2009 5 次提交
  12. 21 5月, 2009 2 次提交
    • S
      GFS2: Be more aggressive in reclaiming unlinked inodes · 1ce97e56
      Steven Whitehouse 提交于
      This patch increases the frequency with which gfs2 looks
      for unlinked, but still allocated inodes. Its the equivalent
      operation to ext3's orphan list, but done with bitmaps in
      the resource groups.
      
      This also fixes a bug where a field in the rgrp was too small.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1ce97e56
    • S
      GFS2: Add a rgrp bitmap full flag · 60a0b8f9
      Steven Whitehouse 提交于
      During block allocation, it is useful to know if sections of disk
      are full on a finer grained basis than a single resource group.
      This can make a performance difference when resource groups have
      larger numbers of bitmap blocks, since we no longer have to search
      them all block by block in each individual bitmap.
      
      The full flag is set on a per-bitmap basis when it has been
      searched and found to have no free space. It is then skipped in
      subsequent searches until the flag is reset. The resetting
      occurs if we have to drop the glock on the resource group for any
      reason, or if we deallocate some blocks within that resource
      group and thus free up some space.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      60a0b8f9
  13. 20 5月, 2009 1 次提交
    • S
      GFS2: Improve resource group error handling · 09010978
      Steven Whitehouse 提交于
      This patch improves the error handling in the case where we
      discover that the summary information in the resource group
      doesn't match the bitmap information while in the process of
      allocating blocks. Originally this resulted in a kernel bug,
      but this patch changes that so that we return -EIO and print
      some messages explaining what went wrong, and how to fix it.
      
      We also remember locally not to try and allocate from the
      same rgrp again, so that a subsequent allocation in a
      different rgrp should succeed.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      09010978
  14. 19 5月, 2009 2 次提交
    • S
      GFS2: Don't warn when delete inode fails on ro filesystem · ef9e8b14
      Steven Whitehouse 提交于
      If the filesystem is read-only, then we expect that delete inode
      will fail, so there is no need to warn about it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ef9e8b14
    • S
      GFS2: Umount recovery race fix · fe64d517
      Steven Whitehouse 提交于
      This patch fixes a race condition where we can receive recovery
      requests part way through processing a umount. This was causing
      problems since the recovery thread had already gone away.
      
      Looking in more detail at the recovery code, it was really trying
      to implement a slight variation on a work queue, and that happens to
      align nicely with the recently introduced slow-work subsystem. As a
      result I've updated the code to use slow-work, rather than its own home
      grown variety of work queue.
      
      When using the wait_on_bit() function, I noticed that the wait function
      that was supplied as an argument was appearing in the WCHAN field, so
      I've updated the function names in order to produce more meaningful
      output.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fe64d517
  15. 13 5月, 2009 3 次提交
  16. 12 5月, 2009 1 次提交
  17. 11 5月, 2009 3 次提交
  18. 09 5月, 2009 2 次提交
  19. 23 4月, 2009 2 次提交
    • S
      GFS2: Ensure that the inode goal block settings are updated · d9ba7615
      Steven Whitehouse 提交于
      GFS2 has a goal block associated with each inode indicating the
      search start position for future block allocations (in fact there
      are two, but thats for backward compatibility with GFS1 as they
      are set to identical locations in GFS2).
      
      In some circumstances, depending on the ordering of updates to
      the inode it was possible for the goal block settings to not
      be updated on disk. This patch ensures that the goal block will
      always get updated, thus reducing the potential for searching
      the same (already allocated) blocks again when looking for free
      space during block allocation.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d9ba7615
    • S
      GFS2: Fix bug in block allocation · d8bd504a
      Steven Whitehouse 提交于
      The new bitfit algorithm was counting from the wrong end of
      64 bit words in the bitfield. This fixes it by using __ffs64
      instead of fls64
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d8bd504a