Lines Matching full:sbi

35 	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()
82 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_mark_sb_dirty() local
88 spin_lock(&sbi->work_lock); in affs_mark_sb_dirty()
89 if (!sbi->work_queued) { in affs_mark_sb_dirty()
91 queue_delayed_work(system_long_wq, &sbi->sb_work, delay); in affs_mark_sb_dirty()
92 sbi->work_queued = 1; in affs_mark_sb_dirty()
94 spin_unlock(&sbi->work_lock); in affs_mark_sb_dirty()
297 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_show_options() local
301 if (affs_test_opt(sbi->s_flags, SF_SETMODE)) in affs_show_options()
302 seq_printf(m, ",mode=%o", sbi->s_mode); in affs_show_options()
303 if (affs_test_opt(sbi->s_flags, SF_MUFS)) in affs_show_options()
305 if (affs_test_opt(sbi->s_flags, SF_NO_TRUNCATE)) in affs_show_options()
307 if (affs_test_opt(sbi->s_flags, SF_PREFIX)) in affs_show_options()
308 seq_printf(m, ",prefix=%s", sbi->s_prefix); in affs_show_options()
309 if (affs_test_opt(sbi->s_flags, SF_IMMUTABLE)) in affs_show_options()
311 if (sbi->s_reserved != 2) in affs_show_options()
312 seq_printf(m, ",reserved=%u", sbi->s_reserved); in affs_show_options()
313 if (sbi->s_root_block != (sbi->s_reserved + sbi->s_partition_size - 1) / 2) in affs_show_options()
314 seq_printf(m, ",root=%u", sbi->s_root_block); in affs_show_options()
315 if (affs_test_opt(sbi->s_flags, SF_SETGID)) in affs_show_options()
317 from_kgid_munged(&init_user_ns, sbi->s_gid)); in affs_show_options()
318 if (affs_test_opt(sbi->s_flags, SF_SETUID)) in affs_show_options()
320 from_kuid_munged(&init_user_ns, sbi->s_uid)); in affs_show_options()
321 if (affs_test_opt(sbi->s_flags, SF_VERBOSE)) in affs_show_options()
323 if (sbi->s_volume[0]) in affs_show_options()
324 seq_printf(m, ",volume=%s", sbi->s_volume); in affs_show_options()
334 struct affs_sb_info *sbi; in affs_fill_super() local
361 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); in affs_fill_super()
362 if (!sbi) in affs_fill_super()
365 sb->s_fs_info = sbi; in affs_fill_super()
366 sbi->sb = sb; in affs_fill_super()
367 mutex_init(&sbi->s_bmlock); in affs_fill_super()
368 spin_lock_init(&sbi->symlink_lock); in affs_fill_super()
369 spin_lock_init(&sbi->work_lock); in affs_fill_super()
370 INIT_DELAYED_WORK(&sbi->sb_work, flush_superblock); in affs_fill_super()
373 &blocksize,&sbi->s_prefix, in affs_fill_super()
374 sbi->s_volume, &mount_flags)) { in affs_fill_super()
380 sbi->s_flags = mount_flags; in affs_fill_super()
381 sbi->s_mode = i; in affs_fill_super()
382 sbi->s_uid = uid; in affs_fill_super()
383 sbi->s_gid = gid; in affs_fill_super()
384 sbi->s_reserved= reserved; in affs_fill_super()
405 sbi->s_root_block = root_block; in affs_fill_super()
407 sbi->s_root_block = (reserved + size - 1) / 2; in affs_fill_super()
410 sbi->s_partition_size = size; in affs_fill_super()
426 sbi->s_root_block + num_bm, in affs_fill_super()
428 root_bh = affs_bread(sb, sbi->s_root_block + num_bm); in affs_fill_super()
434 sbi->s_hashsize = blocksize / 4 - 56; in affs_fill_super()
435 sbi->s_root_block += num_bm; in affs_fill_super()
449 sbi->s_root_bh = root_bh; in affs_fill_super()
450 root_block = sbi->s_root_block; in affs_fill_super()
475 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
479 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
482 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
487 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
490 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
495 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
499 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
500 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
519 sbi->s_data_blksize = sb->s_blocksize; in affs_fill_super()
520 if (affs_test_opt(sbi->s_flags, SF_OFS)) in affs_fill_super()
521 sbi->s_data_blksize -= 24; in affs_fill_super()
554 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_remount() local
571 memcpy(volume, sbi->s_volume, 32); in affs_remount()
579 flush_delayed_work(&sbi->sb_work); in affs_remount()
581 sbi->s_flags = mount_flags; in affs_remount()
582 sbi->s_mode = mode; in affs_remount()
583 sbi->s_uid = uid; in affs_remount()
584 sbi->s_gid = gid; in affs_remount()
586 spin_lock(&sbi->symlink_lock); in affs_remount()
588 kfree(sbi->s_prefix); in affs_remount()
589 sbi->s_prefix = prefix; in affs_remount()
591 memcpy(sbi->s_volume, volume, 32); in affs_remount()
592 spin_unlock(&sbi->symlink_lock); in affs_remount()
635 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_kill_sb() local
637 if (sbi) { in affs_kill_sb()
639 affs_brelse(sbi->s_root_bh); in affs_kill_sb()
640 kfree(sbi->s_prefix); in affs_kill_sb()
641 mutex_destroy(&sbi->s_bmlock); in affs_kill_sb()
642 kfree_rcu(sbi, rcu); in affs_kill_sb()