Lines Matching refs:lcn
23 CLST lcn; /* Logical cluster number. */ member
124 if (n->lcn != SPARSE_LCN) in run_consolidate()
125 n->lcn += dl; in run_consolidate()
133 if ((n->lcn == SPARSE_LCN) != (r->lcn == SPARSE_LCN)) { in run_consolidate()
144 if (n->lcn != SPARSE_LCN && n->lcn != r->lcn + r->len) in run_consolidate()
192 bool run_lookup_entry(const struct runs_tree *run, CLST vcn, CLST *lcn, in run_lookup_entry() argument
215 *lcn = r->lcn == SPARSE_LCN ? SPARSE_LCN : (r->lcn + gap); in run_lookup_entry()
241 if (r->lcn != SPARSE_LCN) in run_truncate_head()
242 r->lcn += dlen; in run_truncate_head()
316 bool run_add_entry(struct runs_tree *run, CLST vcn, CLST lcn, CLST len, in run_add_entry() argument
344 (t->lcn == SPARSE_LCN) == (lcn == SPARSE_LCN) && in run_add_entry()
345 (lcn == SPARSE_LCN || lcn == t->lcn + t->len)) { in run_add_entry()
415 r->lcn = lcn; in run_add_entry()
428 if (((lcn == SPARSE_LCN) != (r->lcn == SPARSE_LCN)) || in run_add_entry()
429 (lcn != SPARSE_LCN && lcn != r->lcn + (vcn - r->vcn))) { in run_add_entry()
436 tail_lcn = r->lcn == SPARSE_LCN in run_add_entry()
438 : (r->lcn + Tovcn); in run_add_entry()
451 r->lcn = lcn; in run_add_entry()
506 } else if (r->lcn == SPARSE_LCN) { in run_collapse_range()
537 if (r->lcn != SPARSE_LCN) in run_collapse_range()
538 r->lcn += d; in run_collapse_range()
554 CLST *lcn, CLST *len) in run_get_entry() argument
568 if (lcn) in run_get_entry()
569 *lcn = r->lcn; in run_get_entry()
778 CLST next_vcn, vcn, lcn; in run_pack() local
794 ok = run_lookup_entry(run, vcn, &lcn, &len, &i); in run_pack()
811 if (lcn == SPARSE_LCN) { in run_pack()
816 dlcn = (s64)lcn - prev_lcn; in run_pack()
818 prev_lcn = lcn; in run_pack()
849 ok = run_get_entry(run, ++i, &vcn, &lcn, &len); in run_pack()
877 u64 prev_lcn, vcn64, lcn, next_vcn; in run_unpack() local
923 lcn = SPARSE_LCN64; in run_unpack()
935 lcn = prev_lcn + dlcn; in run_unpack()
936 prev_lcn = lcn; in run_unpack()
946 if (next_vcn > 0x100000000ull || (lcn + len) > 0x100000000ull) { in run_unpack()
952 vcn64, lcn, len); in run_unpack()
956 if (lcn != SPARSE_LCN64 && lcn + len > sbi->used.bitmap.nbits) { in run_unpack()
968 if (lcn != SPARSE_LCN64) in run_unpack()
969 mark_as_free_ex(sbi, lcn, len, true); in run_unpack()
971 if (!run_add_entry(run, vcn64, lcn, len, is_mft)) in run_unpack()
976 if (!run_add_entry(run, vcn, lcn + dlen, len - dlen, in run_unpack()
1005 CLST next_vcn, lcn, len; in run_unpack_ex() local
1023 for (ok = run_lookup_entry(run, vcn, &lcn, &len, &index); in run_unpack_ex()
1025 ok = run_get_entry(run, ++index, &vcn, &lcn, &len)) { in run_unpack_ex()
1031 if (lcn == SPARSE_LCN) in run_unpack_ex()
1039 ok = wnd_is_used(wnd, lcn, len); in run_unpack_ex()
1053 if (wnd_is_free(wnd, lcn + i, 1)) { in run_unpack_ex()
1055 lcn_f = lcn + i; in run_unpack_ex()