Home
last modified time | relevance | path

Searched refs:lcn (Results 1 - 25 of 33) sorted by relevance

12

/third_party/ntfs-3g/libntfs-3g/
H A Dlcnalloc.c95 static void update_full_status(ntfs_volume *vol, LCN lcn) in update_full_status() argument
97 if (lcn >= vol->mft_zone_end) { in update_full_status()
99 ntfs_cluster_update_zone_pos(vol, ZONE_DATA1, lcn); in update_full_status()
103 if (lcn < vol->mft_zone_start) { in update_full_status()
105 ntfs_cluster_update_zone_pos(vol, ZONE_DATA2, lcn); in update_full_status()
110 ntfs_cluster_update_zone_pos(vol, ZONE_MFT, lcn); in update_full_status()
200 * @start_lcn: starting lcn at which to allocate the clusters (or -1 if none)
224 * approach and from the fact that we have access to the lcn bitmap via up to
239 LCN last_read_pos, lcn; in ntfs_cluster_alloc() local
258 ntfs_log_perror("%s: vcn: %lld, count: %lld, lcn in ntfs_cluster_alloc()
620 ntfs_cluster_free_basic(ntfs_volume *vol, s64 lcn, s64 count) ntfs_cluster_free_basic() argument
[all...]
H A Drunlist.c171 if ((dst->lcn == LCN_RL_NOT_MAPPED) && (src->lcn == LCN_RL_NOT_MAPPED)) in ntfs_rl_are_mergeable()
177 if ((dst->lcn >= 0) && (src->lcn >= 0) && in ntfs_rl_are_mergeable()
178 ((dst->lcn + dst->length) == src->lcn)) in ntfs_rl_are_mergeable()
181 if ((dst->lcn == LCN_HOLE) && (src->lcn == LCN_HOLE)) in ntfs_rl_are_mergeable()
262 if (dst[marker].lcn == LCN_ENOENT) in ntfs_rl_append()
348 if (dst[marker].lcn in ntfs_rl_insert()
787 LCN lcn; /* Current lcn. */ ntfs_mapping_pairs_decompress_i() local
1807 LCN lcn = rl->lcn; test_rl_dump_runlist() local
[all...]
H A Ddebug.c59 LCN lcn = (rl + i)->lcn; in ntfs_debug_runlist_dump() local
61 if (lcn < (LCN)0) { in ntfs_debug_runlist_dump()
62 int idx = -lcn - 1; in ntfs_debug_runlist_dump()
72 (long long)rl[i].vcn, (long long)rl[i].lcn, in ntfs_debug_runlist_dump()
H A Dcompress.c664 if (rl->lcn < LCN_HOLE || !rl->length) { in ntfs_is_cb_compressed()
667 if (!rl || rl->lcn < LCN_HOLE || !rl->length) in ntfs_is_cb_compressed()
677 if (rl->lcn == LCN_HOLE) in ntfs_is_cb_compressed()
813 if (!rl || rl->lcn < LCN_HOLE) { in ntfs_compressed_attr_pread()
822 if (rl->lcn == LCN_HOLE) { in ntfs_compressed_attr_pread()
998 xpos = xrl->lcn << vol->cluster_size_bits; in read_clusters()
1039 xpos = xrl->lcn << vol->cluster_size_bits; in write_clusters()
1182 if (xrl->lcn == LCN_HOLE) { in valid_compressed_run()
1187 if (fullcheck && (xrl[1].lcn == LCN_HOLE)) { in valid_compressed_run()
1248 freelcn = rl->lcn in ntfs_compress_overwr_free()
[all...]
H A Ddevice.c425 * @lcn: starting logical cluster number
429 * Read @count ntfs clusters starting at logical cluster number @lcn from
433 s64 ntfs_cluster_read(const ntfs_volume *vol, const s64 lcn, const s64 count, in ntfs_cluster_read() argument
438 if (!vol || lcn < 0 || count < 0) { in ntfs_cluster_read()
442 if (vol->nr_clusters < lcn + count) { in ntfs_cluster_read()
446 (long long)lcn + count); in ntfs_cluster_read()
449 br = ntfs_pread(vol->dev, lcn << vol->cluster_size_bits, in ntfs_cluster_read()
461 * @lcn: starting logical cluster number
465 * Write @count ntfs clusters starting at logical cluster number @lcn from
469 s64 ntfs_cluster_write(const ntfs_volume *vol, const s64 lcn, in ntfs_cluster_write() argument
[all...]
H A Dattrib.c250 * FIXME: If compressed file: Only read if lcn != -1. in ntfs_get_attribute_value()
261 rl[i].lcn << vol->cluster_size_bits, in ntfs_get_attribute_value()
288 * FIXME: If compressed file: Only read if lcn != -1. in ntfs_get_attribute_value()
297 r = ntfs_pread(vol->dev, rl[i].lcn << vol->cluster_size_bits, in ntfs_get_attribute_value()
613 LCN lcn; in ntfs_attr_map_runlist() local
619 lcn = ntfs_rl_vcn_to_lcn(na->rl, vcn); in ntfs_attr_map_runlist()
620 if (lcn >= 0 || lcn == LCN_HOLE || lcn == LCN_ENOENT) in ntfs_attr_map_runlist()
858 * ntfs_attr_vcn_to_lcn - convert a vcn into a lcn give
880 LCN lcn; ntfs_attr_vcn_to_lcn() local
[all...]
H A Dioctl.c89 static int fstrim_clusters(ntfs_volume *vol, LCN lcn, s64 length) in fstrim_clusters() argument
95 (long long) lcn, (long long) length); in fstrim_clusters()
97 range[0] = lcn << vol->cluster_size_bits; in fstrim_clusters()
229 static inline LCN align_up(ntfs_volume *vol, LCN lcn, u64 granularity) in align_up() argument
233 aligned = (lcn << vol->cluster_size_bits) + granularity - 1; in align_up()
H A Dmft.c717 LCN lcn; in ntfs_mft_bitmap_extend_allocation_i() local
732 * Determine the last lcn of the mft bitmap. The allocated size of the in ntfs_mft_bitmap_extend_allocation_i()
737 if (!rl || !rl->length || rl->lcn < 0) { in ntfs_mft_bitmap_extend_allocation_i()
744 lcn = rl->lcn + rl->length; in ntfs_mft_bitmap_extend_allocation_i()
746 rl2 = ntfs_cluster_alloc(vol, rl[1].vcn, 1, lcn, DATA_ZONE); in ntfs_mft_bitmap_extend_allocation_i()
878 lcn = rl->lcn; in ntfs_mft_bitmap_extend_allocation_i()
879 rl->lcn = rl[1].lcn; in ntfs_mft_bitmap_extend_allocation_i()
1038 LCN lcn; ntfs_mft_data_extend_allocation() local
[all...]
/third_party/ntfs-3g/ntfsprogs/
H A Dntfsresize.c176 s64 lcn; /* last used LCN for a "special" file/attr type */ member
663 static void rl_set(runlist *rl, VCN vcn, LCN lcn, s64 len) in rl_set() argument
666 rl->lcn = lcn; in rl_set()
683 (long long)r->lcn, (long long)r->lcn, in dump_run()
717 last_lcn = rl->lcn + (rl->length - 1); in collect_resize_constraints()
763 if (llcn->lcn < last_lcn) { in collect_resize_constraints()
764 llcn->lcn = last_lcn; in collect_resize_constraints()
778 s64 lcn, lcn_lengt in collect_relocation_info() local
851 s64 lcn = rl[i].lcn; build_lcn_usage_bitmap() local
1882 lseek_to_cluster(ntfs_volume *vol, s64 lcn) lseek_to_cluster() argument
2010 s64 lcn, lcn_length; relocate_run() local
2080 s64 lcn = rl[i].lcn; relocate_attribute() local
3584 s64 lcn; set_bitmap() local
4085 s64 lcn; rebase_runlists_meta() local
[all...]
H A Dntfsmove.c278 LCN lcn = rl->lcn;
292 if (lcn < (LCN)0) {
293 int j = -lcn - 1;
303 rl->vcn, rl->lcn, rl->length);
430 res[0].lcn = start; in find_unused()
432 res[1].lcn = LCN_ENOENT; in find_unused()
451 if (utils_cluster_in_use(vol, res->lcn + i)) { in find_unused()
453 (long long)res->lcn + i); in find_unused()
519 res = ntfs_bitmap_set_run(vol->lcnbmp_na, rl->lcn, r in bitmap_alloc()
[all...]
H A Dplaylog.c77 LCN lcn; member
138 static struct STORE *getclusterentry(LCN lcn, BOOL create) in getclusterentry() argument
145 while (*current && (lcn != (*current)->lcn)) { in getclusterentry()
146 if (lcn > (*current)->lcn) in getclusterentry()
157 newone->lcn = lcn; in getclusterentry()
173 (long long)entry->lcn, in freeclusterentry()
429 LCN lcn; in read_raw() local
497 LCN lcn; write_raw() local
551 LCN lcn; write_mirr() local
587 LCN lcn; read_protected() local
865 LCN lcn; change_resident() local
920 LCN lcn; change_resident_expect() local
972 LCN lcn; change_index_value() local
1018 LCN lcn; add_resident() local
1098 LCN lcn; expand_resident() local
1180 LCN lcn; insert_resident() local
1263 LCN lcn; remove_resident() local
1349 LCN lcn; delete_resident() local
1407 LCN lcn; shrink_resident() local
1487 LCN lcn; update_index() local
1863 LCN lcn; redo_add_index() local
1926 LCN lcn; redo_add_root_index() local
2006 LCN lcn; redo_create_file() local
2104 LCN lcn; redo_delete_file() local
2157 LCN lcn; redo_delete_index() local
2217 LCN lcn; redo_delete_root_index() local
2284 LCN lcn; redo_force_bits() local
2472 LCN lcn; redo_update_mapping() local
2560 LCN lcn; redo_update_resident() local
2689 LCN lcn; redo_update_value() local
2779 LCN lcn; redo_write_end() local
2846 LCN lcn; redo_write_index() local
2935 LCN lcn; undo_add_index() local
2997 LCN lcn; undo_add_root_index() local
3104 LCN lcn; undo_delete_index() local
3171 LCN lcn; undo_delete_root_index() local
3244 LCN lcn; undo_create_file() local
3296 LCN lcn; undo_delete_file() local
3365 LCN lcn; undo_force_bits() local
3540 LCN lcn; undo_update_index_value() local
3611 LCN lcn; undo_update_mapping() local
3700 LCN lcn; undo_update_resident() local
3821 LCN lcn; undo_update_value() local
3881 LCN lcn; undo_write_end() local
3948 LCN lcn; undo_write_index() local
[all...]
H A Dntfscp.c87 s64 lcn; member
430 static int merge_run(struct ALLOC_CONTEXT *alctx, s64 lcn, s32 count) in merge_run() argument
470 alctx->rl[k].lcn = lcn; in merge_run()
490 alctx->rl[k+1].lcn = lcn; in merge_run()
524 alctx->lcn = offbuf + index; in examine_buf()
534 count = offbuf + index - alctx->lcn; in examine_buf()
537 if (merge_run(alctx, alctx->lcn, count)) { in examine_buf()
550 * Sort the final runlist by lcn'
558 LCN lcn; sort_runlist() local
[all...]
H A Dntfsclone.c758 static void copy_cluster(int rescue, u64 rescue_lcn, u64 lcn) argument
782 backup_bootsector = (lcn + 1)*csize >= full_device_size;
784 csize = full_device_size - lcn*csize;
813 && (!lcn || backup_bootsector)) {
820 if (!lcn) {
838 if (!lcn)
879 static void lseek_to_cluster(s64 lcn) argument
883 pos = (off_t)(lcn * vol->cluster_size);
1356 s64 offset = 0, lcn, vcn; local
1361 lcn
1723 s64 lcn = rl[i].lcn; global() local
2532 s64 lcn = rl->lcn; global() local
[all...]
H A Dmkntfs.c164 LCN lcn; /* first allocated cluster */ member
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) in bitmap_allocate() argument
359 /* locate the first run which starts beyond the requested lcn */ in bitmap_allocate()
360 while (p && (p->lcn <= lcn)) { in bitmap_allocate()
365 if ((q && ((q->lcn + q->length) > lcn)) in bitmap_allocate()
398 bitmap_deallocate(LCN lcn, s64 length) bitmap_deallocate() argument
452 bitmap_get_and_set(LCN lcn, unsigned long length) bitmap_get_and_set() argument
483 bitmap_build(u8 *buf, LCN lcn, s64 length) bitmap_build() argument
1074 LCN lcn, end, prev_lcn = 0LL; allocate_scattered_clusters() local
[all...]
H A Dcluster.c92 LCN a_begin = runs[j].lcn; in cluster_find()
100 (long long)runs[j].lcn, in cluster_find()
101 (long long)(runs[j].lcn + in cluster_find()
H A Dntfscluster.c312 if (rl[z].lcn >= 0) { in info()
411 (long long)runs[i].lcn, in dump_file()
466 if ((run->lcn + run->length) > m->lcn) { in find_last()
468 m->lcn = run->lcn + run->length; in find_last()
553 m.lcn = -1; in main()
555 if (m.lcn >= 0) { in main()
H A Dntfsfallocate.c436 brl->lcn + begin_common - brl->vcn, in free_common()
441 (long long)(brl->lcn + begin_common in free_common()
461 if (brl->lcn != LCN_HOLE) { in ntfs_restore_rl()
466 if (grl->lcn == LCN_HOLE) { in ntfs_restore_rl()
512 (rl->lcn + cofs) in ntfs_inner_zero()
614 && ((rl->lcn >= 0) in ntfs_inner_allocation()
628 if ((--prl)->lcn >= 0) { in ntfs_inner_allocation()
629 lcn_seek_from = prl->lcn in ntfs_inner_allocation()
H A Dutils.c710 * @lcn: The Logical Cluster Number to test
717 * If the lcn, being tested, lies outside the range, the buffer will be
727 int utils_cluster_in_use(ntfs_volume *vol, long long lcn) in utils_cluster_in_use() argument
739 /* Does lcn lie in the section of $Bitmap we already have cached? */ in utils_cluster_in_use()
740 if ((lcn < bmplcn) in utils_cluster_in_use()
741 || (lcn >= (long long)(bmplcn + (sizeof(buffer) << 3)))) { in utils_cluster_in_use()
751 bmplcn = lcn & (~((sizeof(buffer) << 3) - 1)); in utils_cluster_in_use()
764 bit = 1 << (lcn & 7); in utils_cluster_in_use()
765 byte = (lcn >> 3) & (sizeof(buffer) - 1); in utils_cluster_in_use()
767 "in use %d\n", lcn, bmplc in utils_cluster_in_use()
[all...]
H A Dntfscluster.h55 LCN lcn; /* Last cluster in use */ member
H A Dntfsfix.c845 if ((rl[0].lcn >= 0) in short_mft_selfloc_condition()
849 && (rl[1].lcn == LCN_RL_NOT_MAPPED)) { in short_mft_selfloc_condition()
895 && (rl->lcn >= 0) in attrlist_selfloc_condition()
898 rl->lcn << vol->cluster_size_bits, in attrlist_selfloc_condition()
900 selfloc->attrlist_lcn = rl->lcn; in attrlist_selfloc_condition()
984 if ((rl[0].lcn == LCN_RL_NOT_MAPPED) in self_mapped_selfloc_condition()
988 && ((u64)(rl[1].lcn << vol->cluster_size_bits) in self_mapped_selfloc_condition()
990 && ((u64)((rl[1].lcn + rl[1].length) in self_mapped_selfloc_condition()
H A Dntfsundelete.c1499 if (rl[0].lcn == LCN_RL_NOT_MAPPED) { /* extended mft record */ in calc_percentage()
1507 if (rl[i].lcn == LCN_RL_NOT_MAPPED) { in calc_percentage()
1515 if (rl[i].lcn == LCN_HOLE) { in calc_percentage()
1520 start = rl[i].lcn; in calc_percentage()
1521 end = rl[i].lcn + rl[i].length; in calc_percentage()
1653 (long long)d->runlist[i].lcn); in dump_record()
2085 if (rl[0].lcn == LCN_RL_NOT_MAPPED) { /* extended mft record */ in undelete_file()
2102 if (rl[i].lcn == LCN_RL_NOT_MAPPED) { in undelete_file()
2118 if (rl[i].lcn == LCN_HOLE) { in undelete_file()
2131 start = rl[i].lcn; in undelete_file()
[all...]
H A Dntfsrecover.c51 #define SHOWLISTS 10 /* max lcn or lsn shown in a list */
189 LCN lcn; in loclogblk() local
192 lcn = ntfs_attr_vcn_to_lcn(log_na, in loclogblk()
194 loc = lcn << clusterbits; in loclogblk()
1862 u64 lcn; in detaillogr() local
1919 lcn = sle64_to_cpu(logr->lcn_list[i]); in detaillogr()
1920 printf(" (%d offs 0x%x) lcn %016llx",i, in detaillogr()
1922 (long long)lcn); in detaillogr()
1923 lcn &= 0xffffffffffffULL; in detaillogr()
1928 (long long)((lcn in detaillogr()
2138 u64 lcn; within_lcn_range() local
[all...]
/third_party/ntfs-3g/include/ntfs-3g/
H A Ddevice.h133 extern s64 ntfs_cluster_read(const ntfs_volume *vol, const s64 lcn,
135 extern s64 ntfs_cluster_write(const ntfs_volume *vol, const s64 lcn,
H A Dlcnalloc.h45 extern int ntfs_cluster_free_basic(ntfs_volume *vol, s64 lcn, s64 count);
H A Drunlist.h36 * struct _runlist_element - in memory vcn to lcn mapping array element.
38 * @lcn: starting lcn of the current array element
43 * When lcn == -1 this means that the count vcns starting at vcn are not
46 struct _runlist_element {/* In memory vcn to lcn mapping structure element. */
48 LCN lcn; /* lcn = Starting logical cluster number. */ member

Completed in 48 milliseconds

12