From c2c6e2d0d5f4bfe8c7d31711a09b0bc1cdcd267f Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 22 Aug 2006 12:20:49 -0500 Subject: [svn-r12611] Description: Remove unused flag byte from fractal heap metadata on disk. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2) --- src/H5HFcache.c | 27 --------------------------- src/H5HFpkg.h | 1 - test/fheap.c | 5 +++-- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 2f3a78e..ddf8e0c 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -300,11 +300,6 @@ HDfprintf(stderr, "%s: Load heap header, addr = %a\n", FUNC, addr); if(*p++ != H5HF_HDR_VERSION) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap header version") - /* Metadata flags (unused, currently) */ -/* XXX: Plan out metadata flags (including "read-only duplicate" feature) */ - if(*p++ != 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unknown metadata flag in fractal heap header") - /* General heap information */ UINT16DECODE(p, hdr->id_len); /* Heap ID length */ UINT16DECODE(p, hdr->filter_len); /* I/O filters' encoded length */ @@ -481,10 +476,6 @@ HDfprintf(stderr, "%s: Flushing heap header, addr = %a, destroy = %u\n", FUNC, a /* Version # */ *p++ = H5HF_HDR_VERSION; - /* Metadata status flags */ -/* XXX: Set this? */ - *p++ = 0; - /* General heap information */ UINT16ENCODE(p, hdr->id_len); /* Heap ID length */ UINT16ENCODE(p, hdr->filter_len); /* I/O filters' encoded length */ @@ -749,11 +740,6 @@ HDfprintf(stderr, "%s: Load indirect block, addr = %a\n", FUNC, addr); if(*p++ != H5HF_IBLOCK_VERSION) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block version") - /* Metadata flags (unused, currently) */ -/* XXX: Plan out metadata flags (including "read-only duplicate" feature) */ - if(*p++ != 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unknown metadata flag in fractal heap direct block") - /* Address of heap that owns this block */ H5F_addr_decode(f, &p, &heap_addr); if(H5F_addr_ne(heap_addr, hdr->heap_addr)) @@ -937,10 +923,6 @@ HDfprintf(stderr, "%s: hdr->man_dtable.cparam.width = %u\n", FUNC, hdr->man_dtab /* Version # */ *p++ = H5HF_IBLOCK_VERSION; - /* Metadata status flags */ -/* XXX: Set this? */ - *p++ = 0; - /* Address of heap header for heap which owns this block */ H5F_addr_encode(f, &p, hdr->heap_addr); @@ -1223,11 +1205,6 @@ HGOTO_ERROR(H5E_HEAP, H5E_UNSUPPORTED, NULL, "I/O filters not supported yet") if(*p++ != H5HF_DBLOCK_VERSION) HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong fractal heap direct block version") - /* Metadata flags (unused, currently) */ -/* XXX: Plan out metadata flags (including "read-only duplicate" feature) */ - if(*p++ != 0) - HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unknown metadata flag in fractal heap direct block") - /* Address of heap that owns this block (just for file integrity checks) */ H5F_addr_decode(f, &p, &heap_addr); if(H5F_addr_ne(heap_addr, hdr->heap_addr)) @@ -1323,10 +1300,6 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, /* Version # */ *p++ = H5HF_DBLOCK_VERSION; - /* Metadata status flags */ -/* XXX: Set this? */ - *p++ = 0; - /* Address of heap header for heap which owns this block */ H5F_addr_encode(f, &p, hdr->heap_addr); diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h index 14a9baa..9415281 100644 --- a/src/H5HFpkg.h +++ b/src/H5HFpkg.h @@ -56,7 +56,6 @@ #define H5HF_METADATA_PREFIX_SIZE(c) ( \ 4 /* Signature */ \ + 1 /* Version */ \ - + 1 /* Metadata flags */ \ + ((c) ? H5HF_SIZEOF_CHKSUM : 0) /* Metadata checksum */ \ ) diff --git a/test/fheap.c b/test/fheap.c index 209a2a0..aa35d63 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -39,7 +39,7 @@ #define NUM_FILL_OBJS 11 /* "Small" heap creation parameters */ -#define SMALL_DBLOCK_OVERHEAD 22 /* Overhead for direct blocks */ +#define SMALL_DBLOCK_OVERHEAD 21 /* Overhead for direct blocks */ #define SMALL_CHECKSUM_DBLOCKS TRUE /* Whether to checksum direct blocks */ #define SMALL_MAN_WIDTH 4 /* Managed obj. table width */ #define SMALL_MAN_START_BLOCK_SIZE 512 /* Managed obj. starting block size */ @@ -50,7 +50,8 @@ #define SMALL_STAND_SIZE (SMALL_MAN_MAX_DIRECT_SIZE - SMALL_DBLOCK_OVERHEAD) /* Standalone obj. min. size */ /* "Large" heap creation parameters */ -#define LARGE_DBLOCK_OVERHEAD 22 /* Overhead for direct blocks */ +#define LARGE_DBLOCK_OVERHEAD 21 /* Overhead for direct blocks */ + /* (coincidentally the same size as for small direct blocks) */ #define LARGE_CHECKSUM_DBLOCKS FALSE /* Whether to checksum direct blocks */ #define LARGE_MAN_WIDTH 32 /* Managed obj. table width */ #define LARGE_MAN_START_BLOCK_SIZE 4096 /* Managed obj. starting block size */ -- cgit v0.12