Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61257
b: refs/heads/master
c: e9f410b
h: refs/heads/master
i:
  61255: 4456426
v: v3
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed Jul 18, 2007
1 parent e310c3c commit 44c1172
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 26d535ed24f74ce949d7b49e40574c45cd845cdd
refs/heads/master: e9f410b1c035b6e63f0b4c3d6cfe4298d6a04492
13 changes: 9 additions & 4 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ ext4_ext_binsearch_idx(struct inode *inode, struct ext4_ext_path *path, int bloc
ext_debug("binsearch for %d(idx): ", block);

l = EXT_FIRST_INDEX(eh) + 1;
r = EXT_FIRST_INDEX(eh) + le16_to_cpu(eh->eh_entries) - 1;
r = EXT_LAST_INDEX(eh);
while (l <= r) {
m = l + (r - l) / 2;
if (block < le32_to_cpu(m->ei_block))
Expand Down Expand Up @@ -441,7 +441,7 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block)
ext_debug("binsearch for %d: ", block);

l = EXT_FIRST_EXTENT(eh) + 1;
r = EXT_FIRST_EXTENT(eh) + le16_to_cpu(eh->eh_entries) - 1;
r = EXT_LAST_EXTENT(eh);

while (l <= r) {
m = l + (r - l) / 2;
Expand Down Expand Up @@ -924,8 +924,13 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
curp->p_hdr->eh_max = cpu_to_le16(ext4_ext_space_root_idx(inode));
curp->p_hdr->eh_entries = cpu_to_le16(1);
curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
/* FIXME: it works, but actually path[0] can be index */
curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;

if (path[0].p_hdr->eh_depth)
curp->p_idx->ei_block =
EXT_FIRST_INDEX(path[0].p_hdr)->ei_block;
else
curp->p_idx->ei_block =
EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
ext4_idx_store_pblock(curp->p_idx, newblock);

neh = ext_inode_hdr(inode);
Expand Down

0 comments on commit 44c1172

Please sign in to comment.