summaryrefslogtreecommitdiff
path: root/fs/sysv
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2009-09-28 19:48:41 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2009-09-28 19:48:41 (GMT)
commit4c0425ff68b1b87b802ffeda7b6a46ff7da7241c (patch)
treea8718f5f4574af8e15fd876b24f4aec88d62451b /fs/sysv
parent0031462b5b392f90d17f1d75abb795883c44e969 (diff)
downloadlinux-4c0425ff68b1b87b802ffeda7b6a46ff7da7241c.tar.xz
ext4: Use end_io callback to avoid direct I/O fallback to buffered I/O
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: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/sysv')
0 files changed, 0 insertions, 0 deletions