1. 06 2月, 2007 1 次提交
    • S
      [GFS2] Clean up/speed up readdir · 3699e3a4
      Steven Whitehouse 提交于
      This removes the extra filldir callback which gfs2 was using to
      enclose an attempt at readahead for inodes during readdir. The
      code was too complicated and also hurts performance badly in the
      case that the getdents64/readdir call isn't being followed by
      stat() and it wasn't even getting it right all the time when it
      was.
      
      As a result, on my test box an "ls" of a directory containing 250000
      files fell from about 7mins (freshly mounted, so nothing cached) to
      between about 15 to 25 seconds. When the directory content was cached,
      the time taken fell from about 3mins to about 4 or 5 seconds.
      
      Interestingly in the cached case, running "ls -l" once reduced the time
      taken for subsequent runs of "ls" to about 6 secs even without this
      patch. Now it turns out that there was a special case of glocks being
      used for prefetching the metadata, but because of the timeouts for these
      locks (set to 10 secs) the metadata was being timed out before it was
      being used and this the prefetch code was constantly trying to prefetch
      the same data over and over.
      
      Calling "ls -l" meant that the inodes were brought into memory and once
      the inodes are cached, the glocks are not disposed of until the inodes
      are pushed out of the cache, thus extending the lifetime of the glocks,
      and thus bringing down the time for subsequent runs of "ls"
      considerably.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      3699e3a4
  2. 09 12月, 2006 1 次提交
  3. 07 12月, 2006 1 次提交
    • S
      [GFS2] Change gfs2_fsync() to use write_inode_now() · 34126f9f
      Steven Whitehouse 提交于
      This is a bit better than the previous version of gfs2_fsync()
      although it would be better still if we were able to call a
      function which only wrote the inode & metadata. Its no big deal
      though that this will potentially write the data as well since
      the VFS has already done that before calling gfs2_fsync(). I've
      also added a comment to explain whats going on here.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Andrew Morton <akpm@osdl.org>
      34126f9f
  4. 30 11月, 2006 7 次提交
  5. 02 10月, 2006 4 次提交
  6. 25 9月, 2006 1 次提交
  7. 20 9月, 2006 1 次提交
  8. 19 9月, 2006 1 次提交
  9. 05 9月, 2006 4 次提交
  10. 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
  11. 01 8月, 2006 1 次提交
  12. 26 7月, 2006 1 次提交
    • S
      [GFS2] Alter direct I/O path · a9e5f4d0
      Steven Whitehouse 提交于
      As per comments received, alter the GFS2 direct I/O path so that
      it uses the standard read functions "out of the box". Needs a
      small change to one of the VFS functions. This reduces the size
      of the code quite a lot and also removes the need for one new export.
      
      Some more work remains to be done, but this is the bones of the
      thing.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      a9e5f4d0
  13. 21 7月, 2006 1 次提交
  14. 11 7月, 2006 1 次提交
    • S
      [GFS2] Add generation number · 4340fe62
      Steven Whitehouse 提交于
      This adds a generation number for the eventual use of NFS to the
      ondisk inode. Its backward compatible with the current code since
      it doesn't really matter what the generation number is to start with,
      and indeed since its set to zero, due to it being taken from padding
      in both the inode and rgrp header, it should be fine.
      
      The eventual plan is to use this rather than no_formal_ino in the
      NFS filehandles. At that point no_formal_ino will be unused.
      
      At the same time we also add a releasepages call back to the
      "normal" address space for gfs2 inodes. Also I've removed a
      one-linrer function thats not required any more.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      4340fe62
  15. 04 7月, 2006 1 次提交
  16. 24 6月, 2006 1 次提交
  17. 22 6月, 2006 1 次提交
  18. 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
  19. 19 5月, 2006 2 次提交
  20. 13 5月, 2006 1 次提交
  21. 26 4月, 2006 1 次提交
  22. 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
  23. 05 4月, 2006 1 次提交
  24. 01 4月, 2006 2 次提交
    • S
      [GFS2] Update GFS2 for the recent pull from Linus · 8628de05
      Steven Whitehouse 提交于
      Some interfaces have changed. In particular one of the posix
      locking functions has changed prototype, along with the
      address space operation invalidatepage and the block getting
      callback to the direct IO function.
      
      In addition add the splice file operations. These will need to
      be updated to support AOP_TRUNCATED_PAGE before they will be
      of much use to us.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8628de05
    • S
      [GFS2] Update ioctl() to new interface · 7ea9ea83
      Steven Whitehouse 提交于
      This is designed as a fs independent way to set flags on a
      particular inode. The values of the ioctl() and flags are
      designed to be identical to the ext2/3 values. Assuming that
      this plan is acceptable to people in general, the plan is to
      then move other fs across to using the same set of #defines,
      etc.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      7ea9ea83
  25. 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
  26. 22 3月, 2006 1 次提交