Lines Matching defs:vcn
27 * @vcn: map runlist part containing this vcn
30 * Map the part of a runlist containing the @vcn of the ntfs inode @ni.
50 * which is not an error as such. This is -ENOENT. It means that @vcn is out
53 * Note the runlist can be NULL after this function returns if @vcn is zero and
70 int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx)
83 ntfs_debug("Mapping runlist part containing vcn 0x%llx.",
84 (unsigned long long)vcn);
114 * If we already have the attribute extent containing @vcn in
116 * that if vcn exceeds the allocated size, we will refuse to
120 if (vcn >= allocated_size_vcn || (a->type == ni->type &&
125 <= vcn && end_vcn >= vcn))
153 CASE_SENSITIVE, vcn, NULL, 0, ctx);
163 * Only decompress the mapping pairs if @vcn is inside it. Otherwise
164 * we get into problems when we try to map an out of bounds vcn because
169 if (unlikely(vcn && vcn >= end_vcn)) {
272 * @vcn: map runlist part containing this vcn
274 * Map the part of a runlist containing the @vcn of the ntfs inode @ni.
277 * which is not an error as such. This is -ENOENT. It means that @vcn is out
284 int ntfs_map_runlist(ntfs_inode *ni, VCN vcn)
290 if (likely(ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn) <=
292 err = ntfs_map_runlist_nolock(ni, vcn, NULL);
298 * ntfs_attr_vcn_to_lcn_nolock - convert a vcn into a lcn given an ntfs inode
300 * @vcn: vcn to convert
303 * Find the virtual cluster number @vcn in the runlist of the ntfs attribute
307 * If the @vcn is not mapped yet, the attempt is made to map the attribute
308 * extent containing the @vcn and the vcn to lcn conversion is retried.
318 * LCN_ENOENT There is no such vcn in the runlist, i.e. @vcn is out of bounds.
327 LCN ntfs_attr_vcn_to_lcn_nolock(ntfs_inode *ni, const VCN vcn,
335 ntfs_debug("Entering for i_ino 0x%lx, vcn 0x%llx, %s_locked.",
336 ni->mft_no, (unsigned long long)vcn,
339 BUG_ON(vcn < 0);
349 /* Convert vcn to lcn. If that fails map the runlist and retry once. */
350 lcn = ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn);
364 if (unlikely(ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn) !=
371 err = ntfs_map_runlist_nolock(ni, vcn, NULL);
394 * ntfs_attr_find_vcn_nolock - find a vcn in the runlist of an ntfs inode
396 * @vcn: vcn to find
399 * Find the virtual cluster number @vcn in the runlist described by the ntfs
400 * inode @ni and return the address of the runlist element containing the @vcn.
402 * If the @vcn is not mapped yet, the attempt is made to map the attribute
403 * extent containing the @vcn and the vcn to lcn conversion is retried.
425 * Return the runlist element containing the @vcn on success and
431 * -ENOENT - No such vcn in the runlist, i.e. @vcn is out of bounds.
450 runlist_element *ntfs_attr_find_vcn_nolock(ntfs_inode *ni, const VCN vcn,
459 ntfs_debug("Entering for i_ino 0x%lx, vcn 0x%llx, with%s ctx.",
460 ni->mft_no, (unsigned long long)vcn, ctx ? "" : "out");
462 BUG_ON(vcn < 0);
473 if (likely(rl && vcn >= rl[0].vcn)) {
475 if (unlikely(vcn < rl[1].vcn)) {
500 * The @vcn is in an unmapped region, map the runlist
503 err = ntfs_map_runlist_nolock(ni, vcn, ctx);
754 lcn = ntfs_rl_vcn_to_lcn(rl, rl->vcn);
755 ntfs_debug("Reading vcn = 0x%llx, lcn = 0x%llx.",
756 (unsigned long long)rl->vcn,
823 * @lowest_vcn: lowest vcn to find (optional, non-resident attributes only)
1164 * @lowest_vcn: lowest vcn to find (optional, non-resident attributes only)
1917 VCN vcn;
2021 vcn = NInoNonResident(ni) ? allocated_size >> vol->cluster_size_bits :
2038 vcn = 0;
2041 CASE_SENSITIVE, vcn, NULL, 0, ctx);
2163 BUG_ON(vcn);