1. 06 5月, 2006 2 次提交
    • S
      [GFS2] Readpages support · fd88de56
      Steven Whitehouse 提交于
      This adds readpages support (and also corrects a small bug in
      the readpage error path at the same time). Hopefully this will
      improve performance by allowing GFS to submit larger lumps of
      I/O at a time.
      
      In order to simplify the setting of BH_Boundary, it currently gets
      set when we hit the end of a indirect pointer block. There is
      always a boundary at this point with the current allocation code.
      It doesn't get all the boundaries right though, so there is still
      room for improvement in this.
      
      See comments in fs/gfs2/ops_address.c for further information about
      readpages with GFS2.
      
      Signed-off-by: Steven Whitehouse
      fd88de56
    • 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
  2. 03 5月, 2006 1 次提交
  3. 28 4月, 2006 3 次提交
    • S
      [GFS2] Remove some unused code · 56409abb
      Steven Whitehouse 提交于
      Remove some of the unused code flagged up by Adrian Bunk.
      
      Cc: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: Steven Whitehouse
      56409abb
    • A
      [GFS2] [-mm patch] fs/gfs2/: possible cleanups · 08bc2dbc
      Adrian Bunk 提交于
      This patch contains the following possible cleanups:
      - make needlessly global code static
      - #if 0 unused functions
      - remove the following global function that was both unused and
        unimplemented:
        - super.c: gfs2_do_upgrade()
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      08bc2dbc
    • S
      [GFS2] Reordering in deallocation to avoid recursive locking · 36327521
      Steven Whitehouse 提交于
      Despite my earlier careful search, there was a recursive lock left
      in the deallocation code. This removes it. It also should speed up
      deallocation be reducing the number of locking operations which take
      place by using two "try lock" operations on the two locks involved in
      inode deallocation which allows us to grab the locks out of order
      (compared with NFS which grabs the inode lock first and the iopen
      lock later). It is ok for us to fail while doing this since if it
      does fail it means that someone else is still using the inode and
      thus it wouldn't be possible to deallocate anyway.
      
      This fixes the bug reported to me by Rob Kenna.
      
      Cc: Rob Kenna <rkenna@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      36327521
  4. 27 4月, 2006 4 次提交
  5. 26 4月, 2006 2 次提交
  6. 25 4月, 2006 2 次提交
  7. 24 4月, 2006 1 次提交
  8. 22 4月, 2006 3 次提交
  9. 21 4月, 2006 2 次提交
    • 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
    • S
      [GFS2] Fix a bug: scheduling under a spinlock · 190562bd
      Steven Whitehouse 提交于
      At some stage, a mutex was added to gfs2_glock_put() without
      checking all its call sites. Two of them were called from
      under a spinlock causing random delays at various points and
      crashes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      190562bd
  10. 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
  11. 13 4月, 2006 1 次提交
  12. 12 4月, 2006 1 次提交
    • S
      [GFS2] Update journal accounting code. · f4154ea0
      Steven Whitehouse 提交于
      A small update to the journaling code to change the way that
      the "extra" blocks are accounted for in the journal. These are
      used at a rate of one per 503 metadata blocks or one per 251
      journaled data blocks (or just one if the total number of journaled
      blocks in the transaction is smaller). Since we are using them at
      two different rates the old method of accounting for them no longer
      works and we count them up as required.
      
      Since the "per transaction" accounting can't handle this (there is no
      fixed number of header blocks per transaction) we have to account for
      it in the general journal code. We now require that each transaction
      reserves more blocks than it actually needs to take account of the
      possible extra blocks.
      
      Also a final fix to dir.c to ensure that all ref counts are handled
      correctly.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f4154ea0
  13. 08 4月, 2006 1 次提交
  14. 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
  15. 05 4月, 2006 1 次提交
  16. 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
  17. 31 3月, 2006 2 次提交
  18. 30 3月, 2006 2 次提交
  19. 29 3月, 2006 3 次提交
  20. 22 3月, 2006 1 次提交
  21. 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
  22. 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
  23. 02 3月, 2006 2 次提交
    • S
      [GFS2] Fix some bugs · b4dc7291
      Steven Whitehouse 提交于
      Fix a bug I introduced earlier with a kfree() and usage of
      a structure in the wrong order. Also try and get the counts
      of the journaled data buffers "more correct". Still some work
      to do in this area though.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b4dc7291
    • 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