Home
last modified time | relevance | path

Searched refs:sbi (Results 1 – 25 of 226) sorted by relevance

12345678910

/linux/fs/f2fs/
H A Dsuper.c340 sbi->user_block_count - sbi->reserved_blocks); in limit_reserve_root()
1391 if (test_opt(sbi, ATGC) && f2fs_lfs_mode(sbi)) { in parse_options()
1654 f2fs_bug_on(sbi, sbi->fsync_node_num); in f2fs_put_super()
3781 sbi->blocksize = BIT(sbi->log_blocksize); in init_sb_info()
3787 sbi->total_node_count = SEGS_TO_BLKS(sbi, in init_sb_info()
3798 sbi->migration_granularity = SEGS_PER_SEC(sbi); in init_sb_info()
3928 rep_zone_arg.sbi = sbi; in init_blkz_info()
4011 crc = f2fs_crc32(sbi, F2FS_RAW_SUPER(sbi), in f2fs_commit_super()
4028 bh = sb_bread(sbi->sb, sbi->valid_super_block); in f2fs_commit_super()
4221 sbi->devs = f2fs_kzalloc(sbi, in f2fs_scan_devices()
[all …]
H A Dsegment.h68 (SM_I(sbi) ? SM_I(sbi)->main_blkaddr : \
71 (SM_I(sbi) ? SM_I(sbi)->seg0_blkaddr : \
74 #define MAIN_SEGS(sbi) (SM_I(sbi)->main_segments) argument
75 #define MAIN_SECS(sbi) ((sbi)->total_sections) argument
78 (SM_I(sbi) ? SM_I(sbi)->segment_count : \
80 #define TOTAL_BLKS(sbi) (SEGS_TO_BLKS(sbi, TOTAL_SEGS(sbi))) argument
82 #define MAX_BLKADDR(sbi) (SEG0_BLKADDR(sbi) + TOTAL_BLKS(sbi)) argument
103 (BLKS_PER_SEC(sbi) - (sbi)->unusable_blocks_per_sec)
106 BLKS_TO_SEGS(sbi, (sbi)->unusable_blocks_per_sec))
114 GET_ZONE_FROM_SEC(sbi, GET_SEC_FROM_SEG(sbi, segno))
[all …]
H A Dcheckpoint.c63 .sbi = sbi, in __get_meta_page()
258 .sbi = sbi, in f2fs_ra_meta_pages()
753 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); in f2fs_recover_orphan_inodes()
1343 NM_I(sbi)->nat_bits_blocks > BLKS_PER_SEG(sbi)) { in update_ckpt_flags()
1527 get_sit_bitmap(sbi, __bitmap_ptr(sbi, SIT_BITMAP)); in do_checkpoint()
1528 get_nat_bitmap(sbi, __bitmap_ptr(sbi, NAT_BITMAP)); in do_checkpoint()
1608 MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1)); in do_checkpoint()
1632 f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_DENTS)); in do_checkpoint()
1643 if (f2fs_readonly(sbi->sb) || f2fs_hw_is_readonly(sbi)) in f2fs_write_checkpoint()
1702 f2fs_bug_on(sbi, !f2fs_cp_error(sbi)); in f2fs_write_checkpoint()
[all …]
H A Dsegment.c185 SM_I(sbi)->min_ssr_sections + reserved_sections(sbi)); in f2fs_need_SSR()
423 if (test_opt(sbi, GC_MERGE) && sbi->gc_thread && in f2fs_balance_fs()
541 return __submit_flush_wait(sbi, sbi->sb->s_bdev); in submit_flush_wait()
1655 f2fs_bug_on(sbi, !f2fs_check_discard_tree(sbi)); in __issue_discard_cmd()
2042 se = get_seg_entry(sbi, GET_SEGNO(sbi, i)); in f2fs_issue_discard()
3233 f2fs_bug_on(sbi, !f2fs_check_discard_tree(sbi)); in __issue_discard_cmd_range()
3757 .sbi = sbi, in f2fs_do_write_meta_page()
3792 struct f2fs_sb_info *sbi = fio->sbi; in f2fs_outplace_write_data() local
3808 struct f2fs_sb_info *sbi = fio->sbi; in f2fs_inplace_write_data() local
4778 sbi->discard_blks += BLKS_PER_SEG(sbi) - in build_sit_entries()
[all …]
H A Dgc.c152 prefree_segments(sbi), free_segments(sbi)); in gc_thread_func()
660 f2fs_bug_on(sbi, !f2fs_check_victim_tree(sbi, &sbi->am.root)); in lookup_victim_by_age()
757 last_segment = MAIN_SECS(sbi) * SEGS_PER_SEC(sbi); in f2fs_get_victim()
781 if (sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result))) in f2fs_get_victim()
898 (MAIN_SECS(sbi) * SEGS_PER_SEC(sbi)); in f2fs_get_victim()
933 prefree_segments(sbi), free_segments(sbi)); in f2fs_get_victim()
1178 .sbi = sbi, in ra_data_block()
1703 f2fs_ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), in do_garbage_collect()
1767 sbi->gc_reclaimed_segs[sbi->gc_mode]++; in do_garbage_collect()
2029 start = MAIN_SECS(sbi) * SEGS_PER_SEC(sbi); in free_segment_range()
[all …]
H A Diostat.c23 return sbi->iostat_count[type] ? div64_u64(sbi->iostat_bytes[type], in iostat_get_avg_bytes()
24 sbi->iostat_count[type]) : 0; in iostat_get_avg_bytes()
38 if (!sbi->iostat_enable) in iostat_info_seq_show()
134 sbi->prev_iostat_bytes[i] = sbi->iostat_bytes[i]; in f2fs_record_iostat()
173 if (!sbi->iostat_enable) in f2fs_update_iostat()
209 f2fs_record_iostat(sbi); in f2fs_update_iostat()
217 struct f2fs_sb_info *sbi = iostat_ctx->sbi; in __update_iostat_latency() local
221 if (!sbi->iostat_enable) in __update_iostat_latency()
264 iostat_ctx->sbi = sbi; in iostat_alloc_and_bind_ctx()
304 sbi->iostat_io_lat = f2fs_kzalloc(sbi, sizeof(struct iostat_lat_info), in f2fs_init_iostat()
[all …]
H A Ddebug.c44 for (segno = 0; segno < MAIN_SEGS(sbi); segno += SEGS_PER_SEC(sbi)) { in f2fs_update_sit_info()
138 si->total_count = BLKS_TO_SEGS(sbi, (int)sbi->user_block_count); in update_general_status()
160 if (sbi->node_inode) in update_general_status()
162 if (sbi->meta_inode) in update_general_status()
179 si->util_free = (int)(BLKS_TO_SEGS(sbi, free_user_blocks(sbi))) in update_general_status()
180 * 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg) in update_general_status()
182 si->util_valid = (int)(BLKS_TO_SEGS(sbi, written_block_count(sbi))) in update_general_status()
183 * 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg) in update_general_status()
288 if (sbi->gc_thread) in update_mem_info()
379 struct f2fs_sb_info *sbi = si->sbi; in stat_show() local
[all …]
H A Dsysfs.c140 if (!SM_I(sbi)->dcc_info) in pending_discard_show()
149 if (!SM_I(sbi)->dcc_info) in issued_discard_show()
158 if (!SM_I(sbi)->dcc_info) in queued_discard_show()
368 sbi->gc_reclaimed_segs[sbi->gc_segment_mode]); in f2fs_sbi_show()
502 SEGS_TO_BLKS(sbi, in __sbi_store()
508 sbi->current_reserved_blocks = min(sbi->reserved_blocks, in __sbi_store()
509 sbi->user_block_count - valid_user_blocks(sbi)); in __sbi_store()
694 sbi->gc_reclaimed_segs[sbi->gc_segment_mode] = 0; in __sbi_store()
787 sbi->dir_level = t; in __sbi_store()
1536 SEGS_PER_SEC(sbi)); in disk_map_seq_show()
[all …]
H A Df2fs.h120 #define F2FS_OPTION(sbi) ((sbi)->mount_opt) argument
1821 #define BLKS_PER_SEG(sbi) ((sbi)->blocks_per_seg) argument
1822 #define BLKS_PER_SEC(sbi) (SEGS_TO_BLKS(sbi, (sbi)->segs_per_sec)) argument
1823 #define SEGS_PER_SEC(sbi) ((sbi)->segs_per_sec) argument
2447 sbi->current_reserved_blocks < sbi->reserved_blocks) in dec_valid_block_count()
2448 sbi->current_reserved_blocks = min(sbi->reserved_blocks, in dec_valid_block_count()
2615 sbi->cur_cp_pack = (sbi->cur_cp_pack == 1) ? 2 : 1; in __set_cp_next_pack()
2704 sbi->current_reserved_blocks < sbi->reserved_blocks) in dec_valid_node_count()
2846 if (SM_I(sbi) && SM_I(sbi)->fcc_info && in is_inflight_io()
3463 #define __is_large_section(sbi) (SEGS_PER_SEC(sbi) > 1) argument
[all …]
H A Dshrinker.c43 struct f2fs_sb_info *sbi; in f2fs_shrink_count() local
66 count += __count_nat_entries(sbi); in f2fs_shrink_count()
69 count += __count_free_nids(sbi); in f2fs_shrink_count()
73 mutex_unlock(&sbi->umount_mutex); in f2fs_shrink_count()
83 struct f2fs_sb_info *sbi; in f2fs_shrink_scan() local
96 if (sbi->shrinker_run_no == run_no) in f2fs_shrink_scan()
106 sbi->shrinker_run_no = run_no; in f2fs_shrink_scan()
125 mutex_unlock(&sbi->umount_mutex); in f2fs_shrink_scan()
142 f2fs_shrink_read_extent_tree(sbi, __count_extent_cache(sbi, EX_READ)); in f2fs_leave_shrinker()
143 f2fs_shrink_age_extent_tree(sbi, in f2fs_leave_shrinker()
[all …]
H A Dnode.c35 if (unlikely(nid < F2FS_ROOT_INO(sbi) || nid >= NM_I(sbi)->max_nid)) { in f2fs_check_nid_range()
135 return f2fs_get_meta_page_retry(sbi, current_nat_addr(sbi, nid)); in get_current_nat_page()
147 dst_off = next_nat_addr(sbi, current_nat_addr(sbi, nid)); in get_next_nat_page()
323 sbi->fsync_seg_id = 0; in f2fs_init_fsync_node_info()
368 f2fs_bug_on(sbi, 1); in f2fs_del_fsync_node_entry()
1375 .sbi = sbi, in read_node_page()
1614 .sbi = sbi, in __write_node_page()
1677 if (atomic && !test_opt(sbi, NOBARRIER) && !f2fs_sb_has_blkzoned(sbi)) in __write_node_page()
3179 nat_bits_addr = __start_cp_addr(sbi) + BLKS_PER_SEG(sbi) - in __get_nat_bitmaps()
3334 sbi->nm_info = f2fs_kzalloc(sbi, sizeof(struct f2fs_nm_info), in f2fs_build_node_manager()
[all …]
/linux/fs/sysv/
H A Dsuper.c75 sbi->s_firstdatazone = fs16_to_cpu(sbi, sbd1->s_isize); in detected_xenix()
76 sbi->s_nzones = fs32_to_cpu(sbi, sbd1->s_fsize); in detected_xenix()
104 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize); in detected_sysv4()
132 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize); in detected_sysv2()
155 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize); in detected_coherent()
176 sbi->s_nzones = fs32_to_cpu(sbi, sbd->s_fsize); in detected_v7()
314 flavour_setup[sbi->s_type](sbi, &sb->s_max_links); in complete_read_super()
315 if (sbi->s_firstdatazone < sbi->s_firstinodezone) in complete_read_super()
318 sbi->s_ndatazones = sbi->s_nzones - sbi->s_firstdatazone; in complete_read_super()
327 sbi->s_ninodes = (sbi->s_firstdatazone - sbi->s_firstinodezone) in complete_read_super()
[all …]
H A Dballoc.c65 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_free_block()
94 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); in sysv_free_block()
95 fs32_add(sbi, sbi->s_free_blocks, 1); in sysv_free_block()
109 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_new_block()
119 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); in sysv_new_block()
134 *sbi->s_bcache_count = cpu_to_fs16(sbi, 1); in sysv_new_block()
143 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); in sysv_new_block()
149 fs32_add(sbi, sbi->s_free_blocks, -1); in sysv_new_block()
178 sb_count = fs32_to_cpu(sbi, *sbi->s_free_blocks); in sysv_count_free_blocks()
185 n = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_count_free_blocks()
[all …]
H A Dialloc.c44 if (sbi->s_bh1 == sbi->s_bh2) in sv_sb_fic_inode()
61 int block = sbi->s_firstinodezone + sbi->s_block_base; in sysv_raw_inode()
122 mutex_lock(&sbi->s_lock); in sysv_free_inode()
123 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_free_inode()
126 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_free_inode()
128 fs16_add(sbi, sbi->s_sb_total_free_inodes, 1); in sysv_free_inode()
151 mutex_lock(&sbi->s_lock); in sysv_new_inode()
152 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_new_inode()
163 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_new_inode()
164 fs16_add(sbi, sbi->s_sb_total_free_inodes, -1); in sysv_new_inode()
[all …]
H A Dinode.c40 mutex_lock(&sbi->s_lock); in sysv_sync_fs()
47 old_time = fs32_to_cpu(sbi, *sbi->s_sb_time); in sysv_sync_fs()
49 if (*sbi->s_sb_state == cpu_to_fs32(sbi, 0x7c269d38u - old_time)) in sysv_sync_fs()
50 *sbi->s_sb_state = cpu_to_fs32(sbi, 0x7c269d38u - time); in sysv_sync_fs()
51 *sbi->s_sb_time = cpu_to_fs32(sbi, time); in sysv_sync_fs()
65 if (sbi->s_forced_ro) in sysv_remount()
77 if (sbi->s_bh1 != sbi->s_bh2) in sysv_put_super()
81 brelse(sbi->s_bh1); in sysv_put_super()
82 if (sbi->s_bh1 != sbi->s_bh2) in sysv_put_super()
83 brelse(sbi->s_bh2); in sysv_put_super()
[all …]
/linux/fs/autofs/
H A Dinode.c21 ino->sbi = sbi; in autofs_new_ino()
49 if (sbi) { in autofs_kill_sb()
57 if (sbi) in autofs_kill_sb()
66 if (!sbi) in autofs_show_options()
252 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in autofs_alloc_sbi()
253 if (!sbi) in autofs_alloc_sbi()
282 sbi->min_proto, sbi->max_proto, in autofs_validate_protocol()
291 sbi->version = sbi->max_proto; in autofs_validate_protocol()
363 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super()
392 if (sbi) { in autofs_free_fc()
[all …]
/linux/fs/hfsplus/
H A Dsuper.c218 memcpy(sbi->s_backup_vhdr, sbi->s_vhdr, sizeof(*sbi->s_vhdr)); in hfsplus_sync_fs()
232 sbi->part_start + sbi->sect_count - 2, in hfsplus_sync_fs()
285 kfree(sbi); in delayed_free()
324 buf->f_blocks = sbi->total_blocks << sbi->fs_shift; in hfsplus_statfs()
325 buf->f_bfree = sbi->free_blocks << sbi->fs_shift; in hfsplus_statfs()
393 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in hfsplus_fill_super()
394 if (!sbi) in hfsplus_fill_super()
411 nls = sbi->nls; in hfsplus_fill_super()
413 if (!sbi->nls) { in hfsplus_fill_super()
595 sbi->nls = nls; in hfsplus_fill_super()
[all …]
H A Doptions.c132 sbi->umask = (umode_t)tmp; in hfsplus_parse_options()
140 if (!uid_valid(sbi->uid)) { in hfsplus_parse_options()
173 if (sbi->nls) { in hfsplus_parse_options()
179 sbi->nls = load_nls(p); in hfsplus_parse_options()
180 if (!sbi->nls) { in hfsplus_parse_options()
209 if (!sbi->nls) { in hfsplus_parse_options()
212 if (!sbi->nls) in hfsplus_parse_options()
214 if (!sbi->nls) in hfsplus_parse_options()
232 if (sbi->part >= 0) in hfsplus_show_options()
234 if (sbi->session >= 0) in hfsplus_show_options()
[all …]
/linux/fs/exfat/
H A Dsuper.c39 exfat_free_bitmap(sbi); in exfat_put_super()
40 brelse(sbi->boot_bh); in exfat_put_super()
149 else if (sbi->nls_io) in exfat_show_options()
426 if (!sbi->boot_bh) { in exfat_read_boot_sector()
478 sbi->cluster_size = 1 << sbi->cluster_size_bits; in exfat_read_boot_sector()
483 sbi->FAT2_start_sector += sbi->num_FAT_sectors; in exfat_read_boot_sector()
653 sbi->nls_io = load_nls(sbi->options.iocharset); in exfat_fill_super()
714 kfree(sbi); in exfat_free_sbi()
721 if (sbi) in exfat_free()
746 if (!sbi) in exfat_init_fs_context()
[all …]
H A Dballoc.c53 sbi->vol_amap = kvmalloc_array(sbi->map_sectors, in exfat_allocate_bitmap()
55 if (!sbi->vol_amap) in exfat_allocate_bitmap()
58 sector = exfat_cluster_to_sector(sbi, sbi->map_clu); in exfat_allocate_bitmap()
61 if (!sbi->vol_amap[i]) { in exfat_allocate_bitmap()
66 brelse(sbi->vol_amap[j++]); in exfat_allocate_bitmap()
68 kvfree(sbi->vol_amap); in exfat_allocate_bitmap()
69 sbi->vol_amap = NULL; in exfat_allocate_bitmap()
120 __brelse(sbi->vol_amap[i]); in exfat_free_bitmap()
122 kvfree(sbi->vol_amap); in exfat_free_bitmap()
268 if (clu_start >= sbi->num_clusters || range->len < sbi->cluster_size) in exfat_trim_fs()
[all …]
/linux/fs/erofs/
H A Dsuper.c228 sbi->total_blocks = sbi->primarydevice_blocks; in erofs_scan_devices()
304 if (sbi->blkszbits < 9 || sbi->blkszbits > PAGE_SHIFT) { in erofs_read_superblock()
667 if (erofs_sb_has_fragments(sbi) && sbi->packed_nid) { in erofs_fc_fill_super()
668 sbi->packed_inode = erofs_iget(sb, sbi->packed_nid); in erofs_fc_fill_super()
750 if (!sbi) in erofs_fc_free()
756 kfree(sbi); in erofs_fc_free()
770 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in erofs_init_fs_context()
771 if (!sbi) in erofs_init_fs_context()
776 kfree(sbi); in erofs_init_fs_context()
802 kfree(sbi); in erofs_kill_sb()
[all …]
/linux/fs/omfs/
H A Dinode.c45 err = omfs_allocate_range(dir->i_sb, sbi->s_mirrors, sbi->s_mirrors, in omfs_new_inode()
267 kfree(sbi); in omfs_put_super()
305 if (sbi->s_dmask == sbi->s_fmask) { in omfs_show_options()
353 block = clus_to_blk(sbi, sbi->s_bitmap_ino); in omfs_get_imap()
433 sbi->s_fmask = sbi->s_dmask = option; in parse_options()
462 if (!sbi) in omfs_fill_super()
469 sbi->s_dmask = sbi->s_fmask = current_umask(); in omfs_fill_super()
515 if (sbi->s_blocksize < sbi->s_sys_blocksize || in omfs_fill_super()
532 sbi->s_block_shift = get_bitmask_order(sbi->s_blocksize) - in omfs_fill_super()
553 sbi->s_bitmap_ino > sbi->s_num_blocks) { in omfs_fill_super()
[all …]
/linux/fs/affs/
H A Dbitmap.c59 bh = sbi->s_bmap_bh; in affs_free_block()
65 sbi->s_bmap_bh = bh; in affs_free_block()
96 sbi->s_bmap_bh = NULL; in affs_free_block()
97 sbi->s_last_bmap = ~0; in affs_free_block()
126 sbi = AFFS_SB(sb); in affs_alloc_block()
165 bm = sbi->s_bitmap; in affs_alloc_block()
171 bh = sbi->s_bmap_bh; in affs_alloc_block()
265 sbi->s_bmap_count = (sbi->s_partition_size - sbi->s_reserved + in affs_init_bitmap()
266 sbi->s_bmap_bits - 1) / sbi->s_bmap_bits; in affs_init_bitmap()
315 offset = (sbi->s_partition_size - sbi->s_reserved) % sbi->s_bmap_bits; in affs_init_bitmap()
[all …]
H A Dsuper.c71 sb = sbi->sb; in flush_superblock()
74 sbi->work_queued = 0; in flush_superblock()
313 if (sbi->s_root_block != (sbi->s_reserved + sbi->s_partition_size - 1) / 2) in affs_show_options()
362 if (!sbi) in affs_fill_super()
365 sb->s_fs_info = sbi; in affs_fill_super()
366 sbi->sb = sb; in affs_fill_super()
381 sbi->s_mode = i; in affs_fill_super()
582 sbi->s_mode = mode; in affs_remount()
583 sbi->s_uid = uid; in affs_remount()
584 sbi->s_gid = gid; in affs_remount()
[all …]
/linux/fs/ufs/
H A Dcylinder.c39 uspi = sbi->s_uspi; in ufs_read_cylinder()
93 uspi = sbi->s_uspi; in ufs_put_cylinder()
137 uspi = sbi->s_uspi; in ufs_load_cylinder()
173 for (i = 0; i < sbi->s_cg_loaded && sbi->s_cgno[i] != cgno; i++); in ufs_load_cylinder()
174 if (i < sbi->s_cg_loaded && sbi->s_cgno[i] == cgno) { in ufs_load_cylinder()
175 cg = sbi->s_cgno[i]; in ufs_load_cylinder()
178 sbi->s_cgno[j] = sbi->s_cgno[j-1]; in ufs_load_cylinder()
179 sbi->s_ucpi[j] = sbi->s_ucpi[j-1]; in ufs_load_cylinder()
192 ucpi = sbi->s_ucpi[sbi->s_cg_loaded - 1]; in ufs_load_cylinder()
194 sbi->s_cgno[j] = sbi->s_cgno[j-1]; in ufs_load_cylinder()
[all …]

12345678910