mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
9f0ccfd8e0
commit
0031462b5b
6 changed files with 419 additions and 42 deletions
|
@ -75,7 +75,7 @@ static int finish_range(handle_t *handle, struct inode *inode,
|
|||
goto err_out;
|
||||
}
|
||||
}
|
||||
retval = ext4_ext_insert_extent(handle, inode, path, &newext);
|
||||
retval = ext4_ext_insert_extent(handle, inode, path, &newext, 0);
|
||||
err_out:
|
||||
if (path) {
|
||||
ext4_ext_drop_refs(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue