Lines Matching refs:lcn
164 LCN lcn; /* first allocated cluster */
199 static long long g_mft_lcn = 0; /* lcn of $MFT, $DATA attribute */
200 static long long g_mftmirr_lcn = 0; /* lcn of $MFTMirr, $DATA */
201 static long long g_logfile_lcn = 0; /* lcn of $LogFile, $DATA */
348 static BOOL bitmap_allocate(LCN lcn, s64 length)
359 /* locate the first run which starts beyond the requested lcn */
360 while (p && (p->lcn <= lcn)) {
365 if ((q && ((q->lcn + q->length) > lcn))
366 || (p && ((lcn + length) > p->lcn))) {
370 if (q && ((q->lcn + q->length) == lcn)) {
377 newall->lcn = lcn;
398 static BOOL bitmap_deallocate(LCN lcn, s64 length)
412 first = (p->lcn > lcn ? p->lcn : lcn);
413 last = ((p->lcn + p->length) < (lcn + length)
414 ? p->lcn + p->length : lcn + length);
417 begin_length = first - p->lcn;
418 end_length = p->lcn + p->length - last;
452 static int bitmap_get_and_set(LCN lcn, unsigned long length)
461 /* locate the first run which starts beyond the requested lcn */
462 while (p && (p->lcn <= lcn)) {
466 if (q && (q->lcn <= lcn) && ((q->lcn + q->length) > lcn))
469 bitmap_allocate(lcn, length);
483 static void bitmap_build(u8 *buf, LCN lcn, s64 length)
493 first = (p->lcn > lcn ? p->lcn : lcn);
494 last = ((p->lcn + p->length) < (lcn + length)
495 ? p->lcn + p->length : lcn + length);
497 bn = first - lcn;
499 while ((bn < (last - lcn)) && (bn & 7)) {
504 while (bn < (last - lcn - 7)) {
509 while (bn < (last - lcn)) {
910 if (rl[i].lcn == -1) {
927 if (dev->d_ops->seek(dev, rl[i].lcn * g_vol->cluster_size,
1049 if (rl[i].lcn == -1LL)
1052 bitmap_deallocate(rl[i].lcn, rl[i].length);
1074 LCN lcn, end, prev_lcn = 0LL;
1084 for (lcn = g_mft_zone_end; lcn < end; lcn++) {
1085 bit = bitmap_get_and_set(lcn,1);
1100 if (prev_lcn == lcn - prev_run_len) {
1105 rl[rlpos].lcn = lcn;
1106 prev_lcn = lcn;
1115 rl[rlpos].lcn = 0LL;
1133 rl[rlpos].lcn = -1LL;
3870 /* Determine lcn bitmap byte size and allocate it. */
3917 g_rl_mft_bmp[0].lcn = i;
3924 g_rl_mft_bmp[1].lcn = -1LL;
3938 /* If user didn't specify the mft lcn, determine it now. */
3944 g_mft_lcn = g_rl_mft_bmp[0].lcn + g_rl_mft_bmp[0].length;
3980 g_rl_mft[0].lcn = g_mft_lcn;
3985 g_rl_mft[1].lcn = -1LL;
4000 g_rl_mftmirr[0].lcn = g_mftmirr_lcn;
4011 g_rl_mftmirr[1].lcn = -1LL;
4038 g_rl_logfile[0].lcn = g_logfile_lcn;
4068 while (g_rl_logfile[0].lcn + j >= g_vol->nr_clusters) {
4093 g_rl_logfile[1].lcn = -1LL;
4111 g_rl_boot[0].lcn = 0LL;
4119 g_rl_boot[1].lcn = -1LL;
4136 g_rl_bad[0].lcn = -1LL;
4143 g_rl_bad[1].lcn = -1LL;