.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "NTFS_READ_INODE_MOUNT" "" "06 October 2005" "" ""
.SH NAME
ntfs_read_inode_mount \- special read_inode for mount time use only
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
void ntfs_read_inode_mount (struct inode * \fIvi\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIvi\fB\fR
inode to read
.SH "DESCRIPTION"
.PP
Read inode FILE_MFT at mount time, only called with super_block lock
held from within the \fBread_super\fR code path.
.PP
This function exists because when it is called the page cache for \fB$MFT\fR/\fB$DATA\fR
is not initialized and hence we cannot get at the contents of mft records
by calling map_mft_record*().
.PP
Further it needs to cope with the circular references problem, i.e. can't
load any attributes other than \fB$ATTRIBUTE_LIST\fR until \fB$DATA\fR is loaded, because
we don't know where the other extent mft records are yet and again, because
we cannot call map_mft_record*() yet. Obviously this applies only when an
attribute list is actually present in \fB$MFT\fR inode.
.PP
We solve these problems by starting with the \fB$DATA\fR attribute before anything
else and iterating using lookup_attr(\fB$DATA\fR) over all extents. As each extent
is found, we \fBdecompress_mapping_pairs\fR including the implied
\fBmerge_run_lists\fR\&. Each step of the iteration necessarily provides
sufficient information for the next step to complete.
.PP
This should work but there are two possible pit falls (see inline comments
below), but only time will tell if they are real pits or just smoke...