The patch titled ext3: multile block allocate little endian fixes has been added to the -mm tree. Its filename is ext3-multile-block-allocate-little.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: Mingming Cao <cmm@xxxxxxxxxx> Some places in ext3 multiple block allocation code (in 2.6.17-rc3) don't handle the little endian well. This was resulting in *wrong* block numbers being assigned to in-memory block variables and then stored on disk eventually. The following patch has been verified to fix an ext3 filesystem failure when run ltp test on a 64 bit machine. Signed-off-by; Mingming Cao <cmm@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ext3/inode.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff -puN fs/ext3/inode.c~ext3-multile-block-allocate-little fs/ext3/inode.c --- devel/fs/ext3/inode.c~ext3-multile-block-allocate-little 2006-05-03 19:50:35.000000000 -0700 +++ devel-akpm/fs/ext3/inode.c 2006-05-03 19:50:35.000000000 -0700 @@ -711,7 +711,7 @@ static int ext3_splice_branch(handle_t * * direct blocks blocks */ if (num == 0 && blks > 1) { - current_block = le32_to_cpu(where->key + 1); + current_block = le32_to_cpu(where->key) + 1; for (i = 1; i < blks; i++) *(where->p + i ) = cpu_to_le32(current_block++); } @@ -724,7 +724,7 @@ static int ext3_splice_branch(handle_t * if (block_i) { block_i->last_alloc_logical_block = block + blks - 1; block_i->last_alloc_physical_block = - le32_to_cpu(where[num].key + blks - 1); + le32_to_cpu(where[num].key) + blks - 1; } /* We are done with atomic stuff, now do the rest of housekeeping */ @@ -814,11 +814,13 @@ int ext3_get_blocks_handle(handle_t *han /* Simplest case - block found, no allocation needed */ if (!partial) { - first_block = chain[depth - 1].key; + first_block = le32_to_cpu(chain[depth - 1].key); clear_buffer_new(bh_result); count++; /*map more blocks*/ while (count < maxblocks && count <= blocks_to_boundary) { + unsigned long blk; + if (!verify_chain(chain, partial)) { /* * Indirect block might be removed by @@ -831,8 +833,9 @@ int ext3_get_blocks_handle(handle_t *han count = 0; break; } - if (le32_to_cpu(*(chain[depth-1].p+count) == - (first_block + count))) + blk = le32_to_cpu(*(chain[depth-1].p + count)); + + if (blk == first_block + count) count++; else break; _ Patches currently in -mm which might be from cmm@xxxxxxxxxx are ext3-multile-block-allocate-little.patch percpu-counter-data-type-changes-to-suppport.patch percpu-counter-data-type-changes-to-suppport-fix.patch percpu-counter-data-type-changes-to-suppport-fix-fix.patch percpu-counter-data-type-changes-to-suppport-fix-fix-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html