NTFS_ATTR_VCN_TO_LCN_NOLOCK

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

 

NAME

ntfs_attr_vcn_to_lcn_nolock - convert a vcn into a lcn given an ntfs inode  

SYNOPSIS

"SYNOPSIS"

LCN ntfs_attr_vcn_to_lcn_nolock (ntfs_inode * ni, const VCN vcn, const BOOL write_locked);  

ARGUMENTS

ni
ntfs inode of the attribute whose runlist to search
vcn
vcn to convert
write_locked
true if the runlist is locked for writing
 

DESCRIPTION

Find the virtual cluster number vcn in the runlist of the ntfs attribute described by the ntfs inode ni and return the corresponding logical cluster number (lcn).

If the vcn is not mapped yet, the attempt is made to map the attribute extent containing the vcn and the vcn to lcn conversion is retried.

If write_locked is true the caller has locked the runlist for writing and if false for reading.

Since lcns must be >= 0, we use negative return codes with special meaning:

Return code Meaning / Description ========================================== LCN_HOLE Hole / not allocated on disk. LCN_ENOENT There is no such vcn in the runlist, i.e. vcn is out of bounds. LCN_ENOMEM Not enough memory to map runlist. LCN_EIO Critical error (runlist/file is corrupt, i/o error, etc).  

LOCKING

- The runlist must be locked on entry and is left locked on return. - If write_locked is FALSE, i.e. the runlist is locked for reading, the lock may be dropped inside the function so you cannot rely on the runlist still being the same when this function returns.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
LOCKING

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