1. 09 7月, 2007 1 次提交
    • S
      [GFS2] Clean up inode number handling · dbb7cae2
      Steven Whitehouse 提交于
      This patch cleans up the inode number handling code. The main difference
      is that instead of looking up the inodes using a struct gfs2_inum_host
      we now use just the no_addr member of this structure. The tests relating
      to no_formal_ino can then be done by the calling code. This has
      advantages in that we want to do different things in different code
      paths if the no_formal_ino doesn't match. In the NFS patch we want to
      return -ESTALE, but in the ->lookup() path, its a bug in the fs if the
      no_formal_ino doesn't match and thus we can withdraw in this case.
      
      In order to later fix bz #201012, we need to be able to look up an inode
      without knowing no_formal_ino, as the only information that is known to
      us is the on-disk location of the inode in question.
      
      This patch will also help us to fix bz #236099 at a later date by
      cleaning up a lot of the code in that area.
      
      There are no user visible changes as a result of this patch and there
      are no changes to the on-disk format either.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      dbb7cae2
  2. 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
  3. 13 2月, 2007 1 次提交
  4. 06 2月, 2007 5 次提交
    • 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] 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
    • 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] Fix gfs2_rename deadlock · 87d21e07
      S. Wendy Cheng 提交于
      Second round of gfs2_rename lock re-ordering to allow Anaconda adding
      root partition on top of gfs2. Previous to this patch the recursive
      lock detector in glock.c can be triggered due to attempting to lock
      the rgrp twice. This fixes it by checking to see whether the rgrp
      is already locked.
      
      This fixes Red Hat bugzilla #221237
      Signed-off-by: NS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      87d21e07
    • S
      [GFS2] Fix change nlink deadlock · 5509826f
      S. Wendy Cheng 提交于
      Bugzilla 215088
      
      Fix deadlock in gfs2_change_nlink() while installing RHEL5 into GFS2
      partition. The gfs2_rename() apparently needs block allocation for the
      new name (into the directory) where it requires rg locks. At the same
      time, while updating the nlink count for the replaced file,
      gfs2_change_nlink() tries to return the inode meta-data back to resource
      group where it needs rg locks too. Our logic doesn't allow process to
      acquire these locks recursively by the same process  (RHEL installer)
      that results a BUG call. This only happens within rename code path and
      only if the destination file exists before the rename operation.
      Signed-off-by: NS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5509826f
  5. 30 11月, 2006 12 次提交
  6. 04 10月, 2006 1 次提交
  7. 03 10月, 2006 1 次提交
  8. 25 9月, 2006 1 次提交
  9. 19 9月, 2006 1 次提交
  10. 05 9月, 2006 3 次提交
  11. 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
  12. 26 7月, 2006 1 次提交
  13. 07 7月, 2006 1 次提交
  14. 25 6月, 2006 1 次提交
  15. 22 6月, 2006 2 次提交
  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 3 次提交
  19. 18 4月, 2006 1 次提交
    • S
      [GFS2] Use vmalloc() in dir code · fe1bdedc
      Steven Whitehouse 提交于
      When allocating memory to sort directory entries, use vmalloc()
      rather than kmalloc() since for larger directories, the required
      size can easily be graeter than the 128k maximum of kmalloc().
      
      Also adding the first steps towards getting the AOP_TRUNCATED_PAGE
      return code get in the glock code by flagging all places where we
      request a glock and we are holding a page lock.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fe1bdedc
  20. 29 3月, 2006 1 次提交
    • S
      [GFS2] Further updates to dir and logging code · 71b86f56
      Steven Whitehouse 提交于
      This reduces the size of the directory code by about 3k and gets
      readdir() to use the functions which were introduced in the previous
      directory code update.
      
      Two memory allocations are merged into one. Eliminates zeroing of some
      buffers which were never used before they were initialised by
      other data.
      
      There is still scope for further improvement in the directory code.
      
      On the logging side, a hand created mutex has been replaced by a
      standard Linux mutex in the log allocation code.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      71b86f56