diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/extents.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 96264b2ef0a3..11ce15d91acc 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -383,13 +383,14 @@ ext4_ext_binsearch_idx(struct inode *inode, struct ext4_ext_path *path, int bloc | |||
383 | r = m - 1; | 383 | r = m - 1; |
384 | else | 384 | else |
385 | l = m + 1; | 385 | l = m + 1; |
386 | ext_debug("%p(%u):%p(%u):%p(%u) ", l, l->ei_block, | 386 | ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ei_block), |
387 | m, m->ei_block, r, r->ei_block); | 387 | m, le32_to_cpu(m->ei_block), |
388 | r, le32_to_cpu(r->ei_block)); | ||
388 | } | 389 | } |
389 | 390 | ||
390 | path->p_idx = l - 1; | 391 | path->p_idx = l - 1; |
391 | ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block), | 392 | ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block), |
392 | idx_block(path->p_idx)); | 393 | idx_pblock(path->p_idx)); |
393 | 394 | ||
394 | #ifdef CHECK_BINSEARCH | 395 | #ifdef CHECK_BINSEARCH |
395 | { | 396 | { |
@@ -448,8 +449,9 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block) | |||
448 | r = m - 1; | 449 | r = m - 1; |
449 | else | 450 | else |
450 | l = m + 1; | 451 | l = m + 1; |
451 | ext_debug("%p(%u):%p(%u):%p(%u) ", l, l->ee_block, | 452 | ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ee_block), |
452 | m, m->ee_block, r, r->ee_block); | 453 | m, le32_to_cpu(m->ee_block), |
454 | r, le32_to_cpu(r->ee_block)); | ||
453 | } | 455 | } |
454 | 456 | ||
455 | path->p_ext = l - 1; | 457 | path->p_ext = l - 1; |
@@ -582,7 +584,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode, | |||
582 | if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { | 584 | if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { |
583 | len = (len - 1) * sizeof(struct ext4_extent_idx); | 585 | len = (len - 1) * sizeof(struct ext4_extent_idx); |
584 | len = len < 0 ? 0 : len; | 586 | len = len < 0 ? 0 : len; |
585 | ext_debug("insert new index %d after: %d. " | 587 | ext_debug("insert new index %d after: %llu. " |
586 | "move %d from 0x%p to 0x%p\n", | 588 | "move %d from 0x%p to 0x%p\n", |
587 | logical, ptr, len, | 589 | logical, ptr, len, |
588 | (curp->p_idx + 1), (curp->p_idx + 2)); | 590 | (curp->p_idx + 1), (curp->p_idx + 2)); |
@@ -593,7 +595,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode, | |||
593 | /* insert before */ | 595 | /* insert before */ |
594 | len = len * sizeof(struct ext4_extent_idx); | 596 | len = len * sizeof(struct ext4_extent_idx); |
595 | len = len < 0 ? 0 : len; | 597 | len = len < 0 ? 0 : len; |
596 | ext_debug("insert new index %d before: %d. " | 598 | ext_debug("insert new index %d before: %llu. " |
597 | "move %d from 0x%p to 0x%p\n", | 599 | "move %d from 0x%p to 0x%p\n", |
598 | logical, ptr, len, | 600 | logical, ptr, len, |
599 | curp->p_idx, (curp->p_idx + 1)); | 601 | curp->p_idx, (curp->p_idx + 1)); |
@@ -793,7 +795,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode, | |||
793 | BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) != | 795 | BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) != |
794 | EXT_LAST_INDEX(path[i].p_hdr)); | 796 | EXT_LAST_INDEX(path[i].p_hdr)); |
795 | while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { | 797 | while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { |
796 | ext_debug("%d: move %d:%d in new index %llu\n", i, | 798 | ext_debug("%d: move %d:%llu in new index %llu\n", i, |
797 | le32_to_cpu(path[i].p_idx->ei_block), | 799 | le32_to_cpu(path[i].p_idx->ei_block), |
798 | idx_pblock(path[i].p_idx), | 800 | idx_pblock(path[i].p_idx), |
799 | newblock); | 801 | newblock); |