1. 05 Feb, 2008 1 commit
    • Christoph Lameter's avatar
      Pagecache zeroing: zero_user_segment, zero_user_segments and zero_user · eebd2aa3
      Christoph Lameter authored
      Simplify page cache zeroing of segments of pages through 3 functions
      
      zero_user_segments(page, start1, end1, start2, end2)
      
              Zeros two segments of the page. It takes the position where to
              start and end the zeroing which avoids length calculations and
      	makes code clearer.
      
      zero_user_segment(page, start, end)
      
              Same for a single segment.
      
      zero_user(page, start, length)
      
              Length variant for the case where we know the length.
      
      We remove the zero_user_page macro. Issues:
      
      1. Its a macro. Inline functions are preferable.
      
      2. The KM_USER0 macro is only defined for HIGHMEM.
      
         Having to treat this special case everywhere makes the
         code needlessly complex. The parameter for zeroing is always
         KM_USER0 except in one single case that we open code.
      
      Avoiding KM_USER0 makes a lot of code not having to be dealing
      with the special casing for HIGHMEM anymore. Dealing with
      kmap is only necessary for HIGHMEM configurations. In those
      configurations we use KM_USER0 like we do for a series of other
      functions defined in highmem.h.
      
      Since KM_USER0 is depends on HIGHMEM the existing zero_user_page
      function could not be a macro. zero_user_* functions introduced
      here can be be inline because that constant is not used when these
      functions are called.
      
      Also extract the flushing of the caches to be outside of the kmap.
      
      [akpm@linux-foundation.org: fix nfs and ntfs build]
      [akpm@linux-foundation.org: fix ntfs build some more]
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Anton Altaparmakov <aia21@cantab.net>
      Cc: Mark Fasheh <mark.fasheh@oracle.com>
      Cc: David Chinner <dgc@sgi.com>
      Cc: Michael Halcrow <mhalcrow@us.ibm.com>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      eebd2aa3
  2. 03 Feb, 2008 1 commit
  3. 25 Jan, 2008 1 commit
  4. 17 Dec, 2007 2 commits
  5. 06 Nov, 2007 1 commit
  6. 12 Oct, 2007 6 commits
  7. 11 Sep, 2007 1 commit
  8. 09 Aug, 2007 1 commit
  9. 10 Jul, 2007 10 commits
  10. 02 May, 2007 1 commit
  11. 26 Apr, 2007 8 commits
    • Mark Fasheh's avatar
      ocfs2: Cache extent records · 83418978
      Mark Fasheh authored
      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: default avatarMark Fasheh <mark.fasheh@oracle.com>
      83418978
    • Mark Fasheh's avatar
      ocfs2: Read from an unwritten extent returns zeros · 49cb8d2d
      Mark Fasheh authored
      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: default avatarMark Fasheh <mark.fasheh@oracle.com>
      49cb8d2d
    • Mark Fasheh's avatar
      ocfs2: make room for unwritten extents flag · e48edee2
      Mark Fasheh authored
      Due to the size of our group bitmaps, we'll never have a leaf node extent
      record with more than 16 bits worth of clusters. Split e_clusters up so that
      leaf nodes can get a flags field where we can mark unwritten extents.
      Interior nodes whose length references all the child nodes beneath it can't
      split their e_clusters field, so we use a union to preserve sizing there.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      e48edee2
    • Mark Fasheh's avatar
      ocfs2: Use do_sync_mapping_range() in ocfs2_zero_tail_for_truncate() · fa41045f
      Mark Fasheh authored
      Do this instead of filemap_fdatawrite() - this way we sync only the
      range between i_size and the cluster boundary.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      fa41045f
    • Mark Fasheh's avatar
      ocfs2: zero tail of sparse files on truncate · 60b11392
      Mark Fasheh authored
      Since we don't zero on extend anymore, truncate needs to be fixed up to zero
      the part of a file between i_size and and end of it's cluster. Otherwise a
      subsequent extend could expose bad data.
      
      This introduced a new helper, which can be used in ocfs2_write().
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      60b11392
    • Mark Fasheh's avatar
      ocfs2: teach extend/truncate about sparse files · 3a0782d0
      Mark Fasheh authored
      For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no
      longer exists since i_size is not tied to i_clusters. In
      ocfs2_extend_file(), we skip the allocation / page zeroing code for file
      systems which understand sparse files.
      
      The core truncate code is changed to do a bottom up tree traversal. This
      gets abstracted out into it's own function. To make things more readable,
      most of the special case handling for in-inode extents from
      ocfs2_do_truncate() is also removed.
      
      Though write support for sparse files comes in a later patch, we at least
      update ocfs2_prepare_inode_for_write() to skip allocation for sparse files.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      3a0782d0
    • Mark Fasheh's avatar
      ocfs2: temporarily remove extent map caching · 363041a5
      Mark Fasheh authored
      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: default avatarMark Fasheh <mark.fasheh@oracle.com>
      363041a5
    • Mark Fasheh's avatar
      ocfs2: sparse b-tree support · dcd0538f
      Mark Fasheh authored
      Introduce tree rotations into the b-tree code. This will allow ocfs2 to
      support sparse files. Much of the added code is designed to be generic (in
      the ocfs2 sense) so that it can later be re-used to implement large
      extended attributes.
      
      This patch only adds the rotation code and does minimal updates to callers
      of the extent api.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      dcd0538f
  12. 13 Dec, 2006 1 commit
  13. 01 Dec, 2006 6 commits