1. 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
  2. 05 7月, 2006 1 次提交
  3. 03 7月, 2006 1 次提交
  4. 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
  5. 19 5月, 2006 2 次提交
  6. 13 5月, 2006 1 次提交
  7. 06 5月, 2006 1 次提交
    • R
      [GFS2] Set d_ops for root inode · 5bb76af1
      Robert S Peterson 提交于
      Well, I managed to track down the bug in gfs2 that was causing
      my grief.  Below is a patch for the problem.  Please incorporate
      as you see fit.  Or should I say: as you see git.
      
      The problem was basically that you never set d_ops for the root
      inode, so the wrong hash algorithm was being used.  But only for
      the root directory.  Turns out that if I used subdirectories, it
      used the proper hash and my files were found just fine.
      Signed-off-by: NRobert S Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5bb76af1
  8. 27 4月, 2006 1 次提交
  9. 21 4月, 2006 1 次提交
    • D
      [GFS2] journal recovery patch · c63e31c2
      David Teigland 提交于
      This is one of the changes related to journal recovery I mentioned a
      couple weeks ago.  We can get into a situation where there are only
      readonly nodes currently mounting the fs, but there are journals that need
      to be recovered.  Since the readonly nodes can't recover journals, the
      next rw mounter needs to go through and check all journals and recover any
      that are dirty (i.e. what the first node to mount the fs does).  This rw
      mounter needs to skip the journals held by the existing readonly nodes.
      Skipping those journals amounts to using the TRY flag on the journal locks
      so acquiring the lock of a journal held by a readonly node will fail
      instead of blocking indefinately.
      Signed-off-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c63e31c2
  10. 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
  11. 29 3月, 2006 2 次提交
    • S
      [GFS2] Update locking in log.c · 484adff8
      Steven Whitehouse 提交于
      Replace the lock_for_trans()/lock_for_flush() functions with an rwsem.
      In fact the sd_log_flush_lock becomes an rwsem (the write part of it)
      and is extended slightly to cover everything that the lock_for_flush()
      used to cover. The read part of the lock is instead of lock_for_trans().
      
      This corrects the races in the original code and reduces the code size.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      484adff8
    • 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
  12. 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
  13. 03 3月, 2006 1 次提交
    • S
      [GFS2] Add gfs2meta filesystem · 419c93e0
      Steven Whitehouse 提交于
      In order to separate out the filesystem's metadata from "normal"
      files and directories, a new filesystem type has been created.
      It is called gfs2meta and mounting it gives access to the files
      that were previously under .gfs2_admin (well still are until mkfs
      is altered, which is next on the adgenda).
      
      Its not currently possible to mount both gfs2 and gfs2meta on the
      same block device at the same time. A future patch will allow that
      to happen.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      419c93e0
  14. 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
  15. 28 2月, 2006 2 次提交
  16. 27 2月, 2006 1 次提交
  17. 21 2月, 2006 1 次提交
  18. 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
  19. 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
  20. 17 1月, 2006 1 次提交