Home
last modified time | relevance | path

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

1234567

/fs/f2fs/
Dsuper.c60 void f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned int rate, in f2fs_build_fault_attr() argument
63 struct f2fs_fault_info *ffi = &F2FS_OPTION(sbi).fault_info; in f2fs_build_fault_attr()
218 void f2fs_printk(struct f2fs_sb_info *sbi, const char *fmt, ...) in f2fs_printk() argument
230 KERN_SOH_ASCII, level, sbi->sb->s_id, &vaf); in f2fs_printk()
265 static inline void limit_reserve_root(struct f2fs_sb_info *sbi) in limit_reserve_root() argument
267 block_t limit = min((sbi->user_block_count >> 3), in limit_reserve_root()
268 sbi->user_block_count - sbi->reserved_blocks); in limit_reserve_root()
271 if (test_opt(sbi, RESERVE_ROOT) && in limit_reserve_root()
272 F2FS_OPTION(sbi).root_reserved_blocks > limit) { in limit_reserve_root()
273 F2FS_OPTION(sbi).root_reserved_blocks = limit; in limit_reserve_root()
[all …]
Dsegment.h32 #define IS_CURSEG(sbi, seg) \ argument
33 (((seg) == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno) || \
34 ((seg) == CURSEG_I(sbi, CURSEG_WARM_DATA)->segno) || \
35 ((seg) == CURSEG_I(sbi, CURSEG_COLD_DATA)->segno) || \
36 ((seg) == CURSEG_I(sbi, CURSEG_HOT_NODE)->segno) || \
37 ((seg) == CURSEG_I(sbi, CURSEG_WARM_NODE)->segno) || \
38 ((seg) == CURSEG_I(sbi, CURSEG_COLD_NODE)->segno))
40 #define IS_CURSEC(sbi, secno) \ argument
41 (((secno) == CURSEG_I(sbi, CURSEG_HOT_DATA)->segno / \
42 (sbi)->segs_per_sec) || \
[all …]
Dcheckpoint.c26 void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io) in f2fs_stop_checkpoint() argument
28 f2fs_build_fault_attr(sbi, 0, 0); in f2fs_stop_checkpoint()
29 set_ckpt_flags(sbi, CP_ERROR_FLAG); in f2fs_stop_checkpoint()
31 f2fs_flush_merged_writes(sbi); in f2fs_stop_checkpoint()
37 struct page *f2fs_grab_meta_page(struct f2fs_sb_info *sbi, pgoff_t index) in f2fs_grab_meta_page() argument
39 struct address_space *mapping = META_MAPPING(sbi); in f2fs_grab_meta_page()
53 static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index, in __get_meta_page() argument
56 struct address_space *mapping = META_MAPPING(sbi); in __get_meta_page()
59 .sbi = sbi, in __get_meta_page()
89 f2fs_update_iostat(sbi, FS_META_READ_IO, F2FS_BLKSIZE); in __get_meta_page()
[all …]
Dsegment.c169 bool f2fs_need_SSR(struct f2fs_sb_info *sbi) in f2fs_need_SSR() argument
171 int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES); in f2fs_need_SSR()
172 int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS); in f2fs_need_SSR()
173 int imeta_secs = get_blocktype_secs(sbi, F2FS_DIRTY_IMETA); in f2fs_need_SSR()
175 if (f2fs_lfs_mode(sbi)) in f2fs_need_SSR()
177 if (sbi->gc_mode == GC_URGENT) in f2fs_need_SSR()
179 if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) in f2fs_need_SSR()
182 return free_sections(sbi) <= (node_secs + 2 * dent_secs + imeta_secs + in f2fs_need_SSR()
183 SM_I(sbi)->min_ssr_sections + reserved_sections(sbi)); in f2fs_need_SSR()
214 struct f2fs_sb_info *sbi = F2FS_I_SB(inode); in __revoke_inmem_pages() local
[all …]
Dgc.c26 struct f2fs_sb_info *sbi = data; in gc_thread_func() local
27 struct f2fs_gc_kthread *gc_th = sbi->gc_thread; in gc_thread_func()
28 wait_queue_head_t *wq = &sbi->gc_thread->gc_wait_queue_head; in gc_thread_func()
47 stat_other_skip_bggc_count(sbi); in gc_thread_func()
53 if (sbi->sb->s_writers.frozen >= SB_FREEZE_WRITE) { in gc_thread_func()
55 stat_other_skip_bggc_count(sbi); in gc_thread_func()
59 if (time_to_inject(sbi, FAULT_CHECKPOINT)) { in gc_thread_func()
60 f2fs_show_injection_info(sbi, FAULT_CHECKPOINT); in gc_thread_func()
61 f2fs_stop_checkpoint(sbi, false); in gc_thread_func()
64 if (!sb_start_write_trylock(sbi->sb)) { in gc_thread_func()
[all …]
Ddebug.c32 void f2fs_update_sit_info(struct f2fs_sb_info *sbi) in f2fs_update_sit_info() argument
34 struct f2fs_stat_info *si = F2FS_STAT(sbi); in f2fs_update_sit_info()
42 blks_per_sec = BLKS_PER_SEC(sbi); in f2fs_update_sit_info()
44 for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { in f2fs_update_sit_info()
45 vblocks = get_valid_blocks(sbi, segno, true); in f2fs_update_sit_info()
54 dist = div_u64(MAIN_SECS(sbi) * hblks_per_sec * hblks_per_sec, 100); in f2fs_update_sit_info()
63 static void update_general_status(struct f2fs_sb_info *sbi) in update_general_status() argument
65 struct f2fs_stat_info *si = F2FS_STAT(sbi); in update_general_status()
66 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi); in update_general_status()
76 si->hit_largest = atomic64_read(&sbi->read_hit_largest); in update_general_status()
[all …]
Dsysfs.c50 struct f2fs_sb_info *sbi, char *buf);
52 static unsigned char *__struct_ptr(struct f2fs_sb_info *sbi, int struct_type) in __struct_ptr() argument
55 return (unsigned char *)sbi->gc_thread; in __struct_ptr()
57 return (unsigned char *)SM_I(sbi); in __struct_ptr()
59 return (unsigned char *)SM_I(sbi)->dcc_info; in __struct_ptr()
61 return (unsigned char *)NM_I(sbi); in __struct_ptr()
63 return (unsigned char *)sbi; in __struct_ptr()
67 return (unsigned char *)&F2FS_OPTION(sbi).fault_info; in __struct_ptr()
71 return (unsigned char *)F2FS_STAT(sbi); in __struct_ptr()
77 struct f2fs_sb_info *sbi, char *buf) in dirty_segments_show() argument
[all …]
Df2fs.h32 #define f2fs_bug_on(sbi, condition) BUG_ON(condition) argument
34 #define f2fs_bug_on(sbi, condition) \ argument
38 set_sbi_flag(sbi, SBI_NEED_FSCK); \
102 #define F2FS_OPTION(sbi) ((sbi)->mount_opt) argument
103 #define clear_opt(sbi, option) (F2FS_OPTION(sbi).opt &= ~F2FS_MOUNT_##option) argument
104 #define set_opt(sbi, option) (F2FS_OPTION(sbi).opt |= F2FS_MOUNT_##option) argument
105 #define test_opt(sbi, option) (F2FS_OPTION(sbi).opt & F2FS_MOUNT_##option) argument
175 #define F2FS_HAS_FEATURE(sbi, mask) __F2FS_HAS_FEATURE(sbi->raw_super, mask) argument
176 #define F2FS_SET_FEATURE(sbi, mask) \ argument
177 (sbi->raw_super->feature |= cpu_to_le32(mask))
[all …]
Dnode.c33 int f2fs_check_nid_range(struct f2fs_sb_info *sbi, nid_t nid) in f2fs_check_nid_range() argument
35 if (unlikely(nid < F2FS_ROOT_INO(sbi) || nid >= NM_I(sbi)->max_nid)) { in f2fs_check_nid_range()
36 set_sbi_flag(sbi, SBI_NEED_FSCK); in f2fs_check_nid_range()
37 f2fs_warn(sbi, "%s: out-of-range nid=%x, run fsck to fix.", in f2fs_check_nid_range()
44 bool f2fs_available_free_memory(struct f2fs_sb_info *sbi, int type) in f2fs_available_free_memory() argument
46 struct f2fs_nm_info *nm_i = NM_I(sbi); in f2fs_available_free_memory()
68 if (excess_cached_nats(sbi)) in f2fs_available_free_memory()
71 if (sbi->sb->s_bdi->wb.dirty_exceeded) in f2fs_available_free_memory()
73 mem_size = get_pages(sbi, F2FS_DIRTY_DENTS); in f2fs_available_free_memory()
79 mem_size += sbi->im[i].ino_num * in f2fs_available_free_memory()
[all …]
Dshrinker.c19 static unsigned long __count_nat_entries(struct f2fs_sb_info *sbi) in __count_nat_entries() argument
21 return NM_I(sbi)->nat_cnt[RECLAIMABLE_NAT]; in __count_nat_entries()
24 static unsigned long __count_free_nids(struct f2fs_sb_info *sbi) in __count_free_nids() argument
26 long count = NM_I(sbi)->nid_cnt[FREE_NID] - MAX_FREE_NIDS; in __count_free_nids()
31 static unsigned long __count_extent_cache(struct f2fs_sb_info *sbi) in __count_extent_cache() argument
33 return atomic_read(&sbi->total_zombie_tree) + in __count_extent_cache()
34 atomic_read(&sbi->total_ext_node); in __count_extent_cache()
40 struct f2fs_sb_info *sbi; in f2fs_shrink_count() local
47 sbi = list_entry(p, struct f2fs_sb_info, s_list); in f2fs_shrink_count()
50 if (!mutex_trylock(&sbi->umount_mutex)) { in f2fs_shrink_count()
[all …]
/fs/sysv/
Dsuper.c48 static void detected_xenix(struct sysv_sb_info *sbi, unsigned *max_links) in detected_xenix() argument
50 struct buffer_head *bh1 = sbi->s_bh1; in detected_xenix()
51 struct buffer_head *bh2 = sbi->s_bh2; in detected_xenix()
64 sbi->s_fic_size = XENIX_NICINOD; in detected_xenix()
65 sbi->s_flc_size = XENIX_NICFREE; in detected_xenix()
66 sbi->s_sbd1 = (char *)sbd1; in detected_xenix()
67 sbi->s_sbd2 = (char *)sbd2; in detected_xenix()
68 sbi->s_sb_fic_count = &sbd1->s_ninode; in detected_xenix()
69 sbi->s_sb_fic_inodes = &sbd1->s_inode[0]; in detected_xenix()
70 sbi->s_sb_total_free_inodes = &sbd2->s_tinode; in detected_xenix()
[all …]
Dballoc.c45 struct sysv_sb_info * sbi = SYSV_SB(sb); in sysv_free_block() local
47 sysv_zone_t *blocks = sbi->s_bcache; in sysv_free_block()
49 unsigned block = fs32_to_cpu(sbi, nr); in sysv_free_block()
56 if (sbi->s_type == FSTYPE_AFS) in sysv_free_block()
59 if (block < sbi->s_firstdatazone || block >= sbi->s_nzones) { in sysv_free_block()
64 mutex_lock(&sbi->s_lock); in sysv_free_block()
65 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_free_block()
67 if (count > sbi->s_flc_size) { in sysv_free_block()
69 mutex_unlock(&sbi->s_lock); in sysv_free_block()
76 if (count == sbi->s_flc_size || count == 0) { in sysv_free_block()
[all …]
Dialloc.c42 struct sysv_sb_info *sbi = SYSV_SB(sb); in sv_sb_fic_inode() local
44 if (sbi->s_bh1 == sbi->s_bh2) in sv_sb_fic_inode()
45 return &sbi->s_sb_fic_inodes[i]; in sv_sb_fic_inode()
50 return (sysv_ino_t*)(sbi->s_sbd1 + offset); in sv_sb_fic_inode()
52 return (sysv_ino_t*)(sbi->s_sbd2 + offset); in sv_sb_fic_inode()
59 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_raw_inode() local
61 int block = sbi->s_firstinodezone + sbi->s_block_base; in sysv_raw_inode()
63 block += (ino-1) >> sbi->s_inodes_per_block_bits; in sysv_raw_inode()
68 return res + ((ino-1) & sbi->s_inodes_per_block_1); in sysv_raw_inode()
73 struct sysv_sb_info *sbi = SYSV_SB(sb); in refill_free_cache() local
[all …]
Dinode.c37 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_sync_fs() local
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()
48 if (sbi->s_type == FSTYPE_SYSV4) { 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()
52 mark_buffer_dirty(sbi->s_bh2); in sysv_sync_fs()
55 mutex_unlock(&sbi->s_lock); in sysv_sync_fs()
62 struct sysv_sb_info *sbi = SYSV_SB(sb); in sysv_remount() local
[all …]
/fs/autofs/
Dinode.c13 struct autofs_info *autofs_new_ino(struct autofs_sb_info *sbi) in autofs_new_ino() argument
22 ino->sbi = sbi; in autofs_new_ino()
41 struct autofs_sb_info *sbi = autofs_sbi(sb); in autofs_kill_sb() local
49 if (sbi) { in autofs_kill_sb()
51 autofs_catatonic_mode(sbi); in autofs_kill_sb()
52 put_pid(sbi->oz_pgrp); in autofs_kill_sb()
57 if (sbi) in autofs_kill_sb()
58 kfree_rcu(sbi, rcu); in autofs_kill_sb()
63 struct autofs_sb_info *sbi = autofs_sbi(root->d_sb); in autofs_show_options() local
66 if (!sbi) in autofs_show_options()
[all …]
Droot.c65 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_del_active() local
69 spin_lock(&sbi->lookup_lock); in autofs_del_active()
71 spin_unlock(&sbi->lookup_lock); in autofs_del_active()
77 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_dir_open() local
81 if (autofs_oz_mode(sbi)) in autofs_dir_open()
93 spin_lock(&sbi->lookup_lock); in autofs_dir_open()
95 spin_unlock(&sbi->lookup_lock); in autofs_dir_open()
98 spin_unlock(&sbi->lookup_lock); in autofs_dir_open()
107 struct autofs_sb_info *sbi = autofs_sbi(de->d_sb); in autofs_dentry_release() local
114 if (sbi) { in autofs_dentry_release()
[all …]
/fs/hfsplus/
Dsuper.c102 struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); in hfsplus_system_write_inode() local
103 struct hfsplus_vh *vhdr = sbi->s_vhdr; in hfsplus_system_write_inode()
110 tree = sbi->ext_tree; in hfsplus_system_write_inode()
114 tree = sbi->cat_tree; in hfsplus_system_write_inode()
124 tree = sbi->attr_tree; in hfsplus_system_write_inode()
131 set_bit(HFSPLUS_SB_WRITEBACKUP, &sbi->flags); in hfsplus_system_write_inode()
178 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_sync_fs() local
179 struct hfsplus_vh *vhdr = sbi->s_vhdr; in hfsplus_sync_fs()
196 error = filemap_write_and_wait(sbi->cat_tree->inode->i_mapping); in hfsplus_sync_fs()
197 error2 = filemap_write_and_wait(sbi->ext_tree->inode->i_mapping); in hfsplus_sync_fs()
[all …]
Doptions.c100 int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) in hfsplus_parse_options() argument
116 if (match_fourchar(&args[0], &sbi->creator)) { in hfsplus_parse_options()
122 if (match_fourchar(&args[0], &sbi->type)) { in hfsplus_parse_options()
132 sbi->umask = (umode_t)tmp; in hfsplus_parse_options()
139 sbi->uid = make_kuid(current_user_ns(), (uid_t)tmp); in hfsplus_parse_options()
140 if (!uid_valid(sbi->uid)) { in hfsplus_parse_options()
144 set_bit(HFSPLUS_SB_UID, &sbi->flags); in hfsplus_parse_options()
152 sbi->gid = make_kgid(current_user_ns(), (gid_t)tmp); in hfsplus_parse_options()
153 if (!gid_valid(sbi->gid)) { in hfsplus_parse_options()
157 set_bit(HFSPLUS_SB_GID, &sbi->flags); in hfsplus_parse_options()
[all …]
/fs/omfs/
Dinode.c26 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_bread() local
27 if (block >= sbi->s_num_blocks) in omfs_bread()
30 return sb_bread(sb, clus_to_blk(sbi, block)); in omfs_bread()
39 struct omfs_sb_info *sbi = OMFS_SB(dir->i_sb); in omfs_new_inode() local
45 err = omfs_allocate_range(dir->i_sb, sbi->s_mirrors, sbi->s_mirrors, in omfs_new_inode()
59 inode->i_size = sbi->s_sys_blocksize; in omfs_new_inode()
105 struct omfs_sb_info *sbi = OMFS_SB(inode->i_sb); in __omfs_write_inode() local
130 oi->i_head.h_body_size = cpu_to_be32(sbi->s_sys_blocksize - in __omfs_write_inode()
151 for (i = 1; i < sbi->s_mirrors; i++) { in __omfs_write_inode()
204 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_iget() local
[all …]
/fs/affs/
Dbitmap.c41 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_free_block() local
49 if (block > sbi->s_partition_size) in affs_free_block()
52 blk = block - sbi->s_reserved; in affs_free_block()
53 bmap = blk / sbi->s_bmap_bits; in affs_free_block()
54 bit = blk % sbi->s_bmap_bits; in affs_free_block()
55 bm = &sbi->s_bitmap[bmap]; in affs_free_block()
57 mutex_lock(&sbi->s_bmlock); in affs_free_block()
59 bh = sbi->s_bmap_bh; in affs_free_block()
60 if (sbi->s_last_bmap != bmap) { in affs_free_block()
65 sbi->s_bmap_bh = bh; in affs_free_block()
[all …]
Dsuper.c35 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_commit_super() local
36 struct buffer_head *bh = sbi->s_root_bh; in affs_commit_super()
52 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_put_super() local
55 cancel_delayed_work_sync(&sbi->sb_work); in affs_put_super()
67 struct affs_sb_info *sbi; in flush_superblock() local
70 sbi = container_of(work, struct affs_sb_info, sb_work.work); in flush_superblock()
71 sb = sbi->sb; in flush_superblock()
73 spin_lock(&sbi->work_lock); in flush_superblock()
74 sbi->work_queued = 0; in flush_superblock()
75 spin_unlock(&sbi->work_lock); in flush_superblock()
[all …]
/fs/ufs/
Dcylinder.c32 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_read_cylinder() local
39 uspi = sbi->s_uspi; in ufs_read_cylinder()
40 ucpi = sbi->s_ucpi[bitmap_nr]; in ufs_read_cylinder()
41 ucg = (struct ufs_cylinder_group *)sbi->s_ucg[cgno]->b_data; in ufs_read_cylinder()
48 UCPI_UBH(ucpi)->bh[0] = sbi->s_ucg[cgno]; in ufs_read_cylinder()
52 sbi->s_cgno[bitmap_nr] = cgno; in ufs_read_cylinder()
74 brelse (sbi->s_ucg[j]); in ufs_read_cylinder()
75 sbi->s_cgno[bitmap_nr] = UFS_CGNO_EMPTY; in ufs_read_cylinder()
85 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_put_cylinder() local
93 uspi = sbi->s_uspi; in ufs_put_cylinder()
[all …]
/fs/ext2/
Dsuper.c54 struct ext2_sb_info *sbi = EXT2_SB(sb); in ext2_error() local
55 struct ext2_super_block *es = sbi->s_es; in ext2_error()
58 spin_lock(&sbi->s_lock); in ext2_error()
59 sbi->s_mount_state |= EXT2_ERROR_FS; in ext2_error()
61 spin_unlock(&sbi->s_lock); in ext2_error()
148 struct ext2_sb_info *sbi = EXT2_SB(sb); in ext2_put_super() local
152 ext2_xattr_destroy_cache(sbi->s_ea_block_cache); in ext2_put_super()
153 sbi->s_ea_block_cache = NULL; in ext2_put_super()
156 struct ext2_super_block *es = sbi->s_es; in ext2_put_super()
158 spin_lock(&sbi->s_lock); in ext2_put_super()
[all …]
/fs/hpfs/
Dsuper.c113 static void free_sbi(struct hpfs_sb_info *sbi) in free_sbi() argument
115 kfree(sbi->sb_cp_table); in free_sbi()
116 kfree(sbi->sb_bmp_dir); in free_sbi()
117 kfree(sbi); in free_sbi()
167 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_get_free_dnodes() local
168 if (sbi->sb_n_free_dnodes == (unsigned)-1) { in hpfs_get_free_dnodes()
169 unsigned c = hpfs_count_one_bitmap(s, sbi->sb_dmap); in hpfs_get_free_dnodes()
172 sbi->sb_n_free_dnodes = c; in hpfs_get_free_dnodes()
174 return sbi->sb_n_free_dnodes; in hpfs_get_free_dnodes()
180 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_statfs() local
[all …]
/fs/minix/
Dinode.c44 struct minix_sb_info *sbi = minix_sb(sb); in minix_put_super() local
47 if (sbi->s_version != MINIX_V3) /* s_state is now out from V3 sb */ in minix_put_super()
48 sbi->s_ms->s_state = sbi->s_mount_state; in minix_put_super()
49 mark_buffer_dirty(sbi->s_sbh); in minix_put_super()
51 for (i = 0; i < sbi->s_imap_blocks; i++) in minix_put_super()
52 brelse(sbi->s_imap[i]); in minix_put_super()
53 for (i = 0; i < sbi->s_zmap_blocks; i++) in minix_put_super()
54 brelse(sbi->s_zmap[i]); in minix_put_super()
55 brelse (sbi->s_sbh); in minix_put_super()
56 kfree(sbi->s_imap); in minix_put_super()
[all …]

1234567