~ubuntu-branches/ubuntu/gutsy/ntfsdoc/gutsy

« back to all changes in this revision

Viewing changes to concepts/index_record.html

  • Committer: Bazaar Package Importer
  • Author(s): David Martínez Moreno
  • Date: 2002-01-12 03:35:17 UTC
  • Revision ID: james.westby@ubuntu.com-20020112033517-tspnkaz5z9o0y6b2
Tags: upstream-0.4
Import upstream version 0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<!-- http://linux-ntfs.sourceforge.net/ntfs/concepts/index_record.html -->
 
3
 
 
4
<html lang="en">
 
5
  <head>
 
6
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 
7
    <meta name="description" content="NTFS Documentation">
 
8
    <link rel="stylesheet" type="text/css" href="../style/ntfsdoc.css">
 
9
    <link rel="start" type="text/html" href="../index.html" title="NTFS Documentation">
 
10
    <title>Index Record - Concept - NTFS Documentation</title>
 
11
  </head>
 
12
 
 
13
  <body>
 
14
    <table border="0" class="toolbar" summary="" cellspacing="0">
 
15
      <tr>
 
16
        <td class="toolbar"><a accesskey="1" class="toolbar" href="../index.html">Home</a></td>
 
17
        <td class="toolbar">&nbsp;</td>
 
18
        <td class="toolbar"><a accesskey="2" class="toolbar" href="../files/index.html">Files</a></td>
 
19
        <td class="toolbar">&nbsp;</td>
 
20
        <td class="toolbar"><a accesskey="3" class="toolbar" href="../attributes/index.html">Attributes</a></td>
 
21
        <td class="toolbar">&nbsp;</td>
 
22
        <td class="toolbar"><a accesskey="4" class="toolbar" href="../concepts/index.html">Concepts</a></td>
 
23
        <td class="toolbar">&nbsp;</td>
 
24
        <td class="toolbar"><a accesskey="5" class="toolbar" href="../help/glossary.html">Glossary</a></td>
 
25
        <td class="toolbar">&nbsp;</td>
 
26
        <td class="toolbar"><a accesskey="6" class="toolbar" href="../help/index.html">Help</a></td>
 
27
      </tr>
 
28
    </table>
 
29
 
 
30
    <h1>Concept - Index Record</h1>
 
31
    <a class="prevnext" accesskey="," href="index_header.html">Previous</a>
 
32
    <a class="prevnext" accesskey="." href="links.html">Next</a>
 
33
 
 
34
    <h2>Overview</h2>
 
35
 
 
36
    <pre>This is only applicable to a file index ($I30)</pre>
 
37
 
 
38
    <pre>
 
39
    indx help describe as "index = key + data"
 
40
 
 
41
    given an INDX record, it's difficult to work out what's
 
42
    being indexed (that info is in the index root)
 
43
    </pre>
 
44
 
 
45
    <h2>Definition</h2>
 
46
    <p>
 
47
    This is a sub-node of the B+ tree that implements an index (e.g. a directory). It is
 
48
    stored in the stream of the index allocation attribute associated to the index it
 
49
    belongs to. 
 
50
    </p>
 
51
 
 
52
    <h2>Layout</h2>
 
53
    <p>
 
54
    An INDX buffer is at least 2 KB large or the cluster size if larger (this seems to be
 
55
    a per-index parameter). It falls into 2 parts: 
 
56
    </p>
 
57
 
 
58
    <h3>The header part</h3>
 
59
 
 
60
    this ISN'T just the header...
 
61
 
 
62
    <table border="1" summary="" cellspacing="0">
 
63
      <tr>
 
64
        <th class="numeric">Offset</th>
 
65
        <th class="numeric">Size</th>
 
66
        <th>Description</th>
 
67
      </tr>
 
68
      <tr>
 
69
        <td class="numeric">~</td>
 
70
        <td class="numeric">~</td>
 
71
        <td><a href="../concepts/index_header.html">Standard Index Header</a></td>
 
72
      </tr>
 
73
      <tr>
 
74
        <td class="numeric">0x00</td>
 
75
        <td class="numeric">8</td>
 
76
        <td>MFT Reference of the file</td>
 
77
      </tr>
 
78
      <tr>
 
79
        <td class="numeric">0x08</td>
 
80
        <td class="numeric">2</td>
 
81
        <td>Size of this index entry</td>
 
82
      </tr>
 
83
      <tr>
 
84
        <td class="numeric">0x0A</td>
 
85
        <td class="numeric">2</td>
 
86
        <td>Offset to the filename</td>
 
87
      </tr>
 
88
      <tr>
 
89
        <td class="numeric">0x0C</td>
 
90
        <td class="numeric">2</td>
 
91
        <td>Index Flags</td>
 
92
      </tr>
 
93
      <tr>
 
94
        <td class="numeric">0x0E</td>
 
95
        <td class="numeric">2</td>
 
96
        <td>Padding (align to 8 bytes)</td>
 
97
      </tr>
 
98
      <tr>
 
