]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: Split uninitialized extents for direct I/O
authorMingming Cao <cmm@us.ibm.com>
Mon, 28 Sep 2009 19:49:08 +0000 (15:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:06:59 +0000 (08:06 -0800)
commit45eef039f3a5d0bce583d0a9b34818127ea79e49
tree0c2c191f8be1844e05b9031c02fffd753dad7de4
parentf26ac96224871adf0647496e4154eabdee3689a6
ext4: Split uninitialized extents for direct I/O

(cherry picked from commit 0031462b5b392f90d17f1d75abb795883c44e969)

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: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4.h
fs/ext4/ext4_extents.h
fs/ext4/extents.c
fs/ext4/inode.c
fs/ext4/migrate.c
fs/ext4/move_extent.c