NTFS_READ_LOCKED_INDEX_INODE

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

ntfs_read_locked_index_inode - read an index inode from its base inode  

SYNOPSIS

"SYNOPSIS"

int ntfs_read_locked_index_inode (struct inode * base_vi, struct inode * vi);  

ARGUMENTS

base_vi
base inode
vi
index inode to read
 

DESCRIPTION

ntfs_read_locked_index_inode is called from ntfs_index_iget to read the index inode described by vi into memory from the base mft record described by base_ni.

ntfs_read_locked_index_inode maps, pins and locks the base inode for reading and looks up the attributes relating to the index described by vi before setting up the necessary fields in vi as well as initializing the ntfs inode.

Note, index inodes are essentially attribute inodes (NInoAttr 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.  

Q

What locks are held when the function is called?  

A

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

Return 0 on success and -errno on error. In the error case, the inode will have had make_bad_inode executed on it.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
Q
A

This document was created by man2html, using the manual pages.
Time: 00:02:34 GMT, October 09, 2005