Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344867
b: refs/heads/master
c: 0634867
h: refs/heads/master
i:
  344865: 4c7594d
  344863: 0a9a225
v: v3
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed Nov 28, 2012
1 parent dd83524 commit 1ba767b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 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: 91dd8c114499e9818f2d5919ef0b9eee61810220
refs/heads/master: 06348679c9f69b3b031cf84c1f5f9f2488fc1f7d
32 changes: 16 additions & 16 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ static int ext4_fill_fiemap_extents(struct inode *inode,
struct fiemap_extent_info *fieinfo)
{
struct ext4_ext_path *path = NULL;
struct ext4_ext_cache cbex;
struct ext4_ext_cache newex;
struct ext4_extent *ex;
ext4_lblk_t next, next_del, start = 0, end = 0;
ext4_lblk_t last = block + num;
Expand Down Expand Up @@ -2042,31 +2042,31 @@ static int ext4_fill_fiemap_extents(struct inode *inode,
BUG_ON(end <= start);

if (!exists) {
cbex.ec_block = start;
cbex.ec_len = end - start;
cbex.ec_start = 0;
newex.ec_block = start;
newex.ec_len = end - start;
newex.ec_start = 0;
} else {
cbex.ec_block = le32_to_cpu(ex->ee_block);
cbex.ec_len = ext4_ext_get_actual_len(ex);
cbex.ec_start = ext4_ext_pblock(ex);
newex.ec_block = le32_to_cpu(ex->ee_block);
newex.ec_len = ext4_ext_get_actual_len(ex);
newex.ec_start = ext4_ext_pblock(ex);
if (ext4_ext_is_uninitialized(ex))
flags |= FIEMAP_EXTENT_UNWRITTEN;
}

/*
* Find delayed extent and update cbex accordingly. We call
* it even in !exists case to find out whether cbex is the
* Find delayed extent and update newex accordingly. We call
* it even in !exists case to find out whether newex is the
* last existing extent or not.
*/
next_del = ext4_find_delayed_extent(inode, &cbex);
next_del = ext4_find_delayed_extent(inode, &newex);
if (!exists && next_del) {
exists = 1;
flags |= FIEMAP_EXTENT_DELALLOC;
}
up_read(&EXT4_I(inode)->i_data_sem);

if (unlikely(cbex.ec_len == 0)) {
EXT4_ERROR_INODE(inode, "cbex.ec_len == 0");
if (unlikely(newex.ec_len == 0)) {
EXT4_ERROR_INODE(inode, "newex.ec_len == 0");
err = -EIO;
break;
}
Expand All @@ -2087,9 +2087,9 @@ static int ext4_fill_fiemap_extents(struct inode *inode,

if (exists) {
err = fiemap_fill_next_extent(fieinfo,
(__u64)cbex.ec_block << blksize_bits,
(__u64)cbex.ec_start << blksize_bits,
(__u64)cbex.ec_len << blksize_bits,
(__u64)newex.ec_block << blksize_bits,
(__u64)newex.ec_start << blksize_bits,
(__u64)newex.ec_len << blksize_bits,
flags);
if (err < 0)
break;
Expand All @@ -2099,7 +2099,7 @@ static int ext4_fill_fiemap_extents(struct inode *inode,
}
}

block = cbex.ec_block + cbex.ec_len;
block = newex.ec_block + newex.ec_len;
}

if (path) {
Expand Down

0 comments on commit 1ba767b

Please sign in to comment.