1. 20 Jul, 2012 1 commit
  2. 19 Jul, 2012 1 commit
    • Bob Peterson's avatar
      GFS2: Reduce file fragmentation · 8e2e0047
      Bob Peterson authored
      This patch reduces GFS2 file fragmentation by pre-reserving blocks. The
      resulting improved on disk layout greatly speeds up operations in cases
      which would have resulted in interlaced allocation of blocks previously.
      A typical example of this is 10 parallel dd processes, each writing to a
      file in a common dirctory.
      
      The implementation uses an rbtree of reservations attached to each
      resource group (and each inode).
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      8e2e0047
  3. 18 Jul, 2012 1 commit
  4. 28 Jun, 2012 1 commit
    • Masatake YAMATO's avatar
      GFS2: Fixing double brelse'ing bh allocated in gfs2_meta_read when EIO occurs · 44b8db13
      Masatake YAMATO authored
      This patch fixes buffer_head double free in following code path:
      
      gfs2_block_map
      => gfs2_meta_inode_buffer
       => gfs2_meta_indirect_buffer
        => gfs2_meta_read
      => release_metapath
      
      gfs2_block_map calls gfs2_meta_inode_buffer with &mp.mp_bh[0]
      as an argument. mp.mp_bh are filled with zero at the beginning
      of gfs2_block_map.
      
      If gfs2_meta_inode_buffer returns non-zero value, gfs2_block_map
      calls release_metapath to free buffers chained to mp.mp_bh.
      release_metapath checks each slot of mp.mp_bh[i] and
      free(with brelse) unless the slot is filled with NULL.
      
      &mp.mp_bh[0] passed to gfs2_meta_inode_buffer is filled at
      gfs2_meta_read. gfs2_meta_read is filled a buffer allocated with
      gfs2_getbuf even if EIO occurs. When EIO occurs, the allocated buffer
      is brelse'ed though the pointer(wrong poiner) points the brelse'ed is
      passed back to caller via an argument bhp.
      
      gfs2_meta_indirect_buffer, the caller also pass the wrong pointer
      to its caller with EIO. Finally gfs2_block_map gets both EIO and
      &mp.mp_bh[0] filled with the wrong pointer. release_metapath
      calls brelse again on the wrong pointer.
      Signed-off-by: default avatarMasatake YAMATO <yamato@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      44b8db13
  5. 14 Jun, 2012 1 commit
  6. 13 Jun, 2012 1 commit
  7. 11 Jun, 2012 3 commits
  8. 08 Jun, 2012 2 commits
    • Benjamin Marzinski's avatar
      GFS2: Use lvbs for storing rgrp information with mount option · 90306c41
      Benjamin Marzinski authored
      Instead of reading in the resource groups when gfs2 is checking
      for free space to allocate from, gfs2 can store the necessary infromation
      in the resource group's lvb.  Also, instead of searching for unlinked
      inodes in every resource group that's checked for free space, gfs2 can
      store the number of unlinked but inodes in the lvb, and only check for
      unlinked inodes if it will find some.
      
      The first time a resource group is locked, the lvb must initialized.
      Since this involves counting the unlinked inodes in the resource group,
      this takes a little extra time.  But after that, if the resource group
      is locked with GL_SKIP, the buffer head won't be read in unless it's
      actually needed.
      
      Enabling the resource groups lvbs is done via the rgrplvb mount option.  If
      this option isn't set, the lvbs will still be set and updated, but they won't
      be verfied or used by the filesystem.  To safely turn on this option, all of
      the nodes mounting the filesystem must be running code with this patch, and
      the filesystem must have been completely unmounted since they were updated.
      Signed-off-by: default avatarBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      90306c41
    • Steven Whitehouse's avatar
      GFS2: Cache last hash bucket for glock seq_files · ba1ddcb6
      Steven Whitehouse authored
      For the glocks and glstats seq_files, which are exposed via debugfs
      we should cache the most recent hash bucket, along with the offset
      into that bucket. This allows us to restart from that point, rather
      than having to begin at the beginning each time.
      
      This is an idea from Eric Dumazet, however I've slightly extended it
      so that if the position from which we are due to start is at any
      point beyond the last cached point, we start from the last cached
      point, plus whatever is the appropriate offset. I don't really expect
      people to be lseeking around these files, but if they did so with only
      positive offsets, then we'd still get some of the benefit of using a
      cached offset.
      
      With my simple test of around 200k entries in the file, I'm seeing
      an approx 10x speed up.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      ba1ddcb6
  9. 07 Jun, 2012 1 commit
  10. 06 Jun, 2012 4 commits
  11. 05 Jun, 2012 23 commits
  12. 04 Jun, 2012 1 commit