1. 21 4月, 2006 1 次提交
  2. 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
  3. 13 4月, 2006 1 次提交
  4. 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
  5. 08 4月, 2006 1 次提交
  6. 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
  7. 05 4月, 2006 1 次提交
  8. 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
  9. 31 3月, 2006 2 次提交
  10. 30 3月, 2006 2 次提交
  11. 29 3月, 2006 3 次提交
  12. 22 3月, 2006 1 次提交
  13. 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
  14. 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
  15. 02 3月, 2006 3 次提交
    • 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
    • S
      [GFS2] Remove uneeded memory allocation · e317ffcb
      Steven Whitehouse 提交于
      For every filesystem operation where we need a transaction, we
      now make one less memory allocation.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      e317ffcb
  16. 28 2月, 2006 5 次提交
  17. 27 2月, 2006 1 次提交
  18. 23 2月, 2006 4 次提交
  19. 22 2月, 2006 1 次提交
  20. 21 2月, 2006 1 次提交
  21. 15 2月, 2006 2 次提交
  22. 14 2月, 2006 3 次提交
    • S
      [GFS2] Fix the bugs I introduced in the last patch but one · 4dd651ad
      Steven Whitehouse 提交于
      Various endianess changes required in the directory code.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      4dd651ad
    • S
      [GFS2] Put back O_DIRECT support · d1665e41
      Steven Whitehouse 提交于
      This patch adds back O_DIRECT support with various caveats
      attached:
      
       1. Journaled data can be read via O_DIRECT since its now the
          same on disk format as normal data files.
       2. Journaled data writes with O_DIRECT will be failed sliently
          back to normal writes (should we really do this I wonder or
          should we return an error instead?)
       3. Stuffed files will be failed back to normal buffered I/O
       4. All the usual corner cases (write beyond current end of file,
          write to an unallocated block) will also revert to normal buffered I/O.
      
      The I/O path is slightly odd as reads arrive at the page cache layer
      with the lock for the file already held, but writes arrive unlocked.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d1665e41
    • S
      [GFS2] Change ondisk format (hopefully for the last time) · fc69d0d3
      Steven Whitehouse 提交于
      There were one or two fields in structures which didn't get changed
      last time back to their gfs1 sizes and alignments. One or two constants
      have also changed back to their original values which were missed the
      first time.
      
      Its possible that indirect pointer blocks might need to change. If
      they don't we'll have to rewrite them all on upgrade due to a change
      in the amount of padding that they use.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fc69d0d3
  23. 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