Home
last modified time | relevance | path

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

12345678910

/openbmc/linux/fs/f2fs/
H A Dsuper.c310 sbi->user_block_count - sbi->reserved_blocks); in limit_reserve_root()
377 F2FS_OPTION(sbi).unusable_cap = sbi->user_block_count; in adjust_unusable_cap_perc()
1421 if (test_opt(sbi, ATGC) && f2fs_lfs_mode(sbi)) { in parse_options()
1684 f2fs_bug_on(sbi, sbi->fsync_node_num); in f2fs_put_super()
3805 sbi->blocksize = BIT(sbi->log_blocksize); in init_sb_info()
3822 sbi->migration_granularity = sbi->segs_per_sec; in init_sb_info()
3939 rep_zone_arg.sbi = sbi; in init_blkz_info()
4022 crc = f2fs_crc32(sbi, F2FS_RAW_SUPER(sbi), in f2fs_commit_super()
4039 bh = sb_bread(sbi->sb, sbi->valid_super_block); in f2fs_commit_super()
4223 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) (TOTAL_SEGS(sbi) << (sbi)->log_blocks_per_seg) argument
82 #define MAX_BLKADDR(sbi) (SEG0_BLKADDR(sbi) + TOTAL_BLKS(sbi)) argument
103 ((sbi)->segs_per_sec * (sbi)->blocks_per_seg)
105 ((sbi)->segs_per_sec * (sbi)->blocks_per_seg - \
117 GET_ZONE_FROM_SEC(sbi, GET_SEC_FROM_SEG(sbi, segno))
[all …]
H A Dcheckpoint.c63 .sbi = sbi, in __get_meta_page()
242 .sbi = sbi, in f2fs_ra_meta_pages()
737 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); in f2fs_recover_orphan_inodes()
1327 NM_I(sbi)->nat_bits_blocks > sbi->blocks_per_seg) { in update_ckpt_flags()
1511 get_sit_bitmap(sbi, __bitmap_ptr(sbi, SIT_BITMAP)); in do_checkpoint()
1512 get_nat_bitmap(sbi, __bitmap_ptr(sbi, NAT_BITMAP)); in do_checkpoint()
1592 MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1)); in do_checkpoint()
1616 f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_DENTS)); in do_checkpoint()
1627 if (f2fs_readonly(sbi->sb) || f2fs_hw_is_readonly(sbi)) in f2fs_write_checkpoint()
1686 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()
422 if (test_opt(sbi, GC_MERGE) && sbi->gc_thread && in f2fs_balance_fs()
540 return __submit_flush_wait(sbi, sbi->sb->s_bdev); in submit_flush_wait()
2029 se = get_seg_entry(sbi, GET_SEGNO(sbi, i)); in f2fs_issue_discard()
2193 sbi->segs_per_sec << sbi->log_blocks_per_seg); in f2fs_clear_prefree_segments()
2667 f2fs_bug_on(sbi, secno >= MAIN_SECS(sbi)); in get_new_segment()
2683 f2fs_bug_on(sbi, left_start >= MAIN_SECS(sbi)); in get_new_segment()
3581 .sbi = sbi, in f2fs_do_write_meta_page()
3616 struct f2fs_sb_info *sbi = fio->sbi; in f2fs_outplace_write_data() local
3632 struct f2fs_sb_info *sbi = fio->sbi; in f2fs_inplace_write_data() local
[all …]
H A Dgc.c152 prefree_segments(sbi), free_segments(sbi)); in gc_thread_func()
661 f2fs_bug_on(sbi, !f2fs_check_victim_tree(sbi, &sbi->am.root)); in lookup_victim_by_age()
758 last_segment = MAIN_SECS(sbi) * sbi->segs_per_sec; in f2fs_get_victim()
782 if (sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result))) in f2fs_get_victim()
899 (MAIN_SECS(sbi) * sbi->segs_per_sec); in f2fs_get_victim()
934 prefree_segments(sbi), free_segments(sbi)); in f2fs_get_victim()
1179 .sbi = sbi, in ra_data_block()
1704 f2fs_ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), in do_garbage_collect()
1768 sbi->gc_reclaimed_segs[sbi->gc_mode]++; in do_garbage_collect()
1994 start = MAIN_SECS(sbi) * sbi->segs_per_sec; 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 += sbi->segs_per_sec) { in f2fs_update_sit_info()
138 si->total_count = (int)sbi->user_block_count / sbi->blocks_per_seg; 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)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg) in update_general_status()
180 * 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg) in update_general_status()
184 * 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg) in update_general_status()
289 if (sbi->gc_thread) in update_mem_info()
380 struct f2fs_sb_info *sbi = si->sbi; in stat_show() local
389 if (sbi->s_flag) { in stat_show()
[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 Dsysfs.c140 if (!SM_I(sbi)->dcc_info) in pending_discard_show()
341 sbi->gc_reclaimed_segs[sbi->gc_segment_mode]); in f2fs_sbi_show()
469 sbi->blocks_per_seg * in __sbi_store()
475 sbi->current_reserved_blocks = min(sbi->reserved_blocks, in __sbi_store()
476 sbi->user_block_count - valid_user_blocks(sbi)); in __sbi_store()
529 if (sbi->gc_thread) { in __sbi_store()
539 if (sbi->gc_thread) { in __sbi_store()
632 sbi->am.age_weight = t; in __sbi_store()
647 sbi->gc_reclaimed_segs[sbi->gc_segment_mode] = 0; in __sbi_store()
697 sbi->readdir_ra = !!t; in __sbi_store()
[all …]
H A Df2fs.h117 #define F2FS_OPTION(sbi) ((sbi)->mount_opt) argument
2422 sbi->current_reserved_blocks < sbi->reserved_blocks) in dec_valid_block_count()
2423 sbi->current_reserved_blocks = min(sbi->reserved_blocks, in dec_valid_block_count()
2593 sbi->cur_cp_pack = (sbi->cur_cp_pack == 1) ? 2 : 1; in __set_cp_next_pack()
2692 sbi->current_reserved_blocks < sbi->reserved_blocks) in dec_valid_node_count()
2834 if (SM_I(sbi) && SM_I(sbi)->fcc_info && in is_inflight_io()
3460 #define __is_large_section(sbi) ((sbi)->segs_per_sec > 1) argument
3965 #define stat_io_skip_bggc_count(sbi) ((sbi)->io_skip_bggc++) argument
4520 return f2fs_sb_has_readonly(sbi) || f2fs_hw_is_readonly(sbi); in f2fs_dev_is_readonly()
4626 return f2fs_sb_has_readonly(sbi) || f2fs_readonly(sbi->sb); in f2fs_is_readonly()
[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()
1365 .sbi = sbi, in read_node_page()
1604 .sbi = sbi, in __write_node_page()
1667 if (atomic && !test_opt(sbi, NOBARRIER) && !f2fs_sb_has_blkzoned(sbi)) in __write_node_page()
3169 nat_bits_addr = __start_cp_addr(sbi) + sbi->blocks_per_seg - in __get_nat_bitmaps()
3324 sbi->nm_info = f2fs_kzalloc(sbi, sizeof(struct f2fs_nm_info), in f2fs_build_node_manager()
[all …]
/openbmc/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 …]
/openbmc/linux/fs/autofs/
H A Dinode.c22 ino->sbi = sbi; in autofs_new_ino()
50 if (sbi) { in autofs_kill_sb()
58 if (sbi) in autofs_kill_sb()
67 if (!sbi) in autofs_show_options()
232 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in autofs_fill_super()
233 if (!sbi) in autofs_fill_super()
243 sbi->sb = s; in autofs_fill_super()
293 sbi->min_proto, sbi->max_proto, in autofs_fill_super()
302 sbi->version = sbi->max_proto; in autofs_fill_super()
323 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super()
[all …]
/openbmc/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()
318 buf->f_blocks = sbi->total_blocks << sbi->fs_shift; in hfsplus_statfs()
319 buf->f_bfree = sbi->free_blocks << sbi->fs_shift; in hfsplus_statfs()
387 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in hfsplus_fill_super()
388 if (!sbi) in hfsplus_fill_super()
405 nls = sbi->nls; in hfsplus_fill_super()
407 if (!sbi->nls) { in hfsplus_fill_super()
418 vhdr = sbi->s_vhdr; in hfsplus_fill_super()
589 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 …]
/openbmc/linux/fs/exfat/
H A Dsuper.c39 exfat_free_bitmap(sbi); in exfat_put_super()
40 brelse(sbi->boot_bh); in exfat_put_super()
43 unload_nls(sbi->nls_io); in exfat_put_super()
152 else if (sbi->nls_io) in exfat_show_options()
474 sbi->cluster_size = 1 << sbi->cluster_size_bits; in exfat_read_boot_sector()
479 sbi->FAT2_start_sector += sbi->num_FAT_sectors; in exfat_read_boot_sector()
651 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.c72 sbi->vol_amap = kvmalloc_array(sbi->map_sectors, in exfat_allocate_bitmap()
74 if (!sbi->vol_amap) in exfat_allocate_bitmap()
77 sector = exfat_cluster_to_sector(sbi, sbi->map_clu); in exfat_allocate_bitmap()
80 if (!sbi->vol_amap[i]) { in exfat_allocate_bitmap()
85 brelse(sbi->vol_amap[j++]); in exfat_allocate_bitmap()
87 kvfree(sbi->vol_amap); in exfat_allocate_bitmap()
88 sbi->vol_amap = NULL; in exfat_allocate_bitmap()
139 __brelse(sbi->vol_amap[i]); in exfat_free_bitmap()
141 kvfree(sbi->vol_amap); in exfat_free_bitmap()
285 if (clu_start >= sbi->num_clusters || range->len < sbi->cluster_size) in exfat_trim_fs()
[all …]
/openbmc/linux/fs/omfs/
H A Dinode.c45 err = omfs_allocate_range(dir->i_sb, sbi->s_mirrors, sbi->s_mirrors, in omfs_new_inode()
269 kfree(sbi); in omfs_put_super()
307 if (sbi->s_dmask == sbi->s_fmask) { in omfs_show_options()
355 block = clus_to_blk(sbi, sbi->s_bitmap_ino); in omfs_get_imap()
435 sbi->s_fmask = sbi->s_dmask = option; in parse_options()
464 if (!sbi) in omfs_fill_super()
471 sbi->s_dmask = sbi->s_fmask = current_umask(); in omfs_fill_super()
517 if (sbi->s_blocksize < sbi->s_sys_blocksize || in omfs_fill_super()
534 sbi->s_block_shift = get_bitmask_order(sbi->s_blocksize) - in omfs_fill_super()
555 sbi->s_bitmap_ino > sbi->s_num_blocks) { in omfs_fill_super()
[all …]
/openbmc/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()
314 if (sbi->s_root_block != (sbi->s_reserved + sbi->s_partition_size - 1) / 2) in affs_show_options()
363 if (!sbi) in affs_fill_super()
366 sb->s_fs_info = sbi; in affs_fill_super()
367 sbi->sb = sb; in affs_fill_super()
382 sbi->s_mode = i; in affs_fill_super()
584 sbi->s_uid = uid; in affs_remount()
585 sbi->s_gid = gid; in affs_remount()
638 if (sbi) { in affs_kill_sb()
[all …]
/openbmc/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 …]
/openbmc/linux/fs/ntfs3/
H A Dsuper.c467 sbi->volume.major_ver, sbi->volume.minor_ver, in ntfs3_volinfo()
468 sbi->cluster_size, sbi->used.bitmap.nbits, in ntfs3_volinfo()
470 sbi->mft.bitmap.nbits - wnd_zeroes(&sbi->mft.bitmap), in ntfs3_volinfo()
634 kfree(sbi); in ntfs3_free_sbi()
930 sbi->cluster_mask = sbi->cluster_size - 1; in ntfs_init_from_boot()
931 sbi->cluster_mask_inv = ~(u64)sbi->cluster_mask; in ntfs_init_from_boot()
1169 sbi->sb = sb; in ntfs_fill_super()
1309 sbi->mft.used = ni->i_valid >> sbi->record_bits; in ntfs_fill_super()
1709 if (sbi) { in ntfs_fs_free()
1752 if (!sbi) in ntfs_init_fs_context()
[all …]

12345678910