Lines Matching refs:sbi

34 	struct affs_sb_info *sbi = AFFS_SB(sb);  in affs_commit_super()  local
35 struct buffer_head *bh = sbi->s_root_bh; in affs_commit_super()
51 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_put_super() local
54 cancel_delayed_work_sync(&sbi->sb_work); in affs_put_super()
66 struct affs_sb_info *sbi; in flush_superblock() local
69 sbi = container_of(work, struct affs_sb_info, sb_work.work); in flush_superblock()
70 sb = sbi->sb; in flush_superblock()
72 spin_lock(&sbi->work_lock); in flush_superblock()
73 sbi->work_queued = 0; in flush_superblock()
74 spin_unlock(&sbi->work_lock); in flush_superblock()
81 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_mark_sb_dirty() local
87 spin_lock(&sbi->work_lock); in affs_mark_sb_dirty()
88 if (!sbi->work_queued) { in affs_mark_sb_dirty()
90 queue_delayed_work(system_long_wq, &sbi->sb_work, delay); in affs_mark_sb_dirty()
91 sbi->work_queued = 1; in affs_mark_sb_dirty()
93 spin_unlock(&sbi->work_lock); in affs_mark_sb_dirty()
303 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_show_options() local
307 if (affs_test_opt(sbi->s_flags, SF_SETMODE)) in affs_show_options()
308 seq_printf(m, ",mode=%o", sbi->s_mode); in affs_show_options()
309 if (affs_test_opt(sbi->s_flags, SF_MUFS)) in affs_show_options()
311 if (affs_test_opt(sbi->s_flags, SF_NO_TRUNCATE)) in affs_show_options()
313 if (affs_test_opt(sbi->s_flags, SF_PREFIX)) in affs_show_options()
314 seq_printf(m, ",prefix=%s", sbi->s_prefix); in affs_show_options()
315 if (affs_test_opt(sbi->s_flags, SF_IMMUTABLE)) in affs_show_options()
317 if (sbi->s_reserved != 2) in affs_show_options()
318 seq_printf(m, ",reserved=%u", sbi->s_reserved); in affs_show_options()
319 if (sbi->s_root_block != (sbi->s_reserved + sbi->s_partition_size - 1) / 2) in affs_show_options()
320 seq_printf(m, ",root=%u", sbi->s_root_block); in affs_show_options()
321 if (affs_test_opt(sbi->s_flags, SF_SETGID)) in affs_show_options()
323 from_kgid_munged(&init_user_ns, sbi->s_gid)); in affs_show_options()
324 if (affs_test_opt(sbi->s_flags, SF_SETUID)) in affs_show_options()
326 from_kuid_munged(&init_user_ns, sbi->s_uid)); in affs_show_options()
327 if (affs_test_opt(sbi->s_flags, SF_VERBOSE)) in affs_show_options()
329 if (sbi->s_volume[0]) in affs_show_options()
330 seq_printf(m, ",volume=%s", sbi->s_volume); in affs_show_options()
340 struct affs_sb_info *sbi; in affs_fill_super() local
363 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); in affs_fill_super()
364 if (!sbi) in affs_fill_super()
367 sb->s_fs_info = sbi; in affs_fill_super()
368 sbi->sb = sb; in affs_fill_super()
369 mutex_init(&sbi->s_bmlock); in affs_fill_super()
370 spin_lock_init(&sbi->symlink_lock); in affs_fill_super()
371 spin_lock_init(&sbi->work_lock); in affs_fill_super()
372 INIT_DELAYED_WORK(&sbi->sb_work, flush_superblock); in affs_fill_super()
375 &blocksize,&sbi->s_prefix, in affs_fill_super()
376 sbi->s_volume, &mount_flags)) { in affs_fill_super()
382 sbi->s_flags = mount_flags; in affs_fill_super()
383 sbi->s_mode = i; in affs_fill_super()
384 sbi->s_uid = uid; in affs_fill_super()
385 sbi->s_gid = gid; in affs_fill_super()
386 sbi->s_reserved= reserved; in affs_fill_super()
407 sbi->s_root_block = root_block; in affs_fill_super()
409 sbi->s_root_block = (reserved + size - 1) / 2; in affs_fill_super()
412 sbi->s_partition_size = size; in affs_fill_super()
428 sbi->s_root_block + num_bm, in affs_fill_super()
430 root_bh = affs_bread(sb, sbi->s_root_block + num_bm); in affs_fill_super()
436 sbi->s_hashsize = blocksize / 4 - 56; in affs_fill_super()
437 sbi->s_root_block += num_bm; in affs_fill_super()
451 sbi->s_root_bh = root_bh; in affs_fill_super()
452 root_block = sbi->s_root_block; in affs_fill_super()
477 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
481 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
484 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
489 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
492 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
497 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()
637 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_kill_sb() local
639 if (sbi) { in affs_kill_sb()
641 affs_brelse(sbi->s_root_bh); in affs_kill_sb()
642 kfree(sbi->s_prefix); in affs_kill_sb()
643 mutex_destroy(&sbi->s_bmlock); in affs_kill_sb()
644 kfree(sbi); in affs_kill_sb()