Lines Matching refs:sb
201 struct super_block *sb = sbi->s_sb; in detect_sysv() local
219 if (!(sb->s_flags & MS_RDONLY)) { in detect_sysv()
222 sb->s_id); in detect_sysv()
244 "forcing read-only mode.\n", sb->s_id); in detect_sysv()
302 static int complete_read_super(struct super_block *sb, int silent, int size) in complete_read_super() argument
304 struct sysv_sb_info *sbi = SYSV_SB(sb); in complete_read_super()
313 flavour_setup[sbi->s_type](sbi, &sb->s_max_links); in complete_read_super()
330 found, sb->s_blocksize, sb->s_id); in complete_read_super()
332 sb->s_magic = SYSV_MAGIC_BASE + sbi->s_type; in complete_read_super()
334 sb->s_op = &sysv_sops; in complete_read_super()
336 sb->s_flags |= MS_RDONLY; in complete_read_super()
338 sb->s_d_op = &sysv_dentry_operations; in complete_read_super()
339 root_inode = sysv_iget(sb, SYSV_ROOT_INO); in complete_read_super()
344 sb->s_root = d_make_root(root_inode); in complete_read_super()
345 if (!sb->s_root) { in complete_read_super()
352 static int sysv_fill_super(struct super_block *sb, void *data, int silent) in sysv_fill_super() argument
369 sbi->s_sb = sb; in sysv_fill_super()
372 sb->s_fs_info = sbi; in sysv_fill_super()
374 sb_set_blocksize(sb, BLOCK_SIZE); in sysv_fill_super()
378 bh = sb_bread(sb, flavours[i].block); in sysv_fill_super()
381 size = flavours[i].test(SYSV_SB(sb), bh); in sysv_fill_super()
391 sb_set_blocksize(sb, 512); in sysv_fill_super()
392 bh1 = sb_bread(sb, blocknr); in sysv_fill_super()
393 bh = sb_bread(sb, blocknr + 1); in sysv_fill_super()
401 sb_set_blocksize(sb, 2048); in sysv_fill_super()
402 bh1 = bh = sb_bread(sb, blocknr); in sysv_fill_super()
411 if (complete_read_super(sb, silent, size)) in sysv_fill_super()
417 sb_set_blocksize(sb, BLOCK_SIZE); in sysv_fill_super()
427 sb->s_id); in sysv_fill_super()
437 static int v7_sanity_check(struct super_block *sb, struct buffer_head *bh) in v7_sanity_check() argument
444 sbi = sb->s_fs_info; in v7_sanity_check()
455 bh2 = sb_bread(sb, 2); in v7_sanity_check()
473 static int v7_fill_super(struct super_block *sb, void *data, int silent) in v7_fill_super() argument
487 sbi->s_sb = sb; in v7_fill_super()
491 sb->s_fs_info = sbi; in v7_fill_super()
493 sb_set_blocksize(sb, 512); in v7_fill_super()
495 if ((bh = sb_bread(sb, 1)) == NULL) { in v7_fill_super()
498 "device %s.\n", sb->s_id); in v7_fill_super()
504 if (v7_sanity_check(sb, bh)) in v7_fill_super()
509 if (v7_sanity_check(sb, bh)) in v7_fill_super()
517 if (complete_read_super(sb, silent, 1)) in v7_fill_super()
522 sb->s_id); in v7_fill_super()