Lines Matching refs:lcn

250 			 * FIXME: If compressed file: Only read if lcn != -1.
261 rl[i].lcn << vol->cluster_size_bits,
288 * FIXME: If compressed file: Only read if lcn != -1.
297 r = ntfs_pread(vol->dev, rl[i].lcn << vol->cluster_size_bits,
613 LCN lcn;
619 lcn = ntfs_rl_vcn_to_lcn(na->rl, vcn);
620 if (lcn >= 0 || lcn == LCN_HOLE || lcn == LCN_ENOENT)
858 * ntfs_attr_vcn_to_lcn - convert a vcn into a lcn given an ntfs attribute
863 * cluster number (lcn) of a device using the runlist @na->rl to map vcns to
867 * containing the @vcn and retry the vcn to lcn conversion.
880 LCN lcn;
889 /* Convert vcn to lcn. If that fails map the runlist and retry once. */
890 lcn = ntfs_rl_vcn_to_lcn(na->rl, vcn);
891 if (lcn >= 0)
892 return lcn;
902 if (!is_retry || lcn == (LCN)LCN_RL_NOT_MAPPED)
904 /* lcn contains the appropriate error code. */
905 return lcn;
916 * Note you need to distinguish between the lcn of the returned runlist
949 if (rl->lcn >= (LCN)LCN_HOLE)
955 switch (rl->lcn) {
1128 if (rl->lcn == LCN_RL_NOT_MAPPED) {
1146 if (rl->lcn < (LCN)0) {
1147 if (rl->lcn != (LCN)LCN_HOLE) {
1150 (long long)rl->lcn);
1163 /* It is a real lcn, read it into @dst. */
1167 ntfs_log_trace("Reading %lld bytes from vcn %lld, lcn %lld, ofs"
1169 (long long )rl->lcn, (long long)ofs);
1170 br = ntfs_pread(vol->dev, (rl->lcn << vol->cluster_size_bits) +
1276 if ((rli->lcn == (LCN)LCN_HOLE)
1339 if ((*rl)->lcn == LCN_HOLE) {
1359 /* Search backwards to find the best lcn to start seek from. */
1363 if (rlc->lcn >= 0) {
1371 lcn_seek_from = rlc->lcn + rlc->length;
1373 lcn_seek_from = rlc->lcn + (from_vcn - rlc->vcn);
1382 if (rlc->lcn >= 0) {
1383 lcn_seek_from = rlc->lcn - (rlc->vcn - from_vcn);
1466 if ((*rl)->lcn < 0)
1469 if ((*rl)->lcn < 0) {
1582 rl[1].lcn = LCN_HOLE;
1583 rl[2].lcn = LCN_HOLE;
1612 rl[1].lcn = LCN_HOLE;
1619 rl[1].lcn = LCN_HOLE;
1647 rl[2].lcn = rl[1].lcn;
1652 rl[1].lcn = LCN_HOLE;
1697 while (zrl->length && (zrl->lcn >= 0) && (allocated < endblock)) {
1703 undecided = (allocated < endblock) && (zrl->lcn == LCN_RL_NOT_MAPPED);
1704 nothole = (allocated >= endblock) || (zrl->lcn != LCN_HOLE);
1708 s64 olcn = (*prl)->lcn;
1739 if ((na->rl != orl) || ((*prl)->lcn != olcn)) {
1741 while (zrl->length && (zrl->lcn != olcn))
1747 " inode %lld lcn 0x%llx\n",
1761 while (zrl->length && (zrl->lcn >= 0)
1773 if (rl && (allocated < endblock) && (zrl->lcn == LCN_HOLE)) {
2135 if ((rl->lcn == (LCN)LCN_HOLE)
2156 if (rl->lcn >= 0) {
2183 if (rl->lcn == LCN_RL_NOT_MAPPED) {
2201 if (rl->lcn < (LCN)0) {
2204 if (rl->lcn != (LCN)LCN_HOLE) {
2208 (long long)rl->lcn);
2223 /* It is a real lcn, write it to the volume. */
2226 ntfs_log_trace("Writing %lld bytes to vcn %lld, lcn %lld, ofs "
2228 (long long)rl->lcn, (long long)ofs);
2231 s64 wpos = (rl->lcn << vol->cluster_size_bits) + ofs;
2504 if (rl->lcn >= 0) {
2510 } while (xrl->lcn >= 0);
2514 if (rl->lcn == (LCN)LCN_HOLE) {
2529 if (rl->lcn == LCN_RL_NOT_MAPPED) {
2547 if (rl->lcn < (LCN)0) {
2548 if (rl->lcn != (LCN)LCN_HOLE) {
2552 (long long)rl->lcn);
5952 if (xrl->lcn < 0) {
5953 if (xrl->lcn == LCN_HOLE) {
5957 if (xrl->lcn != LCN_RL_NOT_MAPPED) {
6572 rl[0].lcn = LCN_HOLE;
6576 rl[1].lcn = LCN_ENOENT;
6595 while (rl->lcn < 0 && rl != na->rl)
6600 if (rl->lcn >= 0)
6601 lcn_seek_from = rl->lcn + rl->length;