/linux/fs/f2fs/ |
A D | super.c | 310 sbi->user_block_count - sbi->reserved_blocks); in limit_reserve_root() 1546 f2fs_bug_on(sbi, sbi->fsync_node_num); in f2fs_put_super() 3531 sbi->blocksize = 1 << sbi->log_blocksize; in init_sb_info() 3547 sbi->migration_granularity = sbi->segs_per_sec; in init_sb_info() 3746 crc = f2fs_crc32(sbi, F2FS_RAW_SUPER(sbi), in f2fs_commit_super() 3763 bh = sb_bread(sbi->sb, sbi->valid_super_block); in f2fs_commit_super() 3789 sbi->devs = f2fs_kzalloc(sbi, in f2fs_scan_devices() 3808 sbi->sb->s_mode, sbi->sb->s_type); in f2fs_scan_devices() 3827 sbi->sb->s_mode, sbi->sb->s_type); in f2fs_scan_devices() 3945 if (!sbi) in f2fs_fill_super() [all …]
|
A D | segment.h | 67 (SM_I(sbi) ? SM_I(sbi)->main_blkaddr : \ 70 (SM_I(sbi) ? SM_I(sbi)->seg0_blkaddr : \ 73 #define MAIN_SEGS(sbi) (SM_I(sbi)->main_segments) argument 74 #define MAIN_SECS(sbi) ((sbi)->total_sections) argument 77 (SM_I(sbi) ? SM_I(sbi)->segment_count : \ 79 #define TOTAL_BLKS(sbi) (TOTAL_SEGS(sbi) << (sbi)->log_blocks_per_seg) argument 81 #define MAX_BLKADDR(sbi) (SEG0_BLKADDR(sbi) + TOTAL_BLKS(sbi)) argument 102 ((sbi)->segs_per_sec * (sbi)->blocks_per_seg) 110 GET_ZONE_FROM_SEC(sbi, GET_SEC_FROM_SEG(sbi, segno)) 693 f2fs_bug_on(sbi, segno > TOTAL_SEGS(sbi) - 1); in check_seg_range() [all …]
|
A D | checkpoint.c | 62 .sbi = sbi, in __get_meta_page() 219 .sbi = sbi, in f2fs_ra_meta_pages() 715 start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi); in f2fs_recover_orphan_inodes() 1306 sbi->blocks_per_seg - NM_I(sbi)->nat_bits_blocks) { in update_ckpt_flags() 1492 get_sit_bitmap(sbi, __bitmap_ptr(sbi, SIT_BITMAP)); in do_checkpoint() 1493 get_nat_bitmap(sbi, __bitmap_ptr(sbi, NAT_BITMAP)); in do_checkpoint() 1571 MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1); in do_checkpoint() 1595 f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_DENTS)); in do_checkpoint() 1606 if (f2fs_readonly(sbi->sb) || f2fs_hw_is_readonly(sbi)) in f2fs_write_checkpoint() 1665 f2fs_bug_on(sbi, !f2fs_cp_error(sbi)); in f2fs_write_checkpoint() [all …]
|
A D | segment.c | 184 SM_I(sbi)->min_ssr_sections + reserved_sections(sbi)); in f2fs_need_SSR() 392 .sbi = sbi, in __f2fs_commit_inmem_pages() 517 if (test_opt(sbi, GC_MERGE) && sbi->gc_thread && in f2fs_balance_fs() 620 return __submit_flush_wait(sbi, sbi->sb->s_bdev); in submit_flush_wait() 1926 se = get_seg_entry(sbi, GET_SEGNO(sbi, i)); in f2fs_issue_discard() 2563 f2fs_bug_on(sbi, secno >= MAIN_SECS(sbi)); in get_new_segment() 2579 f2fs_bug_on(sbi, left_start >= MAIN_SECS(sbi)); in get_new_segment() 3583 .sbi = sbi, in f2fs_do_write_meta_page() 3619 struct f2fs_sb_info *sbi = fio->sbi; in f2fs_outplace_write_data() local 3633 struct f2fs_sb_info *sbi = fio->sbi; in f2fs_inplace_write_data() local [all …]
|
A D | gc.c | 137 prefree_segments(sbi), free_segments(sbi)); in gc_thread_func() 606 f2fs_bug_on(sbi, !f2fs_check_rb_tree_consistence(sbi, in lookup_victim_by_age() 656 last_segment = MAIN_SECS(sbi) * sbi->segs_per_sec; in get_victim_by_default() 680 if (sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result))) in get_victim_by_default() 794 (MAIN_SECS(sbi) * sbi->segs_per_sec); in get_victim_by_default() 829 prefree_segments(sbi), free_segments(sbi)); in get_victim_by_default() 1059 .sbi = sbi, in ra_data_block() 1594 f2fs_ra_meta_pages(sbi, GET_SUM_BLOCK(sbi, segno), in do_garbage_collect() 1657 sbi->gc_reclaimed_segs[sbi->gc_mode]++; in do_garbage_collect() 1861 start = MAIN_SECS(sbi) * sbi->segs_per_sec; in free_segment_range() [all …]
|
A D | iostat.c | 27 if (!sbi->iostat_enable) in iostat_info_seq_show() 133 sbi->prev_rw_iostat[i]; in f2fs_record_iostat() 134 sbi->prev_rw_iostat[i] = sbi->rw_iostat[i]; in f2fs_record_iostat() 150 sbi->rw_iostat[i] = 0; in f2fs_reset_iostat() 163 if (!sbi->iostat_enable) in f2fs_update_iostat() 180 f2fs_record_iostat(sbi); in f2fs_update_iostat() 189 struct f2fs_sb_info *sbi = iostat_ctx->sbi; in __update_iostat_latency() local 193 if (!sbi->iostat_enable) in __update_iostat_latency() 236 iostat_ctx->sbi = sbi; in iostat_alloc_and_bind_ctx() 276 sbi->iostat_io_lat = f2fs_kzalloc(sbi, sizeof(struct iostat_lat_info), in f2fs_init_iostat() [all …]
|
A D | debug.c | 44 for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { in f2fs_update_sit_info() 130 si->total_count = (int)sbi->user_block_count / sbi->blocks_per_seg; in update_general_status() 151 if (sbi->node_inode) in update_general_status() 153 if (sbi->meta_inode) in update_general_status() 172 si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg) in update_general_status() 173 * 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg) in update_general_status() 177 * 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg) in update_general_status() 279 if (sbi->gc_thread) in update_mem_info() 308 if (sbi->node_inode) { in update_mem_info() 601 si->sbi = sbi; in f2fs_build_stats() [all …]
|
A D | sysfs.c | 316 sbi->gc_reclaimed_segs[sbi->gc_segment_mode]); in f2fs_sbi_show() 368 up_write(&sbi->sb_lock); in __sbi_store() 423 sbi->current_reserved_blocks = min(sbi->reserved_blocks, in __sbi_store() 424 sbi->user_block_count - valid_user_blocks(sbi)); in __sbi_store() 453 if (sbi->gc_thread) { in __sbi_store() 474 sbi->gc_mode = GC_AT; in __sbi_store() 484 if (!sbi->iostat_enable) in __sbi_store() 527 sbi->am.age_weight = t; in __sbi_store() 542 sbi->gc_reclaimed_segs[sbi->gc_segment_mode] = 0; in __sbi_store() 1187 if (sbi->s_proc) { in f2fs_register_sysfs() [all …]
|
A D | f2fs.h | 106 #define F2FS_OPTION(sbi) ((sbi)->mount_opt) argument 215 #define MAX_DISCARD_BLOCKS(sbi) BLKS_PER_SEC(sbi) argument 2259 sbi->current_reserved_blocks < sbi->reserved_blocks) in dec_valid_block_count() 2260 sbi->current_reserved_blocks = min(sbi->reserved_blocks, in dec_valid_block_count() 2408 sbi->cur_cp_pack = (sbi->cur_cp_pack == 1) ? 2 : 1; in __set_cp_next_pack() 2491 f2fs_bug_on(sbi, !sbi->total_valid_block_count); in dec_valid_node_count() 2492 f2fs_bug_on(sbi, !sbi->total_valid_node_count); in dec_valid_node_count() 2497 sbi->current_reserved_blocks < sbi->reserved_blocks) in dec_valid_node_count() 2650 if (SM_I(sbi) && SM_I(sbi)->fcc_info && in is_inflight_io() 3249 #define __is_large_section(sbi) ((sbi)->segs_per_sec > 1) argument [all …]
|
A D | node.c | 35 if (unlikely(nid < F2FS_ROOT_INO(sbi) || nid >= NM_I(sbi)->max_nid)) { in f2fs_check_nid_range() 134 return f2fs_get_meta_page_retry(sbi, current_nat_addr(sbi, nid)); in get_current_nat_page() 146 dst_off = next_nat_addr(sbi, current_nat_addr(sbi, nid)); in get_next_nat_page() 322 sbi->fsync_seg_id = 0; in f2fs_init_fsync_node_info() 344 sbi->fsync_node_num++; in f2fs_add_fsync_node_entry() 367 f2fs_bug_on(sbi, 1); in f2fs_del_fsync_node_entry() 1334 .sbi = sbi, in read_node_page() 1569 .sbi = sbi, in __write_node_page() 3133 nat_bits_addr = __start_cp_addr(sbi) + sbi->blocks_per_seg - in __get_nat_bitmaps() 3287 sbi->nm_info = f2fs_kzalloc(sbi, sizeof(struct f2fs_nm_info), in f2fs_build_node_manager() [all …]
|
A D | shrinker.c | 34 atomic_read(&sbi->total_ext_node); in __count_extent_cache() 40 struct f2fs_sb_info *sbi; in f2fs_shrink_count() local 57 count += __count_extent_cache(sbi); in f2fs_shrink_count() 60 count += __count_nat_entries(sbi); in f2fs_shrink_count() 63 count += __count_free_nids(sbi); in f2fs_shrink_count() 67 mutex_unlock(&sbi->umount_mutex); in f2fs_shrink_count() 77 struct f2fs_sb_info *sbi; in f2fs_shrink_scan() local 100 sbi->shrinker_run_no = run_no; in f2fs_shrink_scan() 116 mutex_unlock(&sbi->umount_mutex); in f2fs_shrink_scan() 133 f2fs_shrink_extent_tree(sbi, __count_extent_cache(sbi)); in f2fs_leave_shrinker() [all …]
|
/linux/fs/sysv/ |
A D | super.c | 75 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() 316 sbi->s_ndatazones = sbi->s_nzones - sbi->s_firstdatazone; in complete_read_super() 325 sbi->s_ninodes = (sbi->s_firstdatazone - sbi->s_firstinodezone) in complete_read_super() 364 if (!sbi) in sysv_fill_super() [all …]
|
A D | balloc.c | 65 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 …]
|
A D | ialloc.c | 44 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 …]
|
A D | inode.c | 40 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/ |
A D | inode.c | 22 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() 231 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in autofs_fill_super() 232 if (!sbi) in autofs_fill_super() 242 sbi->sb = s; in autofs_fill_super() 292 sbi->min_proto, sbi->max_proto, in autofs_fill_super() 301 sbi->version = sbi->max_proto; in autofs_fill_super() 322 sbi->pipefd, pid_nr(sbi->oz_pgrp)); in autofs_fill_super() [all …]
|
/linux/fs/hfsplus/ |
A D | super.c | 218 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 …]
|
A D | options.c | 132 sbi->umask = (umode_t)tmp; in hfsplus_parse_options() 140 if (!uid_valid(sbi->uid)) { in hfsplus_parse_options() 169 if (sbi->nls) { in hfsplus_parse_options() 175 sbi->nls = load_nls(p); in hfsplus_parse_options() 176 if (!sbi->nls) { in hfsplus_parse_options() 205 if (!sbi->nls) { in hfsplus_parse_options() 208 if (!sbi->nls) in hfsplus_parse_options() 210 if (!sbi->nls) in hfsplus_parse_options() 228 if (sbi->part >= 0) in hfsplus_show_options() 230 if (sbi->session >= 0) in hfsplus_show_options() [all …]
|
/linux/fs/exfat/ |
A D | super.c | 37 unload_nls(sbi->nls_io); in exfat_delayed_free() 40 kfree(sbi); in exfat_delayed_free() 48 exfat_free_bitmap(sbi); in exfat_put_super() 49 brelse(sbi->boot_bh); in exfat_put_super() 476 sbi->cluster_size = 1 << sbi->cluster_size_bits; in exfat_read_boot_sector() 481 sbi->FAT2_start_sector += sbi->num_FAT_sectors; in exfat_read_boot_sector() 657 sbi->nls_io = load_nls(sbi->options.iocharset); in exfat_fill_super() 711 kfree(sbi); in exfat_fill_super() 724 if (sbi) { in exfat_free() 726 kfree(sbi); in exfat_free() [all …]
|
A D | balloc.c | 72 sbi->vol_amap = kmalloc_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 kfree(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 kfree(sbi->vol_amap); in exfat_free_bitmap() 281 if (clu_start >= sbi->num_clusters || range->len < sbi->cluster_size) in exfat_trim_fs() [all …]
|
/linux/fs/omfs/ |
A D | inode.c | 45 err = omfs_allocate_range(dir->i_sb, sbi->s_mirrors, sbi->s_mirrors, in omfs_new_inode() 270 kfree(sbi); in omfs_put_super() 308 if (sbi->s_dmask == sbi->s_fmask) { in omfs_show_options() 356 block = clus_to_blk(sbi, sbi->s_bitmap_ino); in omfs_get_imap() 436 sbi->s_fmask = sbi->s_dmask = option; in parse_options() 465 if (!sbi) in omfs_fill_super() 472 sbi->s_dmask = sbi->s_fmask = current_umask(); in omfs_fill_super() 518 if (sbi->s_blocksize < sbi->s_sys_blocksize || in omfs_fill_super() 535 sbi->s_block_shift = get_bitmask_order(sbi->s_blocksize) - in omfs_fill_super() 556 sbi->s_bitmap_ino > sbi->s_num_blocks) { in omfs_fill_super() [all …]
|
/linux/fs/affs/ |
A D | bitmap.c | 59 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 …]
|
A D | super.c | 71 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 …]
|
/linux/fs/ntfs3/ |
A D | super.c | 474 kfree(sbi); in put_ntfs() 761 sbi->cluster_bits = blksize_bits(sbi->cluster_size); in ntfs_init_from_boot() 763 sbi->mft.lbo = mlcn << sbi->cluster_bits; in ntfs_init_from_boot() 764 sbi->mft.lbo2 = mlcn2 << sbi->cluster_bits; in ntfs_init_from_boot() 780 sbi->cluster_mask = sbi->cluster_size - 1; in ntfs_init_from_boot() 781 sbi->cluster_mask_inv = ~(u64)sbi->cluster_mask; in ntfs_init_from_boot() 816 clusters = sbi->volume.size >> sbi->cluster_bits; in ntfs_init_from_boot() 856 sbi->maxbytes = (clusters << sbi->cluster_bits) - 1; in ntfs_init_from_boot() 1042 sbi->mft.used = ni->i_valid >> sbi->record_bits; in ntfs_fill_super() 1362 if (sbi) in ntfs_fs_free() [all …]
|
/linux/fs/ufs/ |
A D | cylinder.c | 39 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 …]
|