mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
242 lines
13 KiB
HTML
242 lines
13 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||
|
|
<head>
|
||
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||
|
|
<meta name="generator" content="Doxygen 1.14.0"/>
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||
|
|
<title>libaaruformat: TapePartitionEntry Struct Reference</title>
|
||
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
||
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
||
|
|
<script type="text/javascript" src="navtree.js"></script>
|
||
|
|
<script type="text/javascript" src="cookie.js"></script>
|
||
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
||
|
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
|
<div id="titlearea">
|
||
|
|
<table cellspacing="0" cellpadding="0">
|
||
|
|
<tbody>
|
||
|
|
<tr id="projectrow">
|
||
|
|
<td id="projectalign">
|
||
|
|
<div id="projectname">libaaruformat<span id="projectnumber"> 1.0</span>
|
||
|
|
</div>
|
||
|
|
<div id="projectbrief">Aaru Data Preservation Suite - Format Library</div>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<!-- end header part -->
|
||
|
|
<!-- Generated by Doxygen 1.14.0 -->
|
||
|
|
<script type="text/javascript">
|
||
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
$(function() { codefold.init(); });
|
||
|
|
</script>
|
||
|
|
<script type="text/javascript" src="menudata.js"></script>
|
||
|
|
<script type="text/javascript" src="menu.js"></script>
|
||
|
|
<script type="text/javascript">
|
||
|
|
$(function() {
|
||
|
|
initMenu('',true,false,'search.php','Search',true);
|
||
|
|
$(function() { init_search(); });
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
<div id="main-nav"></div>
|
||
|
|
</div><!-- top -->
|
||
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
|
<div id="nav-tree">
|
||
|
|
<div id="nav-tree-contents">
|
||
|
|
<div id="nav-sync" class="sync"></div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
|
class="ui-resizable-handle">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<script type="text/javascript">
|
||
|
|
$(function(){initNavTree('structTapePartitionEntry.html','',''); });
|
||
|
|
</script>
|
||
|
|
<div id="container">
|
||
|
|
<div id="doc-content">
|
||
|
|
<!-- window showing the filter options -->
|
||
|
|
<div id="MSearchSelectWindow"
|
||
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
|
<div id="MSearchResultsWindow">
|
||
|
|
<div id="MSearchResults">
|
||
|
|
<div class="SRPage">
|
||
|
|
<div id="SRIndex">
|
||
|
|
<div id="SRResults"></div>
|
||
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="header">
|
||
|
|
<div class="headertitle"><div class="title">TapePartitionEntry Struct Reference</div></div>
|
||
|
|
</div><!--header-->
|
||
|
|
<div class="contents">
|
||
|
|
|
||
|
|
<p>Describes a single physical partition on a tape medium.
|
||
|
|
<a href="#details">More...</a></p>
|
||
|
|
|
||
|
|
<p><code>#include <<a class="el" href="tape_8h_source.html">aaruformat/structs/tape.h</a>></code></p>
|
||
|
|
<table class="memberdecls">
|
||
|
|
<tr class="heading"><td colspan="2"><h2 id="header-pub-attribs" class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||
|
|
Data Fields</h2></td></tr>
|
||
|
|
<tr class="memitem:afb840f56fb39b1074f96715d102e2c0f" id="r_afb840f56fb39b1074f96715d102e2c0f"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#afb840f56fb39b1074f96715d102e2c0f">Number</a></td></tr>
|
||
|
|
<tr class="memdesc:afb840f56fb39b1074f96715d102e2c0f"><td class="mdescLeft"> </td><td class="mdescRight">Partition number (unique identifier for this partition). <br /></td></tr>
|
||
|
|
<tr class="memitem:af2cdde924cd050523ad0fb453eb5842d" id="r_af2cdde924cd050523ad0fb453eb5842d"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#af2cdde924cd050523ad0fb453eb5842d">FirstBlock</a></td></tr>
|
||
|
|
<tr class="memdesc:af2cdde924cd050523ad0fb453eb5842d"><td class="mdescLeft"> </td><td class="mdescRight">First block in the partition (inclusive). <br /></td></tr>
|
||
|
|
<tr class="memitem:a19aec00f3d7b0850bf49b055dbcc837d" id="r_a19aec00f3d7b0850bf49b055dbcc837d"><td class="memItemLeft" align="right" valign="top">uint64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="#a19aec00f3d7b0850bf49b055dbcc837d">LastBlock</a></td></tr>
|
||
|
|
<tr class="memdesc:a19aec00f3d7b0850bf49b055dbcc837d"><td class="mdescLeft"> </td><td class="mdescRight">Last block in the partition (inclusive). <br /></td></tr>
|
||
|
|
</table>
|
||
|
|
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
|
||
|
|
<div class="textblock"><p>Describes a single physical partition on a tape medium. </p>
|
||
|
|
<p>Tape partitions are physical divisions of the tape storage area, each with its own block address space. Partitioning allows a single tape to be logically divided for organizational purposes, access control, or compatibility with different systems.</p>
|
||
|
|
<p><b>Partition Number:</b> The partition number uniquely identifies the partition on the tape. Most tapes have a single partition (partition 0), but advanced formats like LTO, DLT, and AIT support multiple partitions. The numbering scheme is format-specific:</p><ul>
|
||
|
|
<li>Single-partition tapes: Usually partition 0</li>
|
||
|
|
<li>Multi-partition tapes: Typically 0-255, though most formats support fewer</li>
|
||
|
|
</ul>
|
||
|
|
<p><b>Block Range:</b> Each partition has an independent block address space starting from its FirstBlock. The FirstBlock and LastBlock fields define the inclusive range of blocks in the partition:</p><ul>
|
||
|
|
<li>FirstBlock: The first block number in this partition (often 0)</li>
|
||
|
|
<li>LastBlock: The last block number in this partition (inclusive)</li>
|
||
|
|
</ul>
|
||
|
|
<p><b>Block Address Spaces:</b> Block addresses are local to each partition. For example:</p><ul>
|
||
|
|
<li>Partition 0: blocks 0-9999 (10,000 blocks)</li>
|
||
|
|
<li>Partition 1: blocks 0-4999 (5,000 blocks)</li>
|
||
|
|
</ul>
|
||
|
|
<p>Block 0 in partition 0 is distinct from block 0 in partition 1. When referencing a block, both the partition number and block number are required for uniqueness.</p>
|
||
|
|
<p><b>Partition Size:</b> Partition size in blocks = (LastBlock - FirstBlock + 1) Total tape capacity = sum of all partition sizes</p>
|
||
|
|
<p><b>Physical Organization:</b> On physical tape, partitions are typically laid out sequentially:</p><ul>
|
||
|
|
<li>Partition 0 occupies the beginning of the tape</li>
|
||
|
|
<li>Partition 1 follows partition 0</li>
|
||
|
|
<li>And so on...</li>
|
||
|
|
</ul>
|
||
|
|
<p>Some formats allow non-sequential access to partitions via tape directory structures or partition tables stored in a leader area.</p>
|
||
|
|
<p><b>Use Cases:</b></p><ul>
|
||
|
|
<li><b>Data segregation</b>: Separate system backups from user data</li>
|
||
|
|
<li><b>Multi-system use</b>: Different partitions for different operating systems</li>
|
||
|
|
<li><b>Tiered storage</b>: Fast-access partition for indices, bulk partition for data</li>
|
||
|
|
<li><b>Compatibility</b>: Legacy system may require specific partition layouts</li>
|
||
|
|
<li><b>Write protection</b>: Some formats allow per-partition write protection</li>
|
||
|
|
</ul>
|
||
|
|
<p><b>Format Examples:</b></p><ul>
|
||
|
|
<li><b>LTO (Linear Tape-Open)</b>: Supports 2-4 partitions depending on generation</li>
|
||
|
|
<li><b>DLT (Digital Linear Tape)</b>: Typically 1 partition, some variants support more</li>
|
||
|
|
<li><b>DAT (Digital Audio Tape)</b>: Usually 1 partition</li>
|
||
|
|
<li><b>AIT (Advanced Intelligent Tape)</b>: Supports multiple partitions</li>
|
||
|
|
<li><b>QIC (Quarter-Inch Cartridge)</b>: Typically 1 partition</li>
|
||
|
|
</ul>
|
||
|
|
<dl class="section note"><dt>Note</dt><dd>Partition numbers are format-specific. Some formats use 0-based numbering, others use 1-based. The Aaru format preserves the original numbering.</dd>
|
||
|
|
<dd>
|
||
|
|
Not all tape formats support partitioning. Single-partition tapes are common and have one entry with Number=0.</dd>
|
||
|
|
<dd>
|
||
|
|
Partitions cannot overlap in the physical block space, though the logical block numbering within each partition may start from 0.</dd>
|
||
|
|
<dd>
|
||
|
|
Empty partitions (reserved but unused space) may exist with FirstBlock > LastBlock or with no files allocated to them. </dd></dl>
|
||
|
|
|
||
|
|
<p class="definition">Definition at line <a class="el" href="tape_8h_source.html#l00319">319</a> of file <a class="el" href="tape_8h_source.html">tape.h</a>.</p>
|
||
|
|
</div><a name="doc-variable-members" id="doc-variable-members"></a><h2 id="header-doc-variable-members" class="groupheader">Field Documentation</h2>
|
||
|
|
<a id="af2cdde924cd050523ad0fb453eb5842d" name="af2cdde924cd050523ad0fb453eb5842d"></a>
|
||
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af2cdde924cd050523ad0fb453eb5842d">◆ </a></span>FirstBlock</h2>
|
||
|
|
|
||
|
|
<div class="memitem">
|
||
|
|
<div class="memproto">
|
||
|
|
<table class="memname">
|
||
|
|
<tr>
|
||
|
|
<td class="memname">uint64_t TapePartitionEntry::FirstBlock</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div><div class="memdoc">
|
||
|
|
|
||
|
|
<p>First block in the partition (inclusive). </p>
|
||
|
|
<p>Starting block address for this partition's address space. Often 0, but format-dependent. </p>
|
||
|
|
|
||
|
|
<p class="definition">Definition at line <a class="el" href="tape_8h_source.html#l00323">323</a> of file <a class="el" href="tape_8h_source.html">tape.h</a>.</p>
|
||
|
|
|
||
|
|
<p class="reference">Referenced by <a class="el" href="tape_8c_source.html#l00982">aaruf_get_tape_partition()</a>, and <a class="el" href="tape_8c_source.html#l01196">aaruf_set_tape_partition()</a>.</p>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<a id="a19aec00f3d7b0850bf49b055dbcc837d" name="a19aec00f3d7b0850bf49b055dbcc837d"></a>
|
||
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a19aec00f3d7b0850bf49b055dbcc837d">◆ </a></span>LastBlock</h2>
|
||
|
|
|
||
|
|
<div class="memitem">
|
||
|
|
<div class="memproto">
|
||
|
|
<table class="memname">
|
||
|
|
<tr>
|
||
|
|
<td class="memname">uint64_t TapePartitionEntry::LastBlock</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div><div class="memdoc">
|
||
|
|
|
||
|
|
<p>Last block in the partition (inclusive). </p>
|
||
|
|
<p>Ending block address for this partition's address space. Must be ≥ FirstBlock. The partition contains all blocks from FirstBlock through LastBlock inclusive. </p>
|
||
|
|
|
||
|
|
<p class="definition">Definition at line <a class="el" href="tape_8h_source.html#l00325">325</a> of file <a class="el" href="tape_8h_source.html">tape.h</a>.</p>
|
||
|
|
|
||
|
|
<p class="reference">Referenced by <a class="el" href="tape_8c_source.html#l00982">aaruf_get_tape_partition()</a>, and <a class="el" href="tape_8c_source.html#l01196">aaruf_set_tape_partition()</a>.</p>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<a id="afb840f56fb39b1074f96715d102e2c0f" name="afb840f56fb39b1074f96715d102e2c0f"></a>
|
||
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afb840f56fb39b1074f96715d102e2c0f">◆ </a></span>Number</h2>
|
||
|
|
|
||
|
|
<div class="memitem">
|
||
|
|
<div class="memproto">
|
||
|
|
<table class="memname">
|
||
|
|
<tr>
|
||
|
|
<td class="memname">uint8_t TapePartitionEntry::Number</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div><div class="memdoc">
|
||
|
|
|
||
|
|
<p>Partition number (unique identifier for this partition). </p>
|
||
|
|
<p>Identifies this partition among all partitions on the tape. Valid range: 0-255, though most tapes use 0-3. </p>
|
||
|
|
|
||
|
|
<p class="definition">Definition at line <a class="el" href="tape_8h_source.html#l00321">321</a> of file <a class="el" href="tape_8h_source.html">tape.h</a>.</p>
|
||
|
|
|
||
|
|
<p class="reference">Referenced by <a class="el" href="tape_8c_source.html#l01196">aaruf_set_tape_partition()</a>, and <a class="el" href="tape_8c_source.html#l00346">process_tape_partitions_block()</a>.</p>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||
|
|
<li>include/aaruformat/structs/<a class="el" href="tape_8h_source.html">tape.h</a></li>
|
||
|
|
</ul>
|
||
|
|
</div><!-- contents -->
|
||
|
|
</div><!-- doc-content -->
|
||
|
|
<div id="page-nav" class="page-nav-panel">
|
||
|
|
<div id="page-nav-resize-handle"></div>
|
||
|
|
<div id="page-nav-tree">
|
||
|
|
<div id="page-nav-contents">
|
||
|
|
</div><!-- page-nav-contents -->
|
||
|
|
</div><!-- page-nav-tree -->
|
||
|
|
</div><!-- page-nav -->
|
||
|
|
</div><!-- container -->
|
||
|
|
<!-- start footer part -->
|
||
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
|
<ul>
|
||
|
|
<li class="navelem"><a href="structTapePartitionEntry.html">TapePartitionEntry</a></li>
|
||
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0 </li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|