diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-07-08 14:54:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-07-08 14:54:54 (GMT) |
commit | bd1e676c521d881b3143829f493a28b5ced1294b (patch) | |
tree | 69c50f9fe21ce87f293d8617a6bd51b4cc1e0244 /doc/html/move.html | |
parent | 73345095897d9698bb1f2f7df830bf80a56dc65a (diff) | |
download | hdf5-bd1e676c521d881b3143829f493a28b5ced1294b.zip hdf5-bd1e676c521d881b3143829f493a28b5ced1294b.tar.gz hdf5-bd1e676c521d881b3143829f493a28b5ced1294b.tar.bz2 |
[svn-r467] Restructuring documentation.
Diffstat (limited to 'doc/html/move.html')
-rw-r--r-- | doc/html/move.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/html/move.html b/doc/html/move.html new file mode 100644 index 0000000..ec87d11 --- /dev/null +++ b/doc/html/move.html @@ -0,0 +1,66 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> + <head> + <title>How to Relocate a File Data Structure</title> + </head> + + <body> + <h1>How to Relocate a File Data Structure</h1> + + <p>Since file data structures can be cached in memory by the H5AC + package it becomes problematic to move such a data structure in + the file. One cannot just copy a portion of the file from one + location to another because: + + <ol> + <li>the file might not contain the latest information, and</li> + <li>the H5AC package might not realize that the object's + address has changed and attempt to write the object to disk + at the old address.</li> + </ol> + + <p>Here's a correct method to move data from one location to + another. The example code assumes that one is moving a B-link + tree node from <code>old_addr</code> to <code>new_addr</code>. + + <ol> + <li>Make sure the disk is up-to-date with respect to the + cache. There is no need to remove the item from the cache, + hence the final argument to <code>H5AC_flush</code> is + <code>FALSE</code>. + <br><br> + <code> + H5AC_flush (f, H5AC_BT, old_addr, FALSE);<br> + </code> + <br> + </li> + + <li>Read the data from the old address and write it to the new + address. + <br><br> + <code> + H5F_block_read (f, old_addr, size, buf);<br> + H5F_block_write (f, new_addr, size, buf);<br> + </code> + <br> + </li> + + <li>Notify the cache that the address of the object changed. + <br><br> + <code> + H5AC_rename (f, H5AC_BT, old_addr, new_addr);<br> + </code> + <br> + </li> + </ol> + + + + <hr> + <address><a href="mailto:robb@maya.nuance.com">Robb Matzke</a></address> +<!-- Created: Mon Jul 14 15:09:06 EST 1997 --> +<!-- hhmts start --> +Last modified: Mon Jul 14 15:38:29 EST +<!-- hhmts end --> + </body> +</html> |