99
        <td class="numeric">0x10</td>
 
100
        <td class="numeric">8</td>
 
101
        <td>MFT File Reference of the parent</td>
 
102
      </tr>
 
103
      <tr>
 
104
        <td class="numeric">0x18</td>
 
105
        <td class="numeric">8</td>
 
106
        <td>File creation time</td>
 
107
      </tr>
 
108
      <tr>
 
109
        <td class="numeric">0x20</td>
 
110
        <td class="numeric">8</td>
 
111
        <td>Last modification time</td>
 
112
      </tr>
 
113
      <tr>
 
114
        <td class="numeric">0x28</td>
 
115
        <td class="numeric">8</td>
 
116
        <td>Last modification time for FILE record</td>
 
117
      </tr>
 
118
      <tr>
 
119
        <td class="numeric">0x30</td>
 
120
        <td class="numeric">8</td>
 
121
        <td>Last access time</td>
 
122
      </tr>
 
123
      <tr>
 
124
        <td class="numeric">0x38</td>
 
125
        <td class="numeric">8</td>
 
126
        <td>Allocated size of file</td>
 
127
      </tr>
 
128
      <tr>
 
129
        <td class="numeric">0x40</td>
 
130
        <td class="numeric">8</td>
 
131
        <td>Real size of file</td>
 
132
      </tr>
 
133
      <tr>
 
134
        <td class="numeric">0x48</td>
 
135
        <td class="numeric">8</td>
 
136
        <td>File Flags</td>
 
137
      </tr>
 
138
      <tr>
 
139
        <td class="numeric">0x50</td>
 
140
        <td class="numeric">1</td>
 
141
        <td>Length of filename (F)</td>
 
142
      </tr>
 
143
      <tr>
 
144
        <td class="numeric">0x51</td>
 
145
        <td class="numeric">1</td>
 
146
        <td><a href="filename_namespace.html">Filename namespace</a></td>
 
147
      </tr>
 
148
      <tr>
 
149
        <td class="numeric">0x52</td>
 
150
        <td class="numeric">2F</td>
 
151
        <td>Filename</td>
 
152
      </tr>
 
153
      <tr>
 
154
        <td class="numeric">2F+0x52</td>
 
155
        <td class="numeric">P</td>
 
156
        <td>Padding (align to 8 bytes)</td>
 
157
      </tr>
 
158
      <tr>
 
159
        <td class="numeric">P+2F+0x52</td>
 
160
        <td class="numeric">8</td>
 
161
        <td>VCN of index buffer with sub-nodes</td>
 
162
      </tr>
 
163
    </table>
 
164
 
 
165
    <pre>
 
166
    N.B. the filename is not null terminated
 
167
    surely the flags can't be 8 bytes long
 
168
    table for the flags
 
169
    VCN of ib only exists when flags&amp;1
 
170
    last entry has a size of 0x10 (just large enough
 
171
    for the flags (and a mft ref of zero))
 
172
    </pre>
 
173
 
 
174
    <h3>The sequence of index entries part</h3>
 
175
    <p>
 
176
    This is a sequence of index entries similar to the one found in the index root
 
177
    attribute.
 
178
    </p>
 
179
 
 
180
    The index entry has the following structure: 
 
181
 
 
182
    <pre>
 
183
    Index entry flags (16-bit).
 
184
 
 
185
    INDEX_ENTRY_NODE = cpu_to_le16(1), This entry contains a sub-node,
 
186
                      i.e. a reference to an index
 
187
                      block in form of a virtual
 
188
                      cluster number (see below).
 
189
    INDEX_ENTRY_END  = cpu_to_le16(2), This signifies the last entry in
 
190
                      an index block. The index entry
 
191
                      does not represent a file but it
 
192
                      can point to a sub-node.
 
193
    
 
194
    This is an index entry. A sequence of such entries follows each INDEX_HEADER
 
195
    structure. Together they make up a complete index. The index follows either
 
196
    an index root attribute or an index allocation attribute.
 
197
    
 
198
    NOTE: Before NTFS 3.0 only filename attributes were indexed.
 
199
    </pre>
 
200
 
 
201
    <p>
 
202
    Most entries are not valid (and present) if the entry is the last one. This entry
 
203
    does not represent a file and is used only for subnodes. The pointer to the subnode
 
204
    buffer is only present if the entry has subnodes.
 
205
    </p>
 
206
 
 
207
    <br>
 
208
    <a class="contact" href="http://linux-ntfs.sourceforge.net/ntfs/concepts/index_record.html">Online</a>
 
209
    <!-- The two validators will only work if this page is visible on the web -->
 
210
    <a class="contact" href="http://validator.w3.org/check/referer">Validate HTML</a>
 
211
    <a class="contact" href="http://jigsaw.w3.org/css-validator/check/referer">Validate CSS</a>
 
212
    <a class="contact" href="mailto:webmaster@flatcap.org">$Id: index_record.html,v 1.13 2001/07/11 17:09:23 flatcap Exp $</a>
 
213
  </body>
 
214
</html>
 
215