From 350a786486376c73af70044f9662d5790735a8a0 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Thu, 14 Nov 2019 15:15:37 -0600 Subject: [PATCH] Fix for punch list #13 item #1: Odd behavior in the superblock refresh routine. The test "driver_addr != sblock->driver_addr" is failing for superblock version 2 & 3. Fix: there is no driver_addr in superblock version 2 & 3. It should decode the root group object header address (root_addr) and verify accordingly. --- src/H5Fsuper_cache.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index 4132f3beb19..a17fcc0c53c 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -1309,7 +1309,7 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image, H5F_addr_decode(f, (const uint8_t **)&image, &base_addr/*out*/); H5F_addr_decode(f, (const uint8_t **)&image, &ext_addr/*out*/); H5F_addr_decode(f, (const uint8_t **)&image, &stored_eof/*out*/); - H5F_addr_decode(f, (const uint8_t **)&image, &driver_addr/*out*/); + H5F_addr_decode(f, (const uint8_t **)&image, &root_addr/*out*/); if ( base_addr != sblock->base_addr ) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected base_addr") @@ -1317,17 +1317,10 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image, if ( ext_addr != sblock->ext_addr ) HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected ext_addr") + if ( root_addr != sblock->root_addr ) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected root_addr") + /* use stored_eof to update EOA below */ -#if 0 /* JRM */ - /* VFD SWMR TODO: This test is failing for some reason. As it is - * not an issue in phase 1 where we are only using sec2 for the - * writer, we can bypass it for now. - * - * JRM -- 1/16/19 - */ - if ( driver_addr != sblock->driver_addr ) - HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected driver_addr") -#endif /* JRM */ /* Decode checksum */ UINT32DECODE(image, read_chksum);