Skip to content

Commit 26d535e

Browse files
Dmitry Monakhovtytso
authored andcommitted
Fix compilation with EXT_DEBUG, also fix leXX_to_cpu conversions.
Signed-off-by: Dmitry Monakhov <[email protected]> Acked-by: Alex Tomas <[email protected]> Signed-off-by: Dave Kleikamp <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
1 parent d699594 commit 26d535e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

fs/ext4/extents.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,14 @@ ext4_ext_binsearch_idx(struct inode *inode, struct ext4_ext_path *path, int bloc
383383
r = m - 1;
384384
else
385385
l = m + 1;
386-
ext_debug("%p(%u):%p(%u):%p(%u) ", l, l->ei_block,
387-
m, m->ei_block, r, r->ei_block);
386+
ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ei_block),
387+
m, le32_to_cpu(m->ei_block),
388+
r, le32_to_cpu(r->ei_block));
388389
}
389390

390391
path->p_idx = l - 1;
391392
ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block),
392-
idx_block(path->p_idx));
393+
idx_pblock(path->p_idx));
393394

394395
#ifdef CHECK_BINSEARCH
395396
{
@@ -448,8 +449,9 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block)
448449
r = m - 1;
449450
else
450451
l = m + 1;
451-
ext_debug("%p(%u):%p(%u):%p(%u) ", l, l->ee_block,
452-
m, m->ee_block, r, r->ee_block);
452+
ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ee_block),
453+
m, le32_to_cpu(m->ee_block),
454+
r, le32_to_cpu(r->ee_block));
453455
}
454456

455457
path->p_ext = l - 1;
@@ -582,7 +584,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode,
582584
if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
583585
len = (len - 1) * sizeof(struct ext4_extent_idx);
584586
len = len < 0 ? 0 : len;
585-
ext_debug("insert new index %d after: %d. "
587+
ext_debug("insert new index %d after: %llu. "
586588
"move %d from 0x%p to 0x%p\n",
587589
logical, ptr, len,
588590
(curp->p_idx + 1), (curp->p_idx + 2));
@@ -593,7 +595,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode,
593595
/* insert before */
594596
len = len * sizeof(struct ext4_extent_idx);
595597
len = len < 0 ? 0 : len;
596-
ext_debug("insert new index %d before: %d. "
598+
ext_debug("insert new index %d before: %llu. "
597599
"move %d from 0x%p to 0x%p\n",
598600
logical, ptr, len,
599601
curp->p_idx, (curp->p_idx + 1));
@@ -793,7 +795,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
793795
BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) !=
794796
EXT_LAST_INDEX(path[i].p_hdr));
795797
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,
797799
le32_to_cpu(path[i].p_idx->ei_block),
798800
idx_pblock(path[i].p_idx),
799801
newblock);

0 commit comments

Comments
 (0)