Lines Matching full:sbi

44 	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()
58 kfree(sbi); in minix_put_super()
118 struct minix_sb_info * sbi = minix_sb(sb); in minix_remount() local
122 ms = sbi->s_ms; in minix_remount()
127 !(sbi->s_mount_state & MINIX_VALID_FS)) in minix_remount()
130 if (sbi->s_version != MINIX_V3) in minix_remount()
131 ms->s_state = sbi->s_mount_state; in minix_remount()
132 mark_buffer_dirty(sbi->s_sbh); in minix_remount()
135 if (sbi->s_version != MINIX_V3) { in minix_remount()
136 sbi->s_mount_state = ms->s_state; in minix_remount()
139 sbi->s_mount_state = MINIX_VALID_FS; in minix_remount()
141 mark_buffer_dirty(sbi->s_sbh); in minix_remount()
143 if (!(sbi->s_mount_state & MINIX_VALID_FS)) in minix_remount()
146 else if ((sbi->s_mount_state & MINIX_ERROR_FS)) in minix_remount()
155 struct minix_sb_info *sbi = minix_sb(sb); in minix_check_superblock() local
157 if (sbi->s_imap_blocks == 0 || sbi->s_zmap_blocks == 0) in minix_check_superblock()
165 if (sbi->s_version == MINIX_V1 && in minix_check_superblock()
180 struct minix_sb_info *sbi; in minix_fill_super() local
183 sbi = kzalloc(sizeof(struct minix_sb_info), GFP_KERNEL); in minix_fill_super()
184 if (!sbi) in minix_fill_super()
186 s->s_fs_info = sbi; in minix_fill_super()
198 sbi->s_ms = ms; in minix_fill_super()
199 sbi->s_sbh = bh; in minix_fill_super()
200 sbi->s_mount_state = ms->s_state; in minix_fill_super()
201 sbi->s_ninodes = ms->s_ninodes; in minix_fill_super()
202 sbi->s_nzones = ms->s_nzones; in minix_fill_super()
203 sbi->s_imap_blocks = ms->s_imap_blocks; in minix_fill_super()
204 sbi->s_zmap_blocks = ms->s_zmap_blocks; in minix_fill_super()
205 sbi->s_firstdatazone = ms->s_firstdatazone; in minix_fill_super()
206 sbi->s_log_zone_size = ms->s_log_zone_size; in minix_fill_super()
210 sbi->s_version = MINIX_V1; in minix_fill_super()
211 sbi->s_dirsize = 16; in minix_fill_super()
212 sbi->s_namelen = 14; in minix_fill_super()
215 sbi->s_version = MINIX_V1; in minix_fill_super()
216 sbi->s_dirsize = 32; in minix_fill_super()
217 sbi->s_namelen = 30; in minix_fill_super()
220 sbi->s_version = MINIX_V2; in minix_fill_super()
221 sbi->s_nzones = ms->s_zones; in minix_fill_super()
222 sbi->s_dirsize = 16; in minix_fill_super()
223 sbi->s_namelen = 14; in minix_fill_super()
226 sbi->s_version = MINIX_V2; in minix_fill_super()
227 sbi->s_nzones = ms->s_zones; in minix_fill_super()
228 sbi->s_dirsize = 32; in minix_fill_super()
229 sbi->s_namelen = 30; in minix_fill_super()
234 sbi->s_imap_blocks = m3s->s_imap_blocks; in minix_fill_super()
235 sbi->s_zmap_blocks = m3s->s_zmap_blocks; in minix_fill_super()
236 sbi->s_firstdatazone = m3s->s_firstdatazone; in minix_fill_super()
237 sbi->s_log_zone_size = m3s->s_log_zone_size; in minix_fill_super()
239 sbi->s_ninodes = m3s->s_ninodes; in minix_fill_super()
240 sbi->s_nzones = m3s->s_zones; in minix_fill_super()
241 sbi->s_dirsize = 64; in minix_fill_super()
242 sbi->s_namelen = 60; in minix_fill_super()
243 sbi->s_version = MINIX_V3; in minix_fill_super()
244 sbi->s_mount_state = MINIX_VALID_FS; in minix_fill_super()
256 i = (sbi->s_imap_blocks + sbi->s_zmap_blocks) * sizeof(bh); in minix_fill_super()
260 sbi->s_imap = &map[0]; in minix_fill_super()
261 sbi->s_zmap = &map[sbi->s_imap_blocks]; in minix_fill_super()
264 for (i=0 ; i < sbi->s_imap_blocks ; i++) { in minix_fill_super()
265 if (!(sbi->s_imap[i]=sb_bread(s, block))) in minix_fill_super()
269 for (i=0 ; i < sbi->s_zmap_blocks ; i++) { in minix_fill_super()
270 if (!(sbi->s_zmap[i]=sb_bread(s, block))) in minix_fill_super()
275 minix_set_bit(0,sbi->s_imap[0]->b_data); in minix_fill_super()
276 minix_set_bit(0,sbi->s_zmap[0]->b_data); in minix_fill_super()
282 block = minix_blocks_needed(sbi->s_ninodes, s->s_blocksize); in minix_fill_super()
283 if (sbi->s_imap_blocks < block) { in minix_fill_super()
290 (sbi->s_nzones - sbi->s_firstdatazone + 1), in minix_fill_super()
292 if (sbi->s_zmap_blocks < block) { in minix_fill_super()
314 if (sbi->s_version != MINIX_V3) /* s_state is now out from V3 sb */ in minix_fill_super()
318 if (!(sbi->s_mount_state & MINIX_VALID_FS)) in minix_fill_super()
321 else if (sbi->s_mount_state & MINIX_ERROR_FS) in minix_fill_super()
335 for (i = 0; i < sbi->s_imap_blocks; i++) in minix_fill_super()
336 brelse(sbi->s_imap[i]); in minix_fill_super()
337 for (i = 0; i < sbi->s_zmap_blocks; i++) in minix_fill_super()
338 brelse(sbi->s_zmap[i]); in minix_fill_super()
339 kfree(sbi->s_imap); in minix_fill_super()
369 kfree(sbi); in minix_fill_super()
376 struct minix_sb_info *sbi = minix_sb(sb); in minix_statfs() local
380 buf->f_blocks = (sbi->s_nzones - sbi->s_firstdatazone) << sbi->s_log_zone_size; in minix_statfs()
383 buf->f_files = sbi->s_ninodes; in minix_statfs()
385 buf->f_namelen = sbi->s_namelen; in minix_statfs()