提交 26d535ed 编写于 作者: D Dmitry Monakhov 提交者: Theodore Ts'o

Fix compilation with EXT_DEBUG, also fix leXX_to_cpu conversions.

Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
Acked-by: NAlex Tomas <alex@clusterfs.com>
Signed-off-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
上级 d699594d
...@@ -383,13 +383,14 @@ ext4_ext_binsearch_idx(struct inode *inode, struct ext4_ext_path *path, int bloc ...@@ -383,13 +383,14 @@ ext4_ext_binsearch_idx(struct inode *inode, struct ext4_ext_path *path, int bloc
r = m - 1; r = m - 1;
else else
l = m + 1; l = m + 1;
ext_debug("%p(%u):%p(%u):%p(%u) ", l, l->ei_block, ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ei_block),
m, m->ei_block, r, r->ei_block); m, le32_to_cpu(m->ei_block),
r, le32_to_cpu(r->ei_block));
} }
path->p_idx = l - 1; path->p_idx = l - 1;
ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block), ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block),
idx_block(path->p_idx)); idx_pblock(path->p_idx));
#ifdef CHECK_BINSEARCH #ifdef CHECK_BINSEARCH
{ {
...@@ -448,8 +449,9 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block) ...@@ -448,8 +449,9 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block)
r = m - 1; r = m - 1;
else else
l = m + 1; l = m + 1;
ext_debug("%p(%u):%p(%u):%p(%u) ", l, l->ee_block, ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ee_block),
m, m->ee_block, r, r->ee_block); m, le32_to_cpu(m->ee_block),
r, le32_to_cpu(r->ee_block));
} }
path->p_ext = l - 1; path->p_ext = l - 1;
...@@ -582,7 +584,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode, ...@@ -582,7 +584,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode,
if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) { if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
len = (len - 1) * sizeof(struct ext4_extent_idx); len = (len - 1) * sizeof(struct ext4_extent_idx);
len = len < 0 ? 0 : len; len = len < 0 ? 0 : len;
ext_debug("insert new index %d after: %d. " ext_debug("insert new index %d after: %llu. "
"move %d from 0x%p to 0x%p\n", "move %d from 0x%p to 0x%p\n",
logical, ptr, len, logical, ptr, len,
(curp->p_idx + 1), (curp->p_idx + 2)); (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,7 +595,7 @@ static int ext4_ext_insert_index(handle_t *handle, struct inode *inode,
/* insert before */ /* insert before */
len = len * sizeof(struct ext4_extent_idx); len = len * sizeof(struct ext4_extent_idx);
len = len < 0 ? 0 : len; len = len < 0 ? 0 : len;
ext_debug("insert new index %d before: %d. " ext_debug("insert new index %d before: %llu. "
"move %d from 0x%p to 0x%p\n", "move %d from 0x%p to 0x%p\n",
logical, ptr, len, logical, ptr, len,
curp->p_idx, (curp->p_idx + 1)); curp->p_idx, (curp->p_idx + 1));
...@@ -793,7 +795,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode, ...@@ -793,7 +795,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) != BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) !=
EXT_LAST_INDEX(path[i].p_hdr)); EXT_LAST_INDEX(path[i].p_hdr));
while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
ext_debug("%d: move %d:%d in new index %llu\n", i, ext_debug("%d: move %d:%llu in new index %llu\n", i,
le32_to_cpu(path[i].p_idx->ei_block), le32_to_cpu(path[i].p_idx->ei_block),
idx_pblock(path[i].p_idx), idx_pblock(path[i].p_idx),
newblock); newblock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册