LCN
if (rl->lcn < (LCN)0) {
if (rl->lcn != (LCN)LCN_HOLE) {
if ((rli->lcn == (LCN)LCN_HOLE)
LCN lcn_seek_from = -1;
if ((rl->lcn == (LCN)LCN_HOLE)
if (rl->lcn < (LCN)0) {
if (rl->lcn != (LCN)LCN_HOLE) {
if (rl->lcn == (LCN)LCN_HOLE) {
if (rl->lcn < (LCN)0) {
if (rl->lcn != (LCN)LCN_HOLE) {
LCN first_lcn;
LCN lcn;
LCN lcn_seek_from;
LCN ntfs_attr_vcn_to_lcn(ntfs_attr *na, const VCN vcn)
LCN lcn;
return (LCN)LCN_EINVAL;
if (!is_retry || lcn == (LCN)LCN_RL_NOT_MAPPED)
return (LCN)LCN_EIO;
if (rl->lcn >= (LCN)LCN_HOLE)
case (LCN)LCN_RL_NOT_MAPPED:
case (LCN)LCN_ENOENT:
case (LCN)LCN_EINVAL:
extern LCN ntfs_attr_vcn_to_lcn(ntfs_attr *na, const VCN vcn);
if (brl->lcn == (LCN)LCN_HOLE) {
if (brl->lcn == (LCN)LCN_HOLE) {
LCN lcn = (rl + i)->lcn;
if (lcn < (LCN)0) {
static inline LCN align_up(ntfs_volume *vol, LCN lcn, u64 granularity)
LCN start_buf;
LCN end_buf, start_lcn;
LCN end_lcn;
LCN aligned_lcn;
static int fstrim_clusters(ntfs_volume *vol, LCN lcn, s64 length)
LCN start_lcn, const NTFS_CLUSTER_ALLOCATION_ZONES zone)
LCN zone_start, zone_end; /* current search range */
LCN last_read_pos, lcn;
LCN bmp_pos; /* current bit position inside the bitmap */
LCN prev_lcn = 0, prev_run_len = 0;
LCN tc = rl[rlpos - 1].lcn +
static void ntfs_cluster_set_zone_pos(LCN start, LCN end, LCN *pos, LCN tc)
static void ntfs_cluster_update_zone_pos(ntfs_volume *vol, u8 zone, LCN tc)
static void update_full_status(ntfs_volume *vol, LCN lcn)
LCN start_lcn, const NTFS_CLUSTER_ALLOCATION_ZONES zone);
LCN lcn;
LCN lcn;
LCN ntfs_rl_vcn_to_lcn(const runlist_element *rl, const VCN vcn)
return (LCN)LCN_EINVAL;
return (LCN)LCN_RL_NOT_MAPPED;
return (LCN)LCN_ENOENT;
if (rl[i].lcn >= (LCN)0)
if (rl[i].lcn < (LCN)0)
return (LCN)LCN_ENOENT;
if (rl->lcn < (LCN)0) {
if (rl->lcn != (LCN)LCN_HOLE)
if (rl->lcn < (LCN)0) {
if (rl->lcn != (LCN)LCN_HOLE)
LCN prev_lcn;
LCN prev_lcn;
rl->lcn = (LCN)LCN_ENOENT;
LCN lcn = rl->lcn;
if (lcn < (LCN)0) {
while (srl[si].length && srl[si].lcn < (LCN)LCN_HOLE)
if (srl[send].lcn == (LCN)LCN_ENOENT)
drl[ds].lcn = (LCN)LCN_ENOENT;
if (drl[ds].lcn == (LCN)LCN_ENOENT) {
if (drl[ds].lcn != (LCN)LCN_RL_NOT_MAPPED) {
drl[ds].lcn = (LCN)LCN_RL_NOT_MAPPED;
drl[ds].lcn = (LCN)LCN_ENOENT;
LCN lcn; /* Current lcn. */
rl->lcn = (LCN)LCN_RL_NOT_MAPPED;
rl[rlpos].lcn = (LCN)LCN_HOLE;
if (deltaxcn == (LCN)-1)
if (lcn == (LCN)-1)
if (lcn < (LCN)-1) {
if ((lcn != (LCN)-1) && !rl[rlpos].length) {
rl[rlpos].lcn = (LCN)LCN_RL_NOT_MAPPED;
rl[rlpos].lcn = (LCN)LCN_ENOENT;
rl[rlpos].lcn = (LCN)LCN_RL_NOT_MAPPED;
LCN lcn; /* lcn = Starting logical cluster number. */
extern LCN ntfs_rl_vcn_to_lcn(const runlist_element *rl, const VCN vcn);
LCN mft_zone_size, mft_lcn;
LCN mft_zone_start; /* First cluster of the mft zone. */
LCN mft_zone_end; /* First cluster beyond the mft zone. */
LCN mft_zone_pos; /* Current position in the mft zone. */
LCN data1_zone_pos; /* Current position in the first data zone. */
LCN data2_zone_pos; /* Current position in the second data zone. */
LCN mft_lcn; /* Logical cluster number of the data attribute
LCN mftmirr_lcn; /* Logical cluster number of the data attribute
LCN lcn; /* first allocated cluster */
static BOOL bitmap_allocate(LCN lcn, s64 length)
static BOOL bitmap_deallocate(LCN lcn, s64 length)
LCN first, last;
static int bitmap_get_and_set(LCN lcn, unsigned long length)
static void bitmap_build(u8 *buf, LCN lcn, s64 length)
LCN first, last;
LCN lcn, end, prev_lcn = 0LL;