diff options
author | Mingming Cao <cmm@us.ibm.com> | 2009-09-28 15:49:08 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-09-28 15:49:08 -0400 |
commit | 0031462b5b392f90d17f1d75abb795883c44e969 (patch) | |
tree | e8323861b8dede0f3ddbfc8324d650bf1f4fd74b /fs/ext4/move_extent.c | |
parent | 9f0ccfd8e07d61b413e6536ffa02fbf60d2e20d8 (diff) |
ext4: Split uninitialized extents for direct I/O
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>
Diffstat (limited to 'fs/ext4/move_extent.c')
-rw-r--r-- | fs/ext4/move_extent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index c07a2915e40b..5332fd4c4028 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c | |||
@@ -322,7 +322,7 @@ mext_insert_across_blocks(handle_t *handle, struct inode *orig_inode, | |||
322 | goto out; | 322 | goto out; |
323 | 323 | ||
324 | if (ext4_ext_insert_extent(handle, orig_inode, | 324 | if (ext4_ext_insert_extent(handle, orig_inode, |
325 | orig_path, new_ext)) | 325 | orig_path, new_ext, 0)) |
326 | goto out; | 326 | goto out; |
327 | } | 327 | } |
328 | 328 | ||
@@ -333,7 +333,7 @@ mext_insert_across_blocks(handle_t *handle, struct inode *orig_inode, | |||
333 | goto out; | 333 | goto out; |
334 | 334 | ||
335 | if (ext4_ext_insert_extent(handle, orig_inode, | 335 | if (ext4_ext_insert_extent(handle, orig_inode, |
336 | orig_path, end_ext)) | 336 | orig_path, end_ext, 0)) |
337 | goto out; | 337 | goto out; |
338 | } | 338 | } |
339 | out: | 339 | out: |