From: Theodore Ts'o Date: Mon, 20 Dec 2010 15:06:58 +0000 (-0500) Subject: Merge branch 'maint' into next X-Git-Tag: v1.41.90.wc1~27 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=562f264243f4d4385910b6f06872730214977736;p=tools%2Fe2fsprogs.git Merge branch 'maint' into next Conflicts: lib/ext2fs/block.c lib/ext2fs/csum.c resize/main.c --- 562f264243f4d4385910b6f06872730214977736 diff --cc lib/ext2fs/block.c index ff0d8bd,4054a07..0e4ec77 --- a/lib/ext2fs/block.c +++ b/lib/ext2fs/block.c @@@ -110,12 -104,10 +110,12 @@@ static int block_iterate_ind(blk_t *ind } else { for (i = 0; i < limit; i++, ctx->bcount++, block_nr++) { if (*block_nr == 0) - continue; + goto skip_sparse; - flags = (*ctx->func)(ctx->fs, block_nr, ctx->bcount, + blk64 = *block_nr; + flags = (*ctx->func)(ctx->fs, &blk64, ctx->bcount, *ind_block, offset, ctx->priv_data); + *block_nr = blk64; changed |= flags; if (flags & BLOCK_ABORT) { ret |= BLOCK_ABORT; diff --cc lib/ext2fs/csum.c index 0ef9ade,10f3423..58e2971 --- a/lib/ext2fs/csum.c +++ b/lib/ext2fs/csum.c @@@ -189,15 -166,11 +191,15 @@@ void print_csum(const char *msg, ext2_f crc1 = ext2fs_crc16(~0, sb->s_uuid, sizeof(fs->super->s_uuid)); crc2 = ext2fs_crc16(crc1, &swabgroup, sizeof(swabgroup)); - crc3 = ext2fs_crc16(crc2, desc, - offsetof(struct ext2_group_desc, bg_checksum)); + crc3 = ext2fs_crc16(crc2, desc, offset); + offset += sizeof(desc->bg_checksum); /* skip checksum */ + /* for checksum of struct ext4_group_desc do the rest...*/ + if (offset < size) + crc3 = ext2fs_crc16(crc3, (char *)desc + offset, size - offset); + - printf("%s: UUID %016Lx%016Lx(%04x), grp %u(%04x): %04x=%04x\n", - msg, *(long long *)&sb->s_uuid, *(long long *)&sb->s_uuid[8], - crc1, group, crc2, crc3, ext2fs_group_desc_csum(fs, group)); + printf("%s: UUID %s(%04x), grp %u(%04x): %04x=%04x\n", - msg, e2p_uuid2str(sb->s_uuid), crc1, group, crc2,crc3, ++ msg, e2p_uuid2str(sb->s_uuid), crc1, group, crc2, crc3, + ext2fs_group_desc_csum(fs, group)); } unsigned char sb_uuid[16] = { 0x4f, 0x25, 0xe8, 0xcf, 0xe7, 0x97, 0x48, 0x23,