.\" 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_FIND_VCN_NOLOCK" "9" "09 October 2005" "" "" .SH NAME ntfs_attr_find_vcn_nolock \- find a vcn in the runlist of an ntfs inode .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp runlist_element * ntfs_attr_find_vcn_nolock (ntfs_inode * \fIni\fB, const VCN \fIvcn\fB, const BOOL \fIwrite_locked\fB); \fR .SH "ARGUMENTS" .TP \fB\fIni\fB\fR ntfs inode describing the runlist to search .TP \fB\fIvcn\fB\fR vcn to find .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 described by the ntfs inode \fIni\fR and return the address of the runlist element containing the \fIvcn\fR\&. .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 Note you need to distinguish between the lcn of the returned runlist element being >= 0 and LCN_HOLE. In the later case you have to return zeroes on read and allocate clusters on write. .PP Return the runlist element containing the \fIvcn\fR on success and ERR_PTR(-errno) on error. You need to test the return value with \fBIS_ERR\fR to decide if the return is success or failure and \fBPTR_ERR\fR to get to the error code if \fBIS_ERR\fR is true. .SH "THE POSSIBLE ERROR RETURN CODES ARE" .PP -ENOENT - No such vcn in the runlist, i.e. \fIvcn\fR is out of bounds. -ENOMEM - Not enough memory to map runlist. -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.