Home
last modified time | relevance | path

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

12345678

/linux/fs/sysv/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
/linux/fs/autofs/
H A Dinode.c12 struct autofs_info *autofs_new_ino(struct autofs_sb_info *sbi) in autofs_new_ino() argument
21 ino->sbi = sbi; in autofs_new_ino()
43 struct autofs_sb_info *sbi = autofs_sbi(sb); in autofs_kill_sb() local
51 if (sbi) { in autofs_kill_sb()
53 autofs_catatonic_mode(sbi); in autofs_kill_sb()
54 put_pid(sbi->oz_pgrp); in autofs_kill_sb()
59 if (sbi) in autofs_kill_sb()
60 kfree_rcu(sbi, rcu); in autofs_kill_sb()
65 struct autofs_sb_info *sbi = autofs_sbi(root->d_sb); in autofs_show_options() local
68 if (!sbi) in autofs_show_options()
[all …]
H A Droot.c69 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_del_active() local
73 spin_lock(&sbi->lookup_lock); in autofs_del_active()
75 spin_unlock(&sbi->lookup_lock); in autofs_del_active()
81 struct autofs_sb_info *sbi = autofs_sbi(dentry->d_sb); in autofs_dir_open() local
86 if (autofs_oz_mode(sbi)) in autofs_dir_open()
98 spin_lock(&sbi->lookup_lock); in autofs_dir_open()
100 spin_unlock(&sbi->lookup_lock); in autofs_dir_open()
103 spin_unlock(&sbi->lookup_lock); in autofs_dir_open()
112 struct autofs_sb_info *sbi = autofs_sbi(de->d_sb); in autofs_dentry_release() local
119 if (sbi) { in autofs_dentry_release()
[all …]
H A Dwaitq.c15 void autofs_catatonic_mode(struct autofs_sb_info *sbi) in autofs_catatonic_mode() argument
19 mutex_lock(&sbi->wq_mutex); in autofs_catatonic_mode()
20 if (sbi->flags & AUTOFS_SBI_CATATONIC) { in autofs_catatonic_mode()
21 mutex_unlock(&sbi->wq_mutex); in autofs_catatonic_mode()
27 sbi->flags |= AUTOFS_SBI_CATATONIC; in autofs_catatonic_mode()
28 wq = sbi->queues; in autofs_catatonic_mode()
29 sbi->queues = NULL; /* Erase all wait queues */ in autofs_catatonic_mode()
40 fput(sbi->pipe); /* Close the pipe */ in autofs_catatonic_mode()
41 sbi->pipe = NULL; in autofs_catatonic_mode()
42 sbi->pipefd = -1; in autofs_catatonic_mode()
[all …]
/linux/fs/f2fs/
H A Diostat.c20 static inline unsigned long long iostat_get_avg_bytes(struct f2fs_sb_info *sbi, in iostat_get_avg_bytes() argument
23 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()
29 name":", sbi->iostat_bytes[type], \
30 sbi->iostat_count[type], \
31 iostat_get_avg_bytes(sbi, type))
36 struct f2fs_sb_info *sbi = F2FS_SB(sb); in iostat_info_seq_show() local
38 if (!sbi->iostat_enable) in iostat_info_seq_show()
88 static inline void __record_iostat_latency(struct f2fs_sb_info *sbi) in __record_iostat_latency() argument
92 struct iostat_lat_info *io_lat = sbi->iostat_io_lat; in __record_iostat_latency()
[all …]
H A 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
34 struct extent_tree_info *eti = &sbi->extent_tree[type]; in __count_extent_cache()
43 struct f2fs_sb_info *sbi; in f2fs_shrink_count() local
50 sbi = list_entry(p, struct f2fs_sb_info, s_list); in f2fs_shrink_count()
53 if (!mutex_trylock(&sbi->umount_mutex)) { in f2fs_shrink_count()
60 count += __count_extent_cache(sbi, EX_READ); in f2fs_shrink_count()
[all …]
H A Dnamei.c73 int f2fs_update_extension_list(struct f2fs_sb_info *sbi, const char *name, in f2fs_update_extension_list() argument
76 __u8 (*extlist)[F2FS_EXTENSION_LEN] = sbi->raw_super->extension_list; in f2fs_update_extension_list()
77 int cold_count = le32_to_cpu(sbi->raw_super->extension_count); in f2fs_update_extension_list()
78 int hot_count = sbi->raw_super->hot_ext_count; in f2fs_update_extension_list()
112 sbi->raw_super->hot_ext_count = hot_count - 1; in f2fs_update_extension_list()
114 sbi->raw_super->extension_count = in f2fs_update_extension_list()
124 sbi->raw_super->hot_ext_count = hot_count + 1; in f2fs_update_extension_list()
134 sbi->raw_super->extension_count = cpu_to_le32(cold_count + 1); in f2fs_update_extension_list()
139 static void set_compress_new_inode(struct f2fs_sb_info *sbi, struct inode *dir, in set_compress_new_inode() argument
142 __u8 (*extlist)[F2FS_EXTENSION_LEN] = sbi->raw_super->extension_list; in set_compress_new_inode()
[all …]
/linux/fs/exfat/
H A Dsuper.c28 static void exfat_free_iocharset(struct exfat_sb_info *sbi) in exfat_free_iocharset() argument
30 if (sbi->options.iocharset != exfat_default_iocharset) in exfat_free_iocharset()
31 kfree(sbi->options.iocharset); in exfat_free_iocharset()
36 struct exfat_sb_info *sbi = EXFAT_SB(sb); in exfat_put_super() local
38 mutex_lock(&sbi->s_lock); in exfat_put_super()
39 exfat_free_bitmap(sbi); in exfat_put_super()
40 brelse(sbi->boot_bh); in exfat_put_super()
41 mutex_unlock(&sbi->s_lock); in exfat_put_super()
46 struct exfat_sb_info *sbi = EXFAT_SB(sb); in exfat_sync_fs() local
56 mutex_lock(&sbi->s_lock); in exfat_sync_fs()
[all …]
H A Dballoc.c32 struct exfat_sb_info *sbi = EXFAT_SB(sb); in exfat_allocate_bitmap() local
37 sbi->map_clu = le32_to_cpu(ep->dentry.bitmap.start_clu); in exfat_allocate_bitmap()
39 need_map_size = ((EXFAT_DATA_CLUSTER_COUNT(sbi) - 1) / BITS_PER_BYTE) in exfat_allocate_bitmap()
51 sbi->map_sectors = ((need_map_size - 1) >> in exfat_allocate_bitmap()
53 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()
59 for (i = 0; i < sbi->map_sectors; i++) { in exfat_allocate_bitmap()
60 sbi->vol_amap[i] = sb_bread(sb, sector + i); in exfat_allocate_bitmap()
61 if (!sbi->vol_amap[i]) { in exfat_allocate_bitmap()
[all …]
/linux/fs/erofs/
H A Dsuper.c147 struct erofs_sb_info *sbi = EROFS_SB(sb); in erofs_init_device() local
156 if (!sbi->devs->flatdev && !dif->path) { in erofs_init_device()
171 } else if (!sbi->devs->flatdev) { in erofs_init_device()
172 file = erofs_is_fileio_mode(sbi) ? in erofs_init_device()
179 if (!erofs_is_fileio_mode(sbi)) { in erofs_init_device()
191 sbi->total_blocks += dif->blocks; in erofs_init_device()
199 struct erofs_sb_info *sbi = EROFS_SB(sb); in erofs_scan_devices() local
206 sbi->total_blocks = sbi->dif0.blocks; in erofs_scan_devices()
207 if (!erofs_sb_has_device_table(sbi)) in erofs_scan_devices()
212 if (sbi->devs->extra_devices && in erofs_scan_devices()
[all …]
/linux/fs/omfs/
H A 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 …]
H A Dbitmap.c12 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_count_free() local
15 for (i = 0; i < sbi->s_imap_size; i++) in omfs_count_free()
16 sum += nbits - bitmap_weight(sbi->s_imap[i], nbits); in omfs_count_free()
54 struct omfs_sb_info *sbi = OMFS_SB(sb); in set_run() local
57 bh = sb_bread(sb, clus_to_blk(sbi, sbi->s_bitmap_ino) + map); in set_run()
69 clus_to_blk(sbi, sbi->s_bitmap_ino) + map); in set_run()
74 set_bit(bit, sbi->s_imap[map]); in set_run()
77 clear_bit(bit, sbi->s_imap[map]); in set_run()
94 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_allocate_block() local
104 mutex_lock(&sbi->s_bitmap_lock); in omfs_allocate_block()
[all …]
/linux/fs/affs/
H A 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 …]
/linux/fs/ntfs3/
H A Dsuper.c82 struct ntfs_sb_info *sbi = sb->s_fs_info; in ntfs_printk() local
85 if (!___ratelimit(&sbi->msg_ratelimit, "ntfs3")) in ntfs_printk()
109 struct ntfs_sb_info *sbi = sb->s_fs_info; in ntfs_inode_printk() local
115 if (!___ratelimit(&sbi->msg_ratelimit, "ntfs3")) in ntfs_inode_printk()
408 struct ntfs_sb_info *sbi = sb->s_fs_info; in ntfs_fs_reconfigure() local
419 if (ro_rw && (sbi->flags & NTFS_FLAGS_NEED_REPLAY)) { in ntfs_fs_reconfigure()
432 if (new_opts->nls != sbi->options->nls) in ntfs_fs_reconfigure()
437 if (ro_rw && (sbi->volume.flags & VOLUME_FLAG_DIRTY) && in ntfs_fs_reconfigure()
446 swap(sbi->options, fc->fs_private); in ntfs_fs_reconfigure()
470 struct ntfs_sb_info *sbi = sb->s_fs_info; in ntfs3_volinfo() local
[all …]
/linux/fs/ext2/
H A 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 …]
/linux/fs/minix/
H A Dinode.c45 struct minix_sb_info *sbi = minix_sb(sb); in minix_put_super() local
48 if (sbi->s_version != MINIX_V3) /* s_state is now out from V3 sb */ in minix_put_super()
49 sbi->s_ms->s_state = sbi->s_mount_state; in minix_put_super()
50 mark_buffer_dirty(sbi->s_sbh); in minix_put_super()
52 for (i = 0; i < sbi->s_imap_blocks; i++) in minix_put_super()
53 brelse(sbi->s_imap[i]); in minix_put_super()
54 for (i = 0; i < sbi->s_zmap_blocks; i++) in minix_put_super()
55 brelse(sbi->s_zmap[i]); in minix_put_super()
56 brelse (sbi->s_sbh); in minix_put_super()
57 kfree(sbi->s_imap); in minix_put_super()
[all …]
/linux/fs/jfs/
H A Djfs_mount.c73 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_mount() local
93 sbi->ipaimap = ipaimap; in jfs_mount()
116 sbi->ipbmap = ipbmap; in jfs_mount()
137 if ((sbi->mntflag & JFS_BAD_SAIT) == 0) { in jfs_mount()
144 sbi->ipaimap2 = ipaimap2; in jfs_mount()
158 sbi->ipaimap2 = NULL; in jfs_mount()
182 sbi->ipimap = ipimap; in jfs_mount()
223 struct jfs_sb_info *sbi = JFS_SBI(sb); in jfs_mount_rw() local
232 if (chkSuper(sb) || (sbi->state != FM_CLEAN)) in jfs_mount_rw()
235 truncate_inode_pages(sbi->ipimap->i_mapping, 0); in jfs_mount_rw()
[all …]
/linux/fs/fat/
H A Dinode.c123 struct msdos_sb_info *sbi = MSDOS_SB(sb); in __fat_get_block() local
146 offset = (unsigned long)iblock & (sbi->sec_per_clus - 1); in __fat_get_block()
159 mapped_blocks = sbi->sec_per_clus - offset; in __fat_get_block()
376 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_hash_init() local
379 spin_lock_init(&sbi->inode_hash_lock); in fat_hash_init()
381 INIT_HLIST_HEAD(&sbi->inode_hashtable[i]); in fat_hash_init()
391 struct msdos_sb_info *sbi = MSDOS_SB(sb); in dir_hash_init() local
394 spin_lock_init(&sbi->dir_hash_lock); in dir_hash_init()
396 INIT_HLIST_HEAD(&sbi->dir_hashtable[i]); in dir_hash_init()
401 struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); in fat_attach() local
[all …]
H A Dfatent.c26 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat12_ent_blocknr() local
28 WARN_ON(!fat_valid_entry(sbi, entry)); in fat12_ent_blocknr()
30 *blocknr = sbi->fat_start + (bytes >> sb->s_blocksize_bits); in fat12_ent_blocknr()
36 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_ent_blocknr() local
37 int bytes = (entry << sbi->fatent_shift); in fat_ent_blocknr()
38 WARN_ON(!fat_valid_entry(sbi, entry)); in fat_ent_blocknr()
40 *blocknr = sbi->fat_start + (bytes >> sb->s_blocksize_bits); in fat_ent_blocknr()
279 static inline void lock_fat(struct msdos_sb_info *sbi) in lock_fat() argument
281 mutex_lock(&sbi->fat_lock); in lock_fat()
284 static inline void unlock_fat(struct msdos_sb_info *sbi) in unlock_fat() argument
[all …]
/linux/fs/zonefs/
H A Dsysfs.c15 ssize_t (*show)(struct zonefs_sb_info *sbi, char *buf);
26 struct zonefs_sb_info *sbi = in zonefs_sysfs_attr_show() local
34 return zonefs_attr->show(sbi, buf); in zonefs_sysfs_attr_show()
37 static ssize_t max_wro_seq_files_show(struct zonefs_sb_info *sbi, char *buf) in max_wro_seq_files_show() argument
39 return sysfs_emit(buf, "%u\n", sbi->s_max_wro_seq_files); in max_wro_seq_files_show()
43 static ssize_t nr_wro_seq_files_show(struct zonefs_sb_info *sbi, char *buf) in nr_wro_seq_files_show() argument
45 return sysfs_emit(buf, "%d\n", atomic_read(&sbi->s_wro_seq_files)); in nr_wro_seq_files_show()
49 static ssize_t max_active_seq_files_show(struct zonefs_sb_info *sbi, char *buf) in max_active_seq_files_show() argument
51 return sysfs_emit(buf, "%u\n", sbi->s_max_active_seq_files); in max_active_seq_files_show()
55 static ssize_t nr_active_seq_files_show(struct zonefs_sb_info *sbi, char *buf) in nr_active_seq_files_show() argument
[all …]
/linux/fs/ext4/
H A Dsuper.c293 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_superblock_csum() local
297 csum = ext4_chksum(sbi, ~0, (char *)es, offset); in ext4_superblock_csum()
468 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_maybe_update_superblock() local
469 struct ext4_super_block *es = sbi->s_es; in ext4_maybe_update_superblock()
470 journal_t *journal = sbi->s_journal; in ext4_maybe_update_superblock()
486 lifetime_write_kbytes = sbi->s_kbytes_written + in ext4_maybe_update_superblock()
488 sbi->s_sectors_written_start) >> 1); in ext4_maybe_update_superblock()
505 struct ext4_sb_info *sbi = EXT4_SB(sb); in ext4_journal_commit_callback() local
514 spin_lock(&sbi->s_md_lock); in ext4_journal_commit_callback()
519 spin_unlock(&sbi->s_md_lock); in ext4_journal_commit_callback()
[all …]
/linux/fs/vboxsf/
H A Dsuper.c115 struct vboxsf_sbi *sbi; in vboxsf_fill_super() local
125 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in vboxsf_fill_super()
126 if (!sbi) in vboxsf_fill_super()
129 sbi->o = ctx->o; in vboxsf_fill_super()
130 idr_init(&sbi->ino_idr); in vboxsf_fill_super()
131 spin_lock_init(&sbi->ino_idr_lock); in vboxsf_fill_super()
132 sbi->next_generation = 1; in vboxsf_fill_super()
133 sbi->bdi_id = -1; in vboxsf_fill_super()
139 sbi->nls = load_nls_default(); in vboxsf_fill_super()
141 sbi->nls = load_nls(nls_name); in vboxsf_fill_super()
[all …]

12345678