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()
298 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_show_options() local
302 if (affs_test_opt(sbi->s_flags, SF_SETMODE)) in affs_show_options()
303 seq_printf(m, ",mode=%o", sbi->s_mode); in affs_show_options()
304 if (affs_test_opt(sbi->s_flags, SF_MUFS)) in affs_show_options()
306 if (affs_test_opt(sbi->s_flags, SF_NO_TRUNCATE)) in affs_show_options()
308 if (affs_test_opt(sbi->s_flags, SF_PREFIX)) in affs_show_options()
309 seq_printf(m, ",prefix=%s", sbi->s_prefix); in affs_show_options()
310 if (affs_test_opt(sbi->s_flags, SF_IMMUTABLE)) in affs_show_options()
312 if (sbi->s_reserved != 2) in affs_show_options()
313 seq_printf(m, ",reserved=%u", sbi->s_reserved); in affs_show_options()
314 if (sbi->s_root_block != (sbi->s_reserved + sbi->s_partition_size - 1) / 2) in affs_show_options()
315 seq_printf(m, ",root=%u", sbi->s_root_block); in affs_show_options()
316 if (affs_test_opt(sbi->s_flags, SF_SETGID)) in affs_show_options()
318 from_kgid_munged(&init_user_ns, sbi->s_gid)); in affs_show_options()
319 if (affs_test_opt(sbi->s_flags, SF_SETUID)) in affs_show_options()
321 from_kuid_munged(&init_user_ns, sbi->s_uid)); in affs_show_options()
322 if (affs_test_opt(sbi->s_flags, SF_VERBOSE)) in affs_show_options()
324 if (sbi->s_volume[0]) in affs_show_options()
325 seq_printf(m, ",volume=%s", sbi->s_volume); in affs_show_options()
335 struct affs_sb_info *sbi; in affs_fill_super() local
362 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); in affs_fill_super()
363 if (!sbi) in affs_fill_super()
366 sb->s_fs_info = sbi; in affs_fill_super()
367 sbi->sb = sb; in affs_fill_super()
368 mutex_init(&sbi->s_bmlock); in affs_fill_super()
369 spin_lock_init(&sbi->symlink_lock); in affs_fill_super()
370 spin_lock_init(&sbi->work_lock); in affs_fill_super()
371 INIT_DELAYED_WORK(&sbi->sb_work, flush_superblock); in affs_fill_super()
374 &blocksize,&sbi->s_prefix, in affs_fill_super()
375 sbi->s_volume, &mount_flags)) { in affs_fill_super()
381 sbi->s_flags = mount_flags; in affs_fill_super()
382 sbi->s_mode = i; in affs_fill_super()
383 sbi->s_uid = uid; in affs_fill_super()
384 sbi->s_gid = gid; in affs_fill_super()
385 sbi->s_reserved= reserved; in affs_fill_super()
406 sbi->s_root_block = root_block; in affs_fill_super()
408 sbi->s_root_block = (reserved + size - 1) / 2; in affs_fill_super()
411 sbi->s_partition_size = size; in affs_fill_super()
427 sbi->s_root_block + num_bm, in affs_fill_super()
429 root_bh = affs_bread(sb, sbi->s_root_block + num_bm); in affs_fill_super()
435 sbi->s_hashsize = blocksize / 4 - 56; in affs_fill_super()
436 sbi->s_root_block += num_bm; in affs_fill_super()
450 sbi->s_root_bh = root_bh; in affs_fill_super()
451 root_block = sbi->s_root_block; in affs_fill_super()
476 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
480 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
483 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
488 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
491 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
496 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
500 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
501 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
520 sbi->s_data_blksize = sb->s_blocksize; in affs_fill_super()
521 if (affs_test_opt(sbi->s_flags, SF_OFS)) in affs_fill_super()
522 sbi->s_data_blksize -= 24; in affs_fill_super()
555 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_remount() local
572 memcpy(volume, sbi->s_volume, 32); in affs_remount()
580 flush_delayed_work(&sbi->sb_work); in affs_remount()
582 sbi->s_flags = mount_flags; in affs_remount()
583 sbi->s_mode = mode; in affs_remount()
584 sbi->s_uid = uid; in affs_remount()
585 sbi->s_gid = gid; in affs_remount()
587 spin_lock(&sbi->symlink_lock); in affs_remount()
589 kfree(sbi->s_prefix); in affs_remount()
590 sbi->s_prefix = prefix; in affs_remount()
592 memcpy(sbi->s_volume, volume, 32); in affs_remount()
593 spin_unlock(&sbi->symlink_lock); in affs_remount()
636 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_kill_sb() local
638 if (sbi) { in affs_kill_sb()
640 affs_brelse(sbi->s_root_bh); in affs_kill_sb()
641 kfree(sbi->s_prefix); in affs_kill_sb()
642 mutex_destroy(&sbi->s_bmlock); in affs_kill_sb()
643 kfree(sbi); in affs_kill_sb()