Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168423
b: refs/heads/master
c: ba230c3
h: refs/heads/master
i:
  168421: fd8e5ff
  168419: 3dd3733
  168415: abdec71
v: v3
  • Loading branch information
Mingming authored and Theodore Ts'o committed Nov 6, 2009
1 parent e52a62b commit a731603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b70df181611012a3556f017b57dfcef7e1d279f
refs/heads/master: ba230c3f6dc88ec008806adb27b12088486d508e
13 changes: 7 additions & 6 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -2807,6 +2807,8 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
* into three uninitialized extent(at most). After IO complete, the part
* being filled will be convert to initialized by the end_io callback function
* via ext4_convert_unwritten_extents().
*
* Returns the size of uninitialized extent to be written on success.
*/
static int ext4_split_unwritten_extents(handle_t *handle,
struct inode *inode,
Expand All @@ -2824,7 +2826,6 @@ static int ext4_split_unwritten_extents(handle_t *handle,
unsigned int allocated, ee_len, depth;
ext4_fsblk_t newblock;
int err = 0;
int ret = 0;

ext_debug("ext4_split_unwritten_extents: inode %lu,"
"iblock %llu, max_blocks %u\n", inode->i_ino,
Expand All @@ -2842,12 +2843,12 @@ static int ext4_split_unwritten_extents(handle_t *handle,
ext4_ext_store_pblock(&orig_ex, ext_pblock(ex));

/*
* if the entire unintialized extent length less than
* the size of extent to write, there is no need to split
* uninitialized extent
* If the uninitialized extent begins at the same logical
* block where the write begins, and the write completely
* covers the extent, then we don't need to split it.
*/
if (allocated <= max_blocks)
return ret;
if ((iblock == ee_block) && (allocated <= max_blocks))
return allocated;

err = ext4_ext_get_access(handle, inode, path + depth);
if (err)
Expand Down

0 comments on commit a731603

Please sign in to comment.