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()
271 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_show_options() local
275 if (affs_test_opt(sbi->s_flags, SF_SETMODE)) in affs_show_options()
276 seq_printf(m, ",mode=%o", sbi->s_mode); in affs_show_options()
277 if (affs_test_opt(sbi->s_flags, SF_MUFS)) in affs_show_options()
279 if (affs_test_opt(sbi->s_flags, SF_NO_TRUNCATE)) in affs_show_options()
281 if (affs_test_opt(sbi->s_flags, SF_PREFIX)) in affs_show_options()
282 seq_printf(m, ",prefix=%s", sbi->s_prefix); in affs_show_options()
283 if (affs_test_opt(sbi->s_flags, SF_IMMUTABLE)) in affs_show_options()
285 if (sbi->s_reserved != 2) in affs_show_options()
286 seq_printf(m, ",reserved=%u", sbi->s_reserved); in affs_show_options()
287 if (sbi->s_root_block != (sbi->s_reserved + sbi->s_partition_size - 1) / 2) in affs_show_options()
288 seq_printf(m, ",root=%u", sbi->s_root_block); in affs_show_options()
289 if (affs_test_opt(sbi->s_flags, SF_SETGID)) in affs_show_options()
291 from_kgid_munged(&init_user_ns, sbi->s_gid)); in affs_show_options()
292 if (affs_test_opt(sbi->s_flags, SF_SETUID)) in affs_show_options()
294 from_kuid_munged(&init_user_ns, sbi->s_uid)); in affs_show_options()
295 if (affs_test_opt(sbi->s_flags, SF_VERBOSE)) in affs_show_options()
297 if (sbi->s_volume[0]) in affs_show_options()
298 seq_printf(m, ",volume=%s", sbi->s_volume); in affs_show_options()
308 struct affs_sb_info *sbi; in affs_fill_super() local
330 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); in affs_fill_super()
331 if (!sbi) in affs_fill_super()
334 sb->s_fs_info = sbi; in affs_fill_super()
335 sbi->sb = sb; in affs_fill_super()
336 mutex_init(&sbi->s_bmlock); in affs_fill_super()
337 spin_lock_init(&sbi->symlink_lock); in affs_fill_super()
338 spin_lock_init(&sbi->work_lock); in affs_fill_super()
339 INIT_DELAYED_WORK(&sbi->sb_work, flush_superblock); in affs_fill_super()
341 sbi->s_flags = ctx->mount_flags; in affs_fill_super()
342 sbi->s_mode = ctx->mode; in affs_fill_super()
343 sbi->s_uid = ctx->uid; in affs_fill_super()
344 sbi->s_gid = ctx->gid; in affs_fill_super()
345 sbi->s_reserved = ctx->reserved; in affs_fill_super()
346 sbi->s_prefix = ctx->prefix; in affs_fill_super()
348 memcpy(sbi->s_volume, ctx->volume, 32); in affs_fill_super()
372 sbi->s_root_block = ctx->root_block; in affs_fill_super()
374 sbi->s_root_block = (ctx->reserved + size - 1) / 2; in affs_fill_super()
377 sbi->s_partition_size = size; in affs_fill_super()
393 sbi->s_root_block + num_bm, in affs_fill_super()
395 root_bh = affs_bread(sb, sbi->s_root_block + num_bm); in affs_fill_super()
401 sbi->s_hashsize = blocksize / 4 - 56; in affs_fill_super()
402 sbi->s_root_block += num_bm; in affs_fill_super()
416 sbi->s_root_bh = root_bh; in affs_fill_super()
417 ctx->root_block = sbi->s_root_block; in affs_fill_super()
442 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
446 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
449 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
454 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
457 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
462 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
466 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
467 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
486 sbi->s_data_blksize = sb->s_blocksize; in affs_fill_super()
487 if (affs_test_opt(sbi->s_flags, SF_OFS)) in affs_fill_super()
488 sbi->s_data_blksize -= 24; in affs_fill_super()
522 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_reconfigure() local
528 flush_delayed_work(&sbi->sb_work); in affs_reconfigure()
534 sbi->s_flags = ctx->mount_flags; in affs_reconfigure()
535 sbi->s_mode = ctx->mode; in affs_reconfigure()
536 sbi->s_uid = ctx->uid; in affs_reconfigure()
537 sbi->s_gid = ctx->gid; in affs_reconfigure()
539 spin_lock(&sbi->symlink_lock); in affs_reconfigure()
541 kfree(sbi->s_prefix); in affs_reconfigure()
542 sbi->s_prefix = ctx->prefix; in affs_reconfigure()
545 memcpy(sbi->s_volume, ctx->volume, 32); in affs_reconfigure()
546 spin_unlock(&sbi->symlink_lock); in affs_reconfigure()
588 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_kill_sb() local
590 if (sbi) { in affs_kill_sb()
592 affs_brelse(sbi->s_root_bh); in affs_kill_sb()
593 kfree(sbi->s_prefix); in affs_kill_sb()
594 mutex_destroy(&sbi->s_bmlock); in affs_kill_sb()
595 kfree_rcu(sbi, rcu); in affs_kill_sb()
624 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_init_fs_context() local
631 memcpy(ctx->volume, sbi->s_volume, 32); in affs_init_fs_context()