.\" 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_LOCKED_INDEX_INODE" "9" "09 October 2005" "" "" .SH NAME ntfs_read_locked_index_inode \- read an index inode from its base inode .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp int ntfs_read_locked_index_inode (struct inode * \fIbase_vi\fB, struct inode * \fIvi\fB); \fR .SH "ARGUMENTS" .TP \fB\fIbase_vi\fB\fR base inode .TP \fB\fIvi\fB\fR index inode to read .SH "DESCRIPTION" .PP \fBntfs_read_locked_index_inode\fR is called from \fBntfs_index_iget\fR to read the index inode described by \fIvi\fR into memory from the base mft record described by \fIbase_ni\fR\&. .PP \fBntfs_read_locked_index_inode\fR maps, pins and locks the base inode for reading and looks up the attributes relating to the index described by \fIvi\fR before setting up the necessary fields in \fIvi\fR as well as initializing the ntfs inode. .PP Note, index inodes are essentially attribute inodes (\fBNInoAttr\fR is true) with the attribute type set to AT_INDEX_ALLOCATION. Apart from that, they are setup like directory inodes since directories are a special case of indices ao they need to be treated in much the same way. Most importantly, for small indices the index allocation attribute might not actually exist. However, the index root attribute always exists but this does not need to have an inode associated with it and this is why we define a new inode type index. Also, like for directories, we need to have an attribute inode for the bitmap attribute corresponding to the index allocation attribute and we can store this in the appropriate field of the inode, just like we do for normal directory inodes. .SH "Q" .PP What locks are held when the function is called? .SH "A" .PP i_state has I_LOCK set, hence the inode is locked, also i_count is set to 1, so it is not going to go away .PP Return 0 on success and -errno on error. In the error case, the inode will have had \fBmake_bad_inode\fR executed on it.