.\" 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_ATTR_VCN_TO_LCN_NOLOCK" "9" "09 October 2005" "" ""
.SH NAME
ntfs_attr_vcn_to_lcn_nolock \- convert a vcn into a lcn given an ntfs inode
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
LCN ntfs_attr_vcn_to_lcn_nolock (ntfs_inode * \fIni\fB, const VCN \fIvcn\fB, const BOOL \fIwrite_locked\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIni\fB\fR
ntfs inode of the attribute whose runlist to search
.TP
\fB\fIvcn\fB\fR
vcn to convert
.TP
\fB\fIwrite_locked\fB\fR
true if the runlist is locked for writing
.SH "DESCRIPTION"
.PP
Find the virtual cluster number \fIvcn\fR in the runlist of the ntfs attribute
described by the ntfs inode \fIni\fR and return the corresponding logical cluster
number (lcn).
.PP
If the \fIvcn\fR is not mapped yet, the attempt is made to map the attribute
extent containing the \fIvcn\fR and the vcn to lcn conversion is retried.
.PP
If \fIwrite_locked\fR is true the caller has locked the runlist for writing and
if false for reading.
.PP
Since lcns must be >= 0, we use negative return codes with special meaning:
.PP
Return code Meaning / Description
==========================================
LCN_HOLE Hole / not allocated on disk.
LCN_ENOENT There is no such vcn in the runlist, i.e. \fIvcn\fR is out of bounds.
LCN_ENOMEM Not enough memory to map runlist.
LCN_EIO Critical error (runlist/file is corrupt, i/o error, etc).
.SH "LOCKING"
.PP
- The runlist must be locked on entry and is left locked on return.
- If \fIwrite_locked\fR 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.