diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-30 13:22:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-06-30 13:22:44 (GMT) |
commit | 9e9f96879d760850794a191988a205fbf1a3957d (patch) | |
tree | bc7afacf87ac7f5d4d4e71923ea44a6cefef14b8 /src/H5Olayout.c | |
parent | 5b7788f3ececa7efa6b91c4d0806e672ed724d14 (diff) | |
download | hdf5-9e9f96879d760850794a191988a205fbf1a3957d.zip hdf5-9e9f96879d760850794a191988a205fbf1a3957d.tar.gz hdf5-9e9f96879d760850794a191988a205fbf1a3957d.tar.bz2 |
[svn-r15295] Description:
Merge revisions 15130:15210 from trunk into metadata journaling branch
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r-- | src/H5Olayout.c | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c index e750d48..1f371f3 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -136,11 +136,30 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, p += 5; /* Address */ - if(mesg->type == H5D_CONTIGUOUS) + if(mesg->type == H5D_CONTIGUOUS) { H5F_addr_decode(f, &p, &(mesg->u.contig.addr)); - else if(mesg->type == H5D_CHUNKED) + + /* Set the layout operations */ + mesg->ops = H5D_LOPS_CONTIG; + } /* end if */ + else if(mesg->type == H5D_CHUNKED) { H5F_addr_decode(f, &p, &(mesg->u.chunk.addr)); + /* Set the layout operations */ + mesg->ops = H5D_LOPS_CHUNK; + + /* Set the chunk operations */ + /* (Only "istore" indexing type currently supported */ + mesg->u.chunk.ops = H5D_COPS_ISTORE; + } /* end if */ + else { + /* Sanity check */ + HDassert(mesg->type == H5D_COMPACT); + + /* Set the layout operations */ + mesg->ops = H5D_LOPS_COMPACT; + } /* end else */ + /* Read the size */ if(mesg->type != H5D_CHUNKED) { /* Don't compute size of contiguous storage here, due to possible @@ -185,11 +204,17 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, HDmemcpy(mesg->u.compact.buf, p, mesg->u.compact.size); p += mesg->u.compact.size; } /* end if */ + + /* Set the layout operations */ + mesg->ops = H5D_LOPS_COMPACT; break; case H5D_CONTIGUOUS: H5F_addr_decode(f, &p, &(mesg->u.contig.addr)); H5F_DECODE_LENGTH(f, p, mesg->u.contig.size); + + /* Set the layout operations */ + mesg->ops = H5D_LOPS_CONTIG; break; case H5D_CHUNKED: @@ -208,6 +233,13 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, /* Compute chunk size */ for(u = 1, mesg->u.chunk.size = mesg->u.chunk.dim[0]; u < mesg->u.chunk.ndims; u++) mesg->u.chunk.size *= mesg->u.chunk.dim[u]; + + /* Set the layout operations */ + mesg->ops = H5D_LOPS_CHUNK; + + /* Set the chunk operations */ + /* (Only "istore" indexing type currently supported */ + mesg->u.chunk.ops = H5D_COPS_ISTORE; break; default: @@ -576,8 +608,8 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg) break; case H5D_CHUNKED: /* Chunked blocks on disk */ - /* Free the file space for the raw data */ - if(H5D_istore_delete(f, dxpl_id, mesg) < 0) + /* Free the file space for the index & chunk raw data */ + if(H5D_chunk_delete(f, dxpl_id, mesg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data") break; @@ -670,7 +702,7 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, layout_dst->u.chunk.addr = HADDR_UNDEF; /* create chunked layout */ - if(H5D_istore_copy(file_src, layout_src, file_dst, layout_dst, udata->src_dtype, cpy_info, udata->src_pline, dxpl_id) < 0) + if(H5D_chunk_copy(file_src, layout_src, file_dst, layout_dst, udata->src_dtype, cpy_info, udata->src_pline, dxpl_id) < 0) HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to copy chunked storage") /* Freed by copy routine */ |