Lines Matching refs:zlen
359 size_t alcn, zlen, zeroes, zlcn, zlen2, ztrim, new_zlen; in ntfs_look_for_free_space() local
364 zlen = wnd_zone_len(wnd); in ntfs_look_for_free_space()
366 if (!zlen) { in ntfs_look_for_free_space()
371 zlen = wnd_zone_len(wnd); in ntfs_look_for_free_space()
374 if (!zlen) { in ntfs_look_for_free_space()
381 alen = min_t(CLST, len, zlen); in ntfs_look_for_free_space()
383 wnd_zone_set(wnd, lcn + alen, zlen - alen); in ntfs_look_for_free_space()
407 zlen = wnd_zone_len(wnd); in ntfs_look_for_free_space()
411 if (len > zeroes + zlen || zlen <= NTFS_MIN_MFT_ZONE) { in ntfs_look_for_free_space()
418 zlen2 = zlen >> 1; in ntfs_look_for_free_space()
419 ztrim = clamp_val(len, zlen2, zlen); in ntfs_look_for_free_space()
420 new_zlen = max_t(size_t, zlen - ztrim, NTFS_MIN_MFT_ZONE); in ntfs_look_for_free_space()
454 size_t free, zlen, avail; in ntfs_check_for_free_space() local
460 zlen = min_t(size_t, NTFS_MIN_MFT_ZONE, wnd_zone_len(wnd)); in ntfs_check_for_free_space()
463 if (free < zlen + clen) in ntfs_check_for_free_space()
466 avail = free - (zlen + clen); in ntfs_check_for_free_space()
471 zlen = wnd_zone_len(wnd); in ntfs_check_for_free_space()
474 if (free >= zlen + mlen) in ntfs_check_for_free_space()
560 size_t zbit, zlen, from, to, fr; in ntfs_look_free_mft() local
573 zlen = wnd_zone_len(wnd); in ntfs_look_free_mft()
576 if (zlen) { in ntfs_look_free_mft()
580 wnd_zone_set(wnd, zbit + 1, zlen - 1); in ntfs_look_free_mft()
663 zlen = 1; in ntfs_look_free_mft()
667 zlen = zbit == MFT_REC_FREE ? (MFT_REC_USER - MFT_REC_FREE) : 4; in ntfs_look_free_mft()
668 if (zbit + zlen > wnd->nbits) in ntfs_look_free_mft()
669 zlen = wnd->nbits - zbit; in ntfs_look_free_mft()
671 while (zlen > 1 && !wnd_is_free(wnd, zbit, zlen)) in ntfs_look_free_mft()
672 zlen -= 1; in ntfs_look_free_mft()
678 to = zbit + zlen; in ntfs_look_free_mft()
688 zlen -= 1; in ntfs_look_free_mft()
691 wnd_zone_set(wnd, zbit, zlen); in ntfs_look_free_mft()
816 size_t lcn_s, zlen; in ntfs_refresh_zone() local
837 zlen = wnd_find(wnd, sbi->zone_max, lcn_s, 0, &lcn_s); in ntfs_refresh_zone()
838 wnd_zone_set(wnd, lcn_s, zlen); in ntfs_refresh_zone()
2480 CLST end, i, zone_len, zlen; in mark_as_free_ex() local
2519 zlen = min(zone_len + len, sbi->zone_max); in mark_as_free_ex()
2521 if (zlen == zone_len) { in mark_as_free_ex()
2525 if (zlen == sbi->zone_max) in mark_as_free_ex()
2526 wnd_zone_set(wnd, lcn, zlen); in mark_as_free_ex()
2532 wnd_zone_set(wnd, lcn, zlen); in mark_as_free_ex()
2535 wnd_zone_set(wnd, zone_lcn, zlen); in mark_as_free_ex()