1. 23 9月, 2009 1 次提交
  2. 06 1月, 2009 1 次提交
    • J
      ocfs2: Wrap virtual block reads in ocfs2_read_virt_blocks() · a8549fb5
      Joel Becker 提交于
      The ocfs2_read_dir_block() function really maps an inode's virtual
      blocks to physical ones before calling ocfs2_read_blocks().  Let's
      extract that to common code, because other places might want to do that.
      
      Other than the block number being virtual, ocfs2_read_virt_blocks()
      takes the same arguments as ocfs2_read_blocks().  It converts those
      virtual block numbers to physical before calling ocfs2_read_blocks()
      directly.  If the blocks asked for are discontiguous, this can mean
      multiple calls to ocfs2_read_blocks(), but this is mostly hidden from
      the caller.
      
      Like ocfs2_read_blocks(), the caller can pass in an existing
      buffer_head.  This is usually done to pick up some readahead I/O.
      ocfs2_read_virt_blocks() checks the buffer_head's block number
      against the extent map - it must match.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      a8549fb5
  3. 14 10月, 2008 1 次提交
    • T
      ocfs2: Add extent tree operation for xattr value btrees · f56654c4
      Tao Ma 提交于
      Add some thin wrappers around ocfs2_insert_extent() for each of the 3
      different btree types, ocfs2_inode_insert_extent(),
      ocfs2_xattr_value_insert_extent() and ocfs2_xattr_tree_insert_extent(). The
      last is for the xattr index btree, which will be used in a followup patch.
      
      All the old callers in file.c etc will call ocfs2_dinode_insert_extent(),
      while the other two handle the xattr issue. And the init of extent tree are
      handled by these functions.
      
      When storing xattr value which is too large, we will allocate some clusters
      for it and here ocfs2_extent_list and ocfs2_extent_rec will also be used. In
      order to re-use the b-tree operation code, a new parameter named "private"
      is added into ocfs2_extent_tree and it is used to indicate the root of
      ocfs2_exent_list. The reason is that we can't deduce the root from the
      buffer_head now. It may be in an inode, an ocfs2_xattr_block or even worse,
      in any place in an ocfs2_xattr_bucket.
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      f56654c4
  4. 04 10月, 2008 1 次提交
    • M
      ocfs2: fiemap support · 00dc417f
      Mark Fasheh 提交于
      Plug ocfs2 into ->fiemap. Some portions of ocfs2_get_clusters() had to be
      refactored so that the extent cache can be skipped in favor of going
      directly to the on-disk records. This makes it easier for us to determine
      which extent is the last one in the btree. Also, I'm not sure we want to be
      caching fiemap lookups anyway as they're not directly related to data
      read/write.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: ocfs2-devel@oss.oracle.com
      Cc: linux-fsdevel@vger.kernel.org
      00dc417f
  5. 27 4月, 2007 5 次提交
    • M
      ocfs2: Cache extent records · 83418978
      Mark Fasheh 提交于
      The extent map code was ripped out earlier because of an inability to deal
      with holes. This patch adds back a simpler caching scheme requiring far less
      code.
      
      Our old extent map caching was designed back when meta data block caching in
      Ocfs2 didn't work very well, resulting in many disk reads. These days our
      metadata caching is much better, resulting in no un-necessary disk reads. As
      a result, extent caching doesn't have to be as fancy, nor does it have to
      cache as many extents. Keeping the last 3 extents seen should be sufficient
      to give us a small performance boost on some streaming workloads.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      83418978
    • M
      ocfs2: Fix extent lookup to return true size of holes · 4f902c37
      Mark Fasheh 提交于
      Initially, we had wired things to return a size '1' of holes. Cook up a
      small amount of code to find the next extent and calculate the number of
      clusters between the virtual offset and the next allocated extent.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      4f902c37
    • M
      ocfs2: Read from an unwritten extent returns zeros · 49cb8d2d
      Mark Fasheh 提交于
      Return an optional extent flags field from our lookup functions and wire up
      callers to treat unwritten regions as holes for the purpose of returning
      zeros to the user.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      49cb8d2d
    • M
      ocfs2: teach ocfs2_file_aio_write() about sparse files · 9517bac6
      Mark Fasheh 提交于
      Unfortunately, ocfs2 can no longer make use of generic_file_aio_write_nlock()
      because allocating writes will require zeroing of pages adjacent to the I/O
      for cluster sizes greater than page size.
      
      Implement a custom file write here, which can order page locks for zeroing.
      This also has the advantage that cluster locks can easily be ordered outside
      of the page locks.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      9517bac6
    • M
      ocfs2: temporarily remove extent map caching · 363041a5
      Mark Fasheh 提交于
      The code in extent_map.c is not prepared to deal with a subtree being
      rotated between lookups. This can happen when filling holes in sparse files.
      Instead of a lengthy patch to update the code (which would likely lose the
      benefit of caching subtree roots), we remove most of the algorithms and
      implement a simple path based lookup. A less ambitious extent caching scheme
      will be added in a later patch.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      363041a5
  6. 04 1月, 2006 1 次提交