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. 30 11月, 2006 6 次提交
  3. 02 10月, 2006 1 次提交
  4. 25 9月, 2006 1 次提交
  5. 19 9月, 2006 1 次提交
  6. 05 9月, 2006 2 次提交
  7. 04 9月, 2006 1 次提交
  8. 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
  9. 28 7月, 2006 2 次提交
  10. 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
  11. 19 5月, 2006 2 次提交
  12. 28 4月, 2006 1 次提交
  13. 27 4月, 2006 1 次提交
  14. 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
  15. 21 3月, 2006 1 次提交
    • S
      [GFS2] Fix bug in directory code and tidy up · c752666c
      Steven Whitehouse 提交于
      Due to a typo, the dir leaf split operation was (for the first
      split in a directory) writing the new hash vaules at the
      wrong offset. This is now fixed.
      
      Also some other tidy ups are included:
      
       - We use GFS2's hash function for dentries (see ops_dentry.c) so that
         we don't have to keep recalculating the hash values.
       - A lot of common code is eliminated between the various directory
         lookup routines.
       - Better error checking on directory lookup (previously different
         routines checked for different errors)
       - The leaf split operation has a couple of redundant operations
         removed from it, so it should be faster.
      
      There is still further scope for further clean ups in the directory
      code, and readdir in particular could do with slimming down a bit.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c752666c
  16. 02 3月, 2006 1 次提交
    • S
      [GFS2] Tidy up mount code. · c9fd4307
      Steven Whitehouse 提交于
      We no longer lookup ".gfs2_admin" in the root directory in order to
      find it, but instead use the inode number given in the superblock.
      Both the root directory and the admin directory are now looked up using
      the same routine, so the redundant code is removed.
      
      Also, there is no longer a reference to the root inode in the
      GFS2 super block. When required this can be retreived via
      sb->s_root->d_inode instead.
      
      Assuming that we introduce a metadata filesystem type for GFS, then
      this is a first step towards that goal.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c9fd4307
  17. 28 2月, 2006 2 次提交
  18. 27 2月, 2006 1 次提交
  19. 21 2月, 2006 1 次提交
  20. 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
  21. 31 1月, 2006 1 次提交
    • S
      [GFS2] Add gfs2_internal_read() · f42faf4f
      Steven Whitehouse 提交于
      Add the new external read function. Its temporarily in jdata.c
      even though the protoype is in ops_file.h - this will change
      shortly. The current implementation will change to a page cache
      one when that happens.
      
      In order to effect the above changes, the various internal inodes
      now have Linux inodes attached to them. We keep the references to
      the Linux inodes, rather than the gfs2_inodes in the super block.
      
      In order to get everything to work correctly I've had to reorder
      the init sequence on mount (which I should probably have done
      earlier when .gfs2_admin was made visible).
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f42faf4f
  22. 18 1月, 2006 1 次提交
  23. 17 1月, 2006 1 次提交