Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146379
b: refs/heads/master
c: eefd7f0
h: refs/heads/master
i:
  146377: 9b34e2c
  146375: 07787c2
v: v3
  • Loading branch information
Theodore Ts'o committed May 2, 2009
1 parent 7b655f9 commit 9fcbb75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: c9877b205f6ce7943bb95281342f4001cc1c00ec
refs/heads/master: eefd7f03b86b8a319890e7fac5a6fcc7f8694b76
9 changes: 8 additions & 1 deletion trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -3244,8 +3244,15 @@ static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
* XXX this might miss a single-block extent at EXT_MAX_BLOCK
*/
if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK ||
newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCK)
newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCK) {
loff_t size = i_size_read(inode);
loff_t bs = EXT4_BLOCK_SIZE(inode->i_sb);

flags |= FIEMAP_EXTENT_LAST;
if ((flags & FIEMAP_EXTENT_DELALLOC) &&
logical+length > size)
length = (size - logical + bs - 1) & ~(bs-1);
}

error = fiemap_fill_next_extent(fieinfo, logical, physical,
length, flags);
Expand Down

0 comments on commit 9fcbb75

Please sign in to comment.