NTFS_GET_SIZE_FOR_MAPPING_PAIRS

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

 

NAME

ntfs_get_size_for_mapping_pairs - get bytes needed for mapping pairs array  

SYNOPSIS

"SYNOPSIS"

int ntfs_get_size_for_mapping_pairs (const ntfs_volume * vol, const runlist_element * rl, const VCN first_vcn, const VCN last_vcn);  

ARGUMENTS

vol
ntfs volume (needed for the ntfs version)
rl
locked runlist to determine the size of the mapping pairs of
first_vcn
first vcn which to include in the mapping pairs array
last_vcn
last vcn which to include in the mapping pairs array
 

DESCRIPTION

Walk the locked runlist rl and calculate the size in bytes of the mapping pairs array corresponding to the runlist rl, starting at vcn first_vcn and finishing with vcn last_vcn.

A last_vcn of -1 means end of runlist and in that case the size of the mapping pairs array corresponding to the runlist starting at vcn first_vcn and finishing at the end of the runlist is determined.

This for example allows us to allocate a buffer of the right size when building the mapping pairs array.

If rl is NULL, just return 1 (for the single terminator byte).

Return the calculated size in bytes on success. On error, return -errno.  

THE FOLLOWING ERROR CODES ARE DEFINED

-EINVAL - Run list contains unmapped elements. Make sure to only pass fully mapped runlists to this function. -EIO - The runlist is corrupt.  

LOCKING

rl must be locked on entry (either for reading or writing), it remains locked throughout, and is left locked upon return.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
THE FOLLOWING ERROR CODES ARE DEFINED
LOCKING

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