Home
last modified time | relevance | path

Searched refs:lcn (Results 1 – 25 of 26) sorted by relevance

12

/linux/fs/ntfs/
H A Drunlist.c159 if ((dst->lcn == LCN_RL_NOT_MAPPED) && (src->lcn == LCN_RL_NOT_MAPPED)) in ntfs_are_rl_mergeable()
165 if ((dst->lcn >= 0) && (src->lcn >= 0) && in ntfs_are_rl_mergeable()
166 ((dst->lcn + dst->length) == src->lcn)) in ntfs_are_rl_mergeable()
169 if ((dst->lcn == LCN_HOLE) && (src->lcn == LCN_HOLE)) in ntfs_are_rl_mergeable()
172 if ((dst->lcn == LCN_DELALLOC) && (src->lcn == LCN_DELALLOC)) in ntfs_are_rl_mergeable()
253 if (dst[marker].lcn == LCN_ENOENT) in ntfs_rl_append()
337 if (dst[marker].lcn == LCN_HOLE || dst[marker].lcn == LCN_RL_NOT_MAPPED || in ntfs_rl_insert()
338 dst[marker].lcn == LCN_DELALLOC) in ntfs_rl_insert()
350 dst[loc].lcn = LCN_RL_NOT_MAPPED; in ntfs_rl_insert()
436 if (dsize - tail > 0 && dst[marker].lcn == LCN_ENOENT) in ntfs_rl_replace()
[all …]
H A Dlcnalloc.c53 if (rl->lcn < 0) in ntfs_cluster_free_from_rl_nolock()
55 err = ntfs_bitmap_clear_run(lcnbmp_vi, rl->lcn, rl->length); in ntfs_cluster_free_from_rl_nolock()
190 s64 zone_start, zone_end, bmp_pos, bmp_initial_pos, last_read_pos, lcn; in ntfs_cluster_alloc() local
337 lcn = bmp_pos & 7; in ntfs_cluster_alloc()
353 buf_size, lcn, bmp_pos, need_writeback); in ntfs_cluster_alloc()
354 while (lcn < buf_size && lcn + bmp_pos < zone_end) { in ntfs_cluster_alloc()
355 byte = buf + (lcn >> 3); in ntfs_cluster_alloc()
357 buf_size, lcn, bmp_pos, need_writeback, in ntfs_cluster_alloc()
358 (unsigned int)(lcn >> 3), in ntfs_cluster_alloc()
360 bit = 1 << (lcn & 7); in ntfs_cluster_alloc()
[all …]
H A Daops.c137 s64 lcn; in ntfs_bmap() local
171 lcn = ntfs_attr_vcn_to_lcn_nolock(ni, ntfs_bytes_to_cluster(vol, ofs), in ntfs_bmap()
174 if (unlikely(lcn < LCN_HOLE)) { in ntfs_bmap()
184 switch ((int)lcn) { in ntfs_bmap()
204 if (lcn < 0) { in ntfs_bmap()
215 if (unlikely(sizeof(block) < sizeof(lcn))) { in ntfs_bmap()
216 block = lcn = (ntfs_cluster_to_bytes(vol, lcn) + delta) >> in ntfs_bmap()
219 if (unlikely(block != lcn)) { in ntfs_bmap()
222 (long long)lcn); in ntfs_bmap()
226 block = (ntfs_cluster_to_bytes(vol, lcn) + delta) >> in ntfs_bmap()
[all …]
H A Dlogfile.c700 s64 lcn; in ntfs_empty_logfile() local
708 lcn = rl->lcn; in ntfs_empty_logfile()
709 if (unlikely(lcn == LCN_RL_NOT_MAPPED)) { in ntfs_empty_logfile()
718 if (unlikely(!rl->length || lcn < LCN_HOLE)) in ntfs_empty_logfile()
721 if (lcn == LCN_HOLE) in ntfs_empty_logfile()
723 start = NTFS_CLU_TO_B(vol, lcn); in ntfs_empty_logfile()
727 end = NTFS_CLU_TO_B(vol, lcn + len); in ntfs_empty_logfile()
H A Dmft.c1180 s64 lcn; in ntfs_mft_bitmap_extend_allocation_nolock() local
1213 if (IS_ERR(rl) || unlikely(!rl->length || rl->lcn < 0)) { in ntfs_mft_bitmap_extend_allocation_nolock()
1223 lcn = rl->lcn + rl->length; in ntfs_mft_bitmap_extend_allocation_nolock()
1225 (long long)lcn); in ntfs_mft_bitmap_extend_allocation_nolock()
1231 ll = lcn >> 3; in ntfs_mft_bitmap_extend_allocation_nolock()
1243 tb = 1 << (lcn & 7ull); in ntfs_mft_bitmap_extend_allocation_nolock()
1263 rl2 = ntfs_cluster_alloc(vol, rl[1].vcn, 1, lcn, DATA_ZONE, in ntfs_mft_bitmap_extend_allocation_nolock()
1424 lcn = rl->lcn; in ntfs_mft_bitmap_extend_allocation_nolock()
1426 rl->lcn = rl[1].lcn; in ntfs_mft_bitmap_extend_allocation_nolock()
1432 if (ntfs_bitmap_clear_bit(vol->lcnbmp_ino, lcn)) { in ntfs_mft_bitmap_extend_allocation_nolock()
[all …]
H A Dattrib.c317 struct runlist_element *ntfs_attr_vcn_to_rl(struct ntfs_inode *ni, s64 vcn, s64 *lcn) in ntfs_attr_vcn_to_rl() argument
334 *lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_attr_vcn_to_rl()
336 if (*lcn <= LCN_RL_NOT_MAPPED && is_retry == false) { in ntfs_attr_vcn_to_rl()
380 s64 lcn; in ntfs_attr_vcn_to_lcn_nolock() local
397 lcn = ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn); in ntfs_attr_vcn_to_lcn_nolock()
398 if (likely(lcn >= LCN_HOLE)) { in ntfs_attr_vcn_to_lcn_nolock()
399 ntfs_debug("Done, lcn 0x%llx.", (long long)lcn); in ntfs_attr_vcn_to_lcn_nolock()
400 return lcn; in ntfs_attr_vcn_to_lcn_nolock()
402 if (lcn != LCN_RL_NOT_MAPPED) { in ntfs_attr_vcn_to_lcn_nolock()
403 if (lcn != LCN_ENOENT) in ntfs_attr_vcn_to_lcn_nolock()
[all …]
H A Dcompress.c479 s64 lcn; in ntfs_read_compressed_block() local
613 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_read_compressed_block()
615 lcn = LCN_RL_NOT_MAPPED; in ntfs_read_compressed_block()
618 (unsigned long long)lcn); in ntfs_read_compressed_block()
619 if (lcn < 0) { in ntfs_read_compressed_block()
624 if (lcn == LCN_HOLE) in ntfs_read_compressed_block()
626 if (is_retry || lcn != LCN_RL_NOT_MAPPED) { in ntfs_read_compressed_block()
642 page_ofs = ntfs_cluster_to_poff(vol, lcn); in ntfs_read_compressed_block()
643 page_index = ntfs_cluster_to_pidx(vol, lcn); in ntfs_read_compressed_block()
1413 bio_lcn = rlc->lcn; in ntfs_write_cb()
H A Dwof.c182 s64 lcn; in ntfs_bdev_read_from_rl() local
191 lcn = ntfs_rl_vcn_to_lcn(rl, vcn); in ntfs_bdev_read_from_rl()
192 if (lcn < 0 && lcn != LCN_HOLE) { in ntfs_bdev_read_from_rl()
216 if (lcn == LCN_HOLE) { in ntfs_bdev_read_from_rl()
219 byte_off = ntfs_cluster_to_bytes(vol, lcn); in ntfs_bdev_read_from_rl()
H A Dattrib.h145 struct runlist_element *ntfs_attr_vcn_to_rl(struct ntfs_inode *ni, s64 vcn, s64 *lcn);
H A Dinode.c1763 s64 lcn; in load_attribute_list_mount() local
1782 lcn = ntfs_rl_vcn_to_lcn(rl, rl->vcn); in load_attribute_list_mount()
1785 (unsigned long long)lcn); in load_attribute_list_mount()
1787 if (lcn < 0) { in load_attribute_list_mount()
1792 rl_byte_off = ntfs_cluster_to_bytes(vol, lcn); in load_attribute_list_mount()
3753 s64 lcn, lcn_count; in __ntfs_inode_non_resident_attr_pwrite() local
3766 rl = ntfs_attr_vcn_to_rl(ni, vcn, &lcn); in __ntfs_inode_non_resident_attr_pwrite()
3790 ntfs_bytes_to_bio_sector(ntfs_cluster_to_bytes(vol, lcn) + in __ntfs_inode_non_resident_attr_pwrite()
H A Dsuper.c1055 rl2[0].lcn = vol->mftmirr_lcn; in check_mft_mirror()
1059 rl2[1].lcn = LCN_ENOENT; in check_mft_mirror()
1071 if (rl2[i].vcn != rl[i].vcn || rl2[i].lcn != rl[i].lcn || in check_mft_mirror()
/linux/fs/ntfs3/
H A Drun.c24 CLST lcn; /* Logical cluster number. */ member
125 if (n->lcn != SPARSE_LCN) in run_consolidate()
126 n->lcn += dl; in run_consolidate()
134 if ((n->lcn == SPARSE_LCN) != (r->lcn == SPARSE_LCN)) { in run_consolidate()
145 if (n->lcn != SPARSE_LCN && n->lcn != r->lcn + r->len) in run_consolidate()
193 bool run_lookup_entry(const struct runs_tree *run, CLST vcn, CLST *lcn, in run_lookup_entry() argument
216 *lcn = r->lcn == SPARSE_LCN ? SPARSE_LCN : (r->lcn + gap); in run_lookup_entry()
260 const struct runs_tree *run_da, CLST vcn, CLST *lcn, in run_lookup_entry_da() argument
265 if (run_da && run_lookup_entry(run_da, vcn, lcn, len, NULL)) { in run_lookup_entry_da()
266 *lcn = DELALLOC_LCN; in run_lookup_entry_da()
[all …]
H A Dfsntfs.c358 int ntfs_look_for_free_space(struct ntfs_sb_info *sbi, CLST lcn, CLST len, in ntfs_look_for_free_space() argument
386 lcn = wnd_zone_bit(wnd); in ntfs_look_for_free_space()
389 wnd_zone_set(wnd, lcn + alen, zlen - alen); in ntfs_look_for_free_space()
391 err = wnd_set_used(wnd, lcn, alen); in ntfs_look_for_free_space()
395 alcn = lcn; in ntfs_look_for_free_space()
402 if (!lcn) in ntfs_look_for_free_space()
403 lcn = sbi->used.next_free_lcn; in ntfs_look_for_free_space()
405 if (lcn >= wnd->nbits) in ntfs_look_for_free_space()
406 lcn = 0; in ntfs_look_for_free_space()
408 alen = wnd_find(wnd, len, lcn, BITMAP_FIND_MARK_AS_USED, &alcn); in ntfs_look_for_free_space()
[all …]
H A Dattrib.c98 CLST vcn_next, vcn0 = vcn, lcn, clen, dn = 0; in run_deallocate_ex() local
104 if (!run_lookup_entry(run, vcn, &lcn, &clen, &idx)) { in run_deallocate_ex()
120 if (lcn != SPARSE_LCN) { in run_deallocate_ex()
123 mark_as_free_ex(sbi, lcn, clen, trim); in run_deallocate_ex()
143 if (!run_get_entry(run, ++idx, &vcn, &lcn, &clen) || in run_deallocate_ex()
161 struct runs_tree *run_da, CLST vcn, CLST lcn, in attr_allocate_clusters() argument
171 err = ntfs_look_for_free_space(sbi, lcn, len + pre, &lcn, &flen, in attr_allocate_clusters()
193 *new_lcn = lcn; in attr_allocate_clusters()
199 if (!run_add_entry(run, vcn, lcn, flen, opt & ALLOCATE_MFT)) { in attr_allocate_clusters()
202 mark_as_free_ex(sbi, lcn, len, false); in attr_allocate_clusters()
[all …]
H A Dbitmap.c510 CLST lcn, clen; in wnd_rescan() local
555 &lcn, &clen, NULL)) { in wnd_rescan()
560 lbo = ((u64)lcn << cluster_bits) + off; in wnd_rescan()
700 CLST lcn, clen; in wnd_map() local
709 if (!run_lookup_entry(&wnd->run, vbo >> sbi->cluster_bits, &lcn, &clen, in wnd_map()
714 lbo = ((u64)lcn << sbi->cluster_bits) + (vbo & sbi->cluster_mask); in wnd_map()
1406 void wnd_zone_set(struct wnd_bitmap *wnd, size_t lcn, size_t len) in wnd_zone_set() argument
1414 wnd_remove_free_ext(wnd, lcn, len); in wnd_zone_set()
1416 wnd->zone_bit = lcn; in wnd_zone_set()
1417 wnd->zone_end = lcn + len; in wnd_zone_set()
[all …]
H A Dntfs_fs.h461 struct runs_tree *run_da, CLST vcn, CLST lcn,
481 int attr_data_get_block(struct ntfs_inode *ni, CLST vcn, CLST clen, CLST *lcn,
485 CLST *lcn, CLST *len, bool *new, bool zero,
656 int ntfs_look_for_free_space(struct ntfs_sb_info *sbi, CLST lcn, CLST len,
741 void mark_as_free_ex(struct ntfs_sb_info *sbi, CLST lcn, CLST len, bool trim);
884 bool run_lookup_entry(const struct runs_tree *run, CLST vcn, CLST *lcn,
887 const struct runs_tree *run_da, CLST vcn, CLST *lcn,
892 bool run_add_entry(struct runs_tree *run, CLST vcn, CLST lcn, CLST len,
898 CLST *lcn, CLST *len);
924 void ntfs_unmap_meta(struct super_block *sb, CLST lcn, CLST len);
H A Dsuper.c1277 CLST vcn, lcn, len; in ntfs_fill_super() local
1551 for (i = 0; run_get_entry(&ni->file.run, i, &vcn, &lcn, &len); i++) { in ntfs_fill_super()
1552 if (lcn == SPARSE_LCN) in ntfs_fill_super()
1560 if (wnd_set_used_safe(&sbi->used.bitmap, lcn, len, &tt) || tt) { in ntfs_fill_super()
1776 void ntfs_unmap_meta(struct super_block *sb, CLST lcn, CLST len) in ntfs_unmap_meta() argument
1780 sector_t devblock = (u64)lcn * sbi->blocks_per_cluster; in ntfs_unmap_meta()
1805 int ntfs_discard(struct ntfs_sb_info *sbi, CLST lcn, CLST len) in ntfs_discard() argument
1811 if (sbi->used.next_free_lcn == lcn + len) in ntfs_discard()
1812 sbi->used.next_free_lcn = lcn; in ntfs_discard()
1820 lbo = (u64)lcn << sbi->cluster_bits; in ntfs_discard()
H A Dfile.c424 CLST lcn, len; in ntfs_file_mmap_prepare() local
430 err = attr_data_get_block(ni, vcn, 1, &lcn, in ntfs_file_mmap_prepare()
663 CLST lcn, clen; in ntfs_fallocate() local
671 &lcn, &clen, &new, in ntfs_fallocate()
1031 CLST lcn, clen; in ntfs_compress_write() local
1037 err = attr_data_get_block(ni, frame << NTFS_LZNT_CUNIT, 1, &lcn, in ntfs_compress_write()
1042 if (lcn == SPARSE_LCN) { in ntfs_compress_write()
H A Dinode.c946 CLST lcn, clen, clen_max = 1; in ntfs_iomap_begin() local
978 err = attr_data_get_block(ni, vcn, clen_max, &lcn, &clen, in ntfs_iomap_begin()
985 if (lcn == EOF_LCN) { in ntfs_iomap_begin()
996 lcn = SPARSE_LCN; in ntfs_iomap_begin()
1001 if (lcn == RESIDENT_LCN) { in ntfs_iomap_begin()
1028 if (lcn == COMPRESSED_LCN) { in ntfs_iomap_begin()
1033 if (lcn == DELALLOC_LCN) { in ntfs_iomap_begin()
1038 iomap->addr = ((loff_t)lcn << cluster_bits) + off; in ntfs_iomap_begin()
1044 if (lcn == SPARSE_LCN) { in ntfs_iomap_begin()
H A Dfrecord.c2024 CLST vcn, cend, lcn, clen, end; in ni_decompress_file() local
2065 err = attr_data_get_block(ni, vcn, cend - vcn, &lcn, in ni_decompress_file()
2909 CLST vcn, lcn, clen; in ni_seek_data_or_hole() local
2914 err = attr_data_get_block(ni, vcn, 1, &lcn, &clen, NULL, false, in ni_seek_data_or_hole()
2925 if (lcn == RESIDENT_LCN) { in ni_seek_data_or_hole()
2939 if (lcn == EOF_LCN) { in ni_seek_data_or_hole()
2954 if (lcn != SPARSE_LCN) { in ni_seek_data_or_hole()
2972 if (lcn == SPARSE_LCN && in ni_seek_data_or_hole()
3349 CLST vcn, lcn, clen, alen; in ni_allocate_da_blocks_locked() local
3355 while (run_get_entry(&ni->file.run_da, 0, &vcn, &lcn, &clen)) { in ni_allocate_da_blocks_locked()
[all …]
H A Dfslog.c228 __le64 lcn; member
3866 CLST rno, lcn, lcn0, len0, clen; in log_replay() local
4720 u64 lcn0 = le64_to_cpu(r->lcn); in log_replay()
5018 lcn = le64_to_cpu(dp->page_lcns[i]); in log_replay()
5021 lcn0 != lcn) && in log_replay()
5022 !run_add_entry(oa->run1, vcn, lcn, 1, false)) { in log_replay()
5111 if (!run_lookup_entry(oa->run1, vcn, &lcn, NULL, NULL) || in log_replay()
5112 lcn == SPARSE_LCN) { in log_replay()
5242 &lcn, &clen, NULL); in log_replay()
5249 if (is_mapped && lcn != SPARSE_LCN && clen >= t16) in log_replay()
H A Dindex.c377 CLST lcn, clen, vcn, vcn_next; in scan_nres_bitmap() local
391 ok = run_lookup_entry(run, vcn, &lcn, &clen, &idx); in scan_nres_bitmap()
406 ok = run_lookup_entry(run, vcn, &lcn, &clen, &idx); in scan_nres_bitmap()
413 block = (sector_t)lcn * sbi->blocks_per_cluster; in scan_nres_bitmap()
450 ok = run_get_entry(run, ++idx, &vcn, &lcn, &clen) && vcn == vcn_next; in scan_nres_bitmap()
/linux/fs/erofs/
H A Dzmap.c13 u64 lcn; member
24 static int z_erofs_load_full_lcluster(struct z_erofs_maprecorder *m, u64 lcn) in z_erofs_load_full_lcluster() argument
30 lcn * sizeof(struct z_erofs_lcluster_index); in z_erofs_load_full_lcluster()
37 m->lcn = lcn; in z_erofs_load_full_lcluster()
102 u64 lcn, bool lookahead) in z_erofs_load_compact_lcluster() argument
117 if (lcn >= totalidx || lclusterbits > 14) in z_erofs_load_compact_lcluster()
120 m->lcn = lcn; in z_erofs_load_compact_lcluster()
130 if (lcn >= compacted_4b_initial) { in z_erofs_load_compact_lcluster()
132 lcn -= compacted_4b_initial; in z_erofs_load_compact_lcluster()
133 if (lcn < compacted_2b) { in z_erofs_load_compact_lcluster()
[all …]
/linux/drivers/net/wireless/broadcom/b43/
H A Dphy_lcn.c341 tx_pwr_idx = dev->phy.lcn->tx_pwr_curr_idx; in b43_phy_lcn_sense_setup()
537 if (!dev->phy.lcn->hw_pwr_ctl_capable) { in b43_phy_lcn_tx_pwr_ctl_init()
675 dev->phy.lcn = phy_lcn; in b43_phy_lcn_op_allocate()
683 struct b43_phy_lcn *phy_lcn = phy->lcn; in b43_phy_lcn_op_free()
686 phy->lcn = NULL; in b43_phy_lcn_op_free()
692 struct b43_phy_lcn *phy_lcn = phy->lcn; in b43_phy_lcn_op_prepare_structs()
H A Dphy_common.h215 struct b43_phy_lcn *lcn; member

12