Minor adjustment which does not change behaviour.
authorMichael Neumann <mneumann@ntecs.de>
Wed, 15 Jul 2009 12:36:58 +0000 (14:36 +0200)
committerMichael Neumann <mneumann@ntecs.de>
Wed, 15 Jul 2009 12:36:58 +0000 (14:36 +0200)
This has no effect because of the bzero(). Nevertheless it's
more logical to generate the crc after setting blocks_free to 0.

sbin/hammer/ondisk.c

index 9e71bc1..b229be0 100644 (file)
@@ -420,8 +420,8 @@ format_freemap(struct volume_info *root_vol, hammer_blockmap_t blockmap)
                                         &buffer, isnew);
                bzero(layer1, sizeof(*layer1));
                layer1->phys_offset = HAMMER_BLOCKMAP_UNAVAIL;
-               layer1->layer1_crc = crc32(layer1, HAMMER_LAYER1_CRCSIZE);
                layer1->blocks_free = 0;
+               layer1->layer1_crc = crc32(layer1, HAMMER_LAYER1_CRCSIZE);
        }
        rel_buffer(buffer);