1. 29 Sep, 2009 3 commits
  2. 28 Sep, 2009 5 commits
    • Theodore Ts'o's avatar
      ext4: EXT4_IOC_MOVE_EXT: Check for different original and donor inodes first · f3ce8064
      Theodore Ts'o authored
      Move the check to make sure the original and donor inodes are
      different earlier, to avoid a potential deadlock by trying to lock the
      same inode twice.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      f3ce8064
    • Mingming Cao's avatar
      ext4: async direct IO for holes and fallocate support · 8d5d02e6
      Mingming Cao authored
      For async direct IO that covers holes or fallocate, the end_io
      callback function now queued the convertion work on workqueue but
      don't flush the work rightaway as it might take too long to afford.
      
      But when fsync is called after all the data is completed, user expects
      the metadata also being updated before fsync returns.
      
      Thus we need to flush the conversion work when fsync() is called.
      This patch keep track of a listed of completed async direct io that
      has a work queued on workqueue.  When fsync() is called, it will go
      through the list and do the conversion.
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      8d5d02e6
    • Mingming Cao's avatar
      ext4: Use end_io callback to avoid direct I/O fallback to buffered I/O · 4c0425ff
      Mingming Cao authored
      Currently the DIO VFS code passes create = 0 when writing to the
      middle of file.  It does this to avoid block allocation for holes, so
      as not to expose stale data out when there is a parallel buffered read
      (which does not hold the i_mutex lock).  Direct I/O writes into holes
      falls back to buffered IO for this reason.
      
      Since preallocated extents are treated as holes when doing a
      get_block() look up (buffer is not mapped), direct IO over fallocate
      also falls back to buffered IO.  Thus ext4 actually silently falls
      back to buffered IO in above two cases, which is undesirable.
      
      To fix this, this patch creates unitialized extents when a direct I/O
      write into holes in sparse files, and registering an end_io callback which
      converts the uninitialized extent to an initialized extent after the
      I/O is completed.
      Singed-Off-By: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      4c0425ff
    • Mingming Cao's avatar
      ext4: Split uninitialized extents for direct I/O · 0031462b
      Mingming Cao authored
      When writing into an unitialized extent via direct I/O, and the direct
      I/O doesn't exactly cover the unitialized extent, split the extent
      into uninitialized and initialized extents before submitting the I/O.
      This avoids needing to deal with an ENOSPC error in the end_io
      callback that gets used for direct I/O.
      
      When the IO is complete, the written extent will be marked as initialized.
      
      Singed-Off-By: Mingming Cao <cmm@us.ibm.com> 
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      0031462b
    • Mingming Cao's avatar
      ext4: release reserved quota when block reservation for delalloc retry · 9f0ccfd8
      Mingming Cao authored
      ext4_da_reserve_space() can reserve quota blocks multiple times if
      ext4_claim_free_blocks() fail and we retry the allocation. We should
      release the quota reservation before restarting.
      
      Bug found by Jan Kara.
      Signed-off-by: default avatarMingming Cao <cmm@us.ibm.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      9f0ccfd8
  3. 29 Sep, 2009 1 commit
    • Theodore Ts'o's avatar
      ext4: Adjust ext4_da_writepages() to write out larger contiguous chunks · 55138e0b
      Theodore Ts'o authored
      Work around problems in the writeback code to force out writebacks in
      larger chunks than just 4mb, which is just too small.  This also works
      around limitations in the ext4 block allocator, which can't allocate
      more than 2048 blocks at a time.  So we need to defeat the round-robin
      characteristics of the writeback code and try to write out as many
      blocks in one inode before allowing the writeback code to move on to
      another inode.  We add a a new per-filesystem tunable,
      max_writeback_mb_bump, which caps this to a default of 128mb per
      inode.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      55138e0b
  4. 28 Sep, 2009 1 commit
  5. 26 Sep, 2009 1 commit
  6. 29 Sep, 2009 1 commit
  7. 25 Sep, 2009 28 commits