Lines Matching defs:vcn

73 static s64 ntfs_ib_vcn_to_pos(ntfs_index_context *icx, VCN vcn)
75 return vcn << icx->vcn_size_bits;
85 s64 ret, vcn = sle64_to_cpu(ib->index_block_vcn);
87 ntfs_log_trace("vcn: %lld\n", (long long)vcn);
89 ret = ntfs_attr_mst_pwrite(icx->ia_na, ntfs_ib_vcn_to_pos(icx, vcn),
93 (long long)vcn, (unsigned long long)icx->ni->mft_no);
200 * Get the subnode vcn to which the index entry refers.
339 static void ntfs_ie_set_vcn(INDEX_ENTRY *ie, VCN vcn)
341 *ntfs_ie_get_vcn_addr(ie) = cpu_to_sle64(vcn);
461 u64 inum, VCN vcn)
467 ntfs_log_error("Corrupt index block signature: vcn %lld inode "
468 "%llu\n", (long long)vcn,
473 if (sle64_to_cpu(ib->index_block_vcn) != vcn) {
477 (long long)vcn,
485 "specified size (%u)\n", (long long)vcn,
572 * @vcn will contain the node index block.
577 VCN *vcn, INDEX_ENTRY **ie_out)
659 /* Get the starting vcn of the index_block holding the child node. */
660 *vcn = ntfs_ie_get_vcn(ie);
661 if (*vcn < 0) {
663 ntfs_log_perror("Negative vcn in inode %llu",
688 static int ntfs_ib_read(ntfs_index_context *icx, VCN vcn, INDEX_BLOCK *dst)
692 ntfs_log_trace("vcn: %lld\n", (long long)vcn);
694 pos = ntfs_ib_vcn_to_pos(icx, vcn);
707 icx->ia_na->ni->mft_no, vcn)) {
771 VCN old_vcn, vcn;
816 ret = ntfs_ie_lookup(key, key_len, icx, &ir->index, &vcn, &ie);
851 old_vcn = vcn;
853 ntfs_log_debug("Descend into node with VCN %lld\n", (long long)vcn);
855 if (ntfs_ib_read(icx, vcn, ib))
858 ret = ntfs_ie_lookup(key, key_len, icx, &ib->index, &vcn, &ie);
867 icx->parent_vcn[icx->pindex] = vcn;
966 static s64 ntfs_ibm_vcn_to_pos(ntfs_index_context *icx, VCN vcn)
968 return ntfs_ib_vcn_to_pos(icx, vcn) / icx->block_size;
997 static int ntfs_ibm_modify(ntfs_index_context *icx, VCN vcn, int set)
1000 s64 pos = ntfs_ibm_vcn_to_pos(icx, vcn);
1006 ntfs_log_trace("%s vcn: %lld\n", set ? "set" : "clear", (long long)vcn);
1045 static int ntfs_ibm_set(ntfs_index_context *icx, VCN vcn)
1047 return ntfs_ibm_modify(icx, vcn, 1);
1050 static int ntfs_ibm_clear(ntfs_index_context *icx, VCN vcn)
1052 return ntfs_ibm_modify(icx, vcn, 0);
1059 s64 vcn, byte, size;
1075 vcn = ntfs_ibm_pos_to_vcn(icx, byte * 8 + bit);
1081 vcn = ntfs_ibm_pos_to_vcn(icx, size * 8);
1083 ntfs_log_trace("allocated vcn: %lld\n", (long long)vcn);
1085 if (ntfs_ibm_set(icx, vcn))
1086 vcn = (VCN)-1;
1089 return vcn;
1801 VCN vcn;
1824 vcn = ntfs_ie_get_vcn(ie_succ);
1825 if (ntfs_ib_read(icx, vcn, ib))
1833 icx->parent_vcn[icx->pindex] = vcn;
2041 s64 vcn;
2045 vcn = ntfs_ie_get_vcn(entry);
2061 ictx->parent_vcn[ictx->pindex] = vcn;
2062 if (!ntfs_ib_read(ictx,vcn,ictx->ib)) {
2081 s64 vcn;
2108 vcn = ictx->parent_vcn[ictx->pindex];
2109 if (!ntfs_ib_read(ictx,vcn,ictx->ib)) {