1. 04 Apr, 2002 2 commits
    • Jeff Garzik's avatar
      Andrew Morton's ext2 sync mount speedup. Description: · 9950435b
      Jeff Garzik authored
      At present, when mounted synchronously or with `chattr +S' in effect,
      ext2 syncs the indirect blocks for every new block when extending a
      file.
      
      This is not necessary, because a sync is performed on the way out of
      generic_file_write().  This will pick up all necessary data from
      inode->i_dirty_buffers and inode->i_dirty_data_buffers, and is
      sufficient.
      
      The patch removes all the syncing of indirect blocks.
      
      On a non-write-caching scsi disk, an untar of the util-linux tarball
      runs three times faster.  Writing a 100 megabyte file in one megabyte
      chunks speeds up ten times.
      
      The patch also removes the intermediate indirect block syncing on the
      truncate() path.  Instead, we sync the indirects at a single place, via
      inode->i_dirty_buffers.  This not only means that the writes (may)
      cluster better.  It means that we perform much, much less actual I/O
      during truncate, because most or all of the indirects will no longer be
      needed for the file, and will be invalidated.
      
      fsync() and msync() still work correctly.  One side effect of this
      patch is that VM-initiated writepage() against a file hole will no
      longer block on writeout of indirect blocks.  This is good.
      9950435b
    • Andrew Morton's avatar
      This fixes the "i_blocks went wrong when the disk filled up" · b1a5f642
      Andrew Morton authored
      problem.
      
      In ext3_new_block() we increment i_blocks early, so the
      quota operation can be performed outside lock_super().
      But if the block allocation ends up failing, we forget to
      undo the allocation.  
      
      This is not a serious bug, and probably does not warrant
      an upgrade for production machines.  Its effects are:
      
      1) errors are generated from e2fsck and
      
      2) users could appear to be over quota when they really aren't.
      
      The patch undoes the accounting operation if the allocation
      ends up failing.
      b1a5f642
  2. 03 Apr, 2002 38 commits