1. 09 5月, 2007 1 次提交
  2. 08 3月, 2007 2 次提交
  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. 06 2月, 2007 3 次提交
    • 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 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
  5. 30 11月, 2006 6 次提交
    • S
      [GFS2] Fix journal flush problem · b004157a
      Steven Whitehouse 提交于
      This fixes a bug which resulted in poor performance due to flushing
      the journal too often. The code path in question was via the inode_go_sync()
      function in glops.c. The solution is not to flush the journal immediately
      when inodes are ejected from memory, but batch up the work for glockd to
      deal with later on. This means that glocks may now live on beyond the end of
      the lifetime of their inodes (but not very much longer in the normal case).
      
      Also fixed in this patch is a bug (which was hidden by the bug mentioned above) in
      calculation of the number of free journal blocks.
      
      The gfs2_logd process has been altered to be more responsive to the journal
      filling up. We now wake it up when the number of uncommitted journal blocks
      has reached the threshold level rather than trying to flush directly at the
      end of each transaction. This again means doing fewer, but larger, log
      flushes in general.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b004157a
    • S
      [GFS2] Simplify glops functions · 1a14d3a6
      Steven Whitehouse 提交于
      The go_sync callback took two flags, but one of them was set on every
      call, so this patch removes once of the flags and makes the previously
      conditional operations (on this flag), unconditional.
      
      The go_inval callback took three flags, each of which was set on every
      call to it. This patch removes the flags and makes the operations
      unconditional, which makes the logic rather more obvious.
      
      Two now unused flags are also removed from incore.h.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1a14d3a6
    • S
      [GFS2] Remove gfs2_inode_attr_in · 9e2dbdac
      Steven Whitehouse 提交于
      This function wasn't really doing the right thing. There was no need
      to update the inode size at this point and the updating of the
      i_blocks field has now been moved to the places where di_blocks is
      updated. A result of this patch and some those preceeding it is that
      unlocking a glock is now a much more efficient process, since there
      is no longer any requirement to copy data from the gfs2 inode into
      the vfs inode at this point.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      9e2dbdac
    • S
      [GFS2] Shrink gfs2_inode (8) - i_vn · bfded27b
      Steven Whitehouse 提交于
      This shrinks the size of the gfs2_inode by 8 bytes by
      replacing the version counter with a one bit valid/invalid
      flag.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      bfded27b
    • S
      [GFS2] Shrink gfs2_inode (3) - di_mode · b60623c2
      Steven Whitehouse 提交于
      This removes the duplicate di_mode field in favour of using the
      inode->i_mode field. This saves 4 bytes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b60623c2
    • A
      [GFS2] split and annotate gfs2_log_head · 55167622
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      55167622
  6. 03 10月, 2006 1 次提交
  7. 22 9月, 2006 1 次提交
    • S
      [GFS2] Tidy up meta_io code · 7276b3b0
      Steven Whitehouse 提交于
      Fix a bug in the directory reading code, where we might have dereferenced
      a NULL pointer in case of OOM. Updated the directory code to use the new
      & improved version of gfs2_meta_ra() which now returns the first block
      that was being read. Previously it was releasing it requiring following
      code to grab the block again at each point it was called.
      
      Also turned off readahead on directory lookups since we are reading a
      hash table, and therefore reading the entries in order is very
      unlikely. Readahead is still used for all other calls to the
      directory reading function (e.g. when growing the hash table).
      
      Removed the DIO_START constant. Everywhere this was used, it was
      used to unconditionally start i/o aside from a couple of places, so
      I've removed it and made the couple of exceptions to this rule into
      separate functions.
      
      Also hunted through the other DIO flags and removed them as arguments
      from functions which were always called with the same combination of
      arguments.
      
      Updated gfs2_meta_indirect_buffer to be a bit more efficient and
      hopefully also be a bit easier to read.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7276b3b0
  8. 19 9月, 2006 1 次提交
  9. 10 9月, 2006 1 次提交
  10. 05 9月, 2006 1 次提交
  11. 04 9月, 2006 1 次提交
  12. 01 9月, 2006 1 次提交
    • S
      [GFS2] Update copyright, tidy up incore.h · e9fc2aa0
      Steven Whitehouse 提交于
      As per comments from Jan Engelhardt <jengelh@linux01.gwdg.de> this
      updates the copyright message to say "version" in full rather than
      "v.2". Also incore.h has been updated to remove forward structure
      declarations which are not required.
      
      The gfs2_quota_lvb structure has now had endianess annotations added
      to it. Also quota.c has been updated so that we now store the
      lvb data locally in endian independant format to avoid needing
      a structure in host endianess too. As a result the endianess
      conversions are done as required at various points and thus the
      conversion routines in lvb.[ch] are no longer required. I've
      moved the one remaining constant in lvb.h thats used into lm.h
      and removed the unused lvb.[ch].
      
      I have not changed the HIF_ constants. That is left to a later patch
      which I hope will unify the gh_flags and gh_iflags fields of the
      struct gfs2_holder.
      
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      e9fc2aa0
  13. 30 8月, 2006 2 次提交
  14. 28 7月, 2006 1 次提交
    • S
      [GFS2] Use a bio to read the superblock · f45b7ddd
      Steven Whitehouse 提交于
      This means that we don't need to create a special inode just to contain
      a struct address_space in order to read a single disk block. Instead
      we read the disk block directly. Its slightly faster, and uses slightly
      less memory, but the real reason for doing this is that it removes a
      special case from the glock code.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f45b7ddd
  15. 26 7月, 2006 1 次提交
  16. 19 6月, 2006 1 次提交
  17. 15 6月, 2006 1 次提交
    • S
      [GFS2] Fix unlinked file handling · feaa7bba
      Steven Whitehouse 提交于
      This patch fixes the way we have been dealing with unlinked,
      but still open files. It removes all limits (other than memory
      for inodes, as per every other filesystem) on numbers of these
      which we can support on GFS2. It also means that (like other
      fs) its the responsibility of the last process to close the file
      to deallocate the storage, rather than the person who did the
      unlinking. Note that with GFS2, those two events might take place
      on different nodes.
      
      Also there are a number of other changes:
      
       o We use the Linux inode subsystem as it was intended to be
      used, wrt allocating GFS2 inodes
       o The Linux inode cache is now the point which we use for
      local enforcement of only holding one copy of the inode in
      core at once (previous to this we used the glock layer).
       o We no longer use the unlinked "special" file. We just ignore it
      completely. This makes unlinking more efficient.
       o We now use the 4th block allocation state. The previously unused
      state is used to track unlinked but still open inodes.
       o gfs2_inoded is no longer needed
       o Several fields are now no longer needed (and removed) from the in
      core struct gfs2_inode
       o Several fields are no longer needed (and removed) from the in core
      superblock
      
      There are a number of future possible optimisations and clean ups
      which have been made possible by this patch.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      feaa7bba
  18. 19 5月, 2006 2 次提交
  19. 07 4月, 2006 1 次提交
    • S
      [GFS2] Fix a ref count bug and other clean ups · b09e593d
      Steven Whitehouse 提交于
      This fixes a ref count bug that sometimes showed up a umount time
      (causing it to hang) but it otherwise mostly harmless. At the same
      time there are some clean ups including making the log operations
      structures const, moving a memory allocation so that its not done
      in the fast path of checking to see if there is an outstanding
      transaction related to a particular glock.
      
      Removes the sd_log_wrap varaible which was updated, but never actually
      used anywhere. Updates the gfs2 ioctl() to run without the kernel lock
      (which it never needed anyway). Removes the "invalidate inodes" loop
      from GFS2's put_super routine. This is done in kill super anyway so
      we don't need to do it here. The loop was also bogus in that if there
      are any inodes "stuck" at this point its a bug and we need to know
      about it rather than hide it by hanging forever.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b09e593d
  20. 28 2月, 2006 1 次提交
    • S
      [GFS2] Macros removal in gfs2.h · 5c676f6d
      Steven Whitehouse 提交于
      As suggested by Pekka Enberg <penberg@cs.helsinki.fi>.
      
      The DIV_RU macro is renamed DIV_ROUND_UP and and moved to kernel.h
      The other macros are gone from gfs2.h as (although not requested
      by Pekka Enberg) are a number of included header file which are now
      included individually. The inode number comparison function is
      now an inline function.
      
      The DT2IF and IF2DT may be addressed in a future patch.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5c676f6d
  21. 13 2月, 2006 1 次提交
    • S
      [GFS2] Fix for root inode ref count bug · 7359a19c
      Steven Whitehouse 提交于
      Umount is now working correctly again. The bug was due to
      not getting an extra ref count when mounting the fs. We
      should have bumped it by two (once for the internal pointer
      to the root inode from the super block and once for the
      inode hanging off the dcache entry for root).
      
      Also this patch tidys up the code dealing with looking up
      and creating inodes. We now pass Linux inodes (with gfs2_inodes
      attached) rather than the other way around and this reduces code
      duplication in various places.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7359a19c
  22. 17 1月, 2006 1 次提交