Lines Matching refs:sbi
30 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_commit_super() local
31 struct buffer_head *bh = sbi->s_root_bh; in affs_commit_super()
47 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_put_super() local
50 cancel_delayed_work_sync(&sbi->sb_work); in affs_put_super()
62 struct affs_sb_info *sbi; in flush_superblock() local
65 sbi = container_of(work, struct affs_sb_info, sb_work.work); in flush_superblock()
66 sb = sbi->sb; in flush_superblock()
68 spin_lock(&sbi->work_lock); in flush_superblock()
69 sbi->work_queued = 0; in flush_superblock()
70 spin_unlock(&sbi->work_lock); in flush_superblock()
77 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_mark_sb_dirty() local
83 spin_lock(&sbi->work_lock); in affs_mark_sb_dirty()
84 if (!sbi->work_queued) { in affs_mark_sb_dirty()
86 queue_delayed_work(system_long_wq, &sbi->sb_work, delay); in affs_mark_sb_dirty()
87 sbi->work_queued = 1; in affs_mark_sb_dirty()
89 spin_unlock(&sbi->work_lock); in affs_mark_sb_dirty()
301 struct affs_sb_info *sbi; in affs_fill_super() local
326 sbi = kzalloc(sizeof(struct affs_sb_info), GFP_KERNEL); in affs_fill_super()
327 if (!sbi) in affs_fill_super()
330 sb->s_fs_info = sbi; in affs_fill_super()
331 sbi->sb = sb; in affs_fill_super()
332 mutex_init(&sbi->s_bmlock); in affs_fill_super()
333 spin_lock_init(&sbi->symlink_lock); in affs_fill_super()
334 spin_lock_init(&sbi->work_lock); in affs_fill_super()
335 INIT_DELAYED_WORK(&sbi->sb_work, flush_superblock); in affs_fill_super()
338 &blocksize,&sbi->s_prefix, in affs_fill_super()
339 sbi->s_volume, &mount_flags)) { in affs_fill_super()
345 sbi->s_flags = mount_flags; in affs_fill_super()
346 sbi->s_mode = i; in affs_fill_super()
347 sbi->s_uid = uid; in affs_fill_super()
348 sbi->s_gid = gid; in affs_fill_super()
349 sbi->s_reserved= reserved; in affs_fill_super()
370 sbi->s_root_block = root_block; in affs_fill_super()
372 sbi->s_root_block = (reserved + size - 1) / 2; in affs_fill_super()
375 sbi->s_partition_size = size; in affs_fill_super()
391 sbi->s_root_block + num_bm, in affs_fill_super()
393 root_bh = affs_bread(sb, sbi->s_root_block + num_bm); in affs_fill_super()
399 sbi->s_hashsize = blocksize / 4 - 56; in affs_fill_super()
400 sbi->s_root_block += num_bm; in affs_fill_super()
414 sbi->s_root_bh = root_bh; in affs_fill_super()
415 root_block = sbi->s_root_block; in affs_fill_super()
440 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
444 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
447 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
452 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
455 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
460 affs_set_opt(sbi->s_flags, SF_MUFS); in affs_fill_super()
463 affs_set_opt(sbi->s_flags, SF_INTL); in affs_fill_super()
464 affs_set_opt(sbi->s_flags, SF_OFS); in affs_fill_super()
483 sbi->s_data_blksize = sb->s_blocksize; in affs_fill_super()
484 if (affs_test_opt(sbi->s_flags, SF_OFS)) in affs_fill_super()
485 sbi->s_data_blksize -= 24; in affs_fill_super()
517 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_remount() local
539 memcpy(volume, sbi->s_volume, 32); in affs_remount()
548 flush_delayed_work(&sbi->sb_work); in affs_remount()
552 sbi->s_flags = mount_flags; in affs_remount()
553 sbi->s_mode = mode; in affs_remount()
554 sbi->s_uid = uid; in affs_remount()
555 sbi->s_gid = gid; in affs_remount()
557 spin_lock(&sbi->symlink_lock); in affs_remount()
559 kfree(sbi->s_prefix); in affs_remount()
560 sbi->s_prefix = prefix; in affs_remount()
562 memcpy(sbi->s_volume, volume, 32); in affs_remount()
563 spin_unlock(&sbi->symlink_lock); in affs_remount()
607 struct affs_sb_info *sbi = AFFS_SB(sb); in affs_kill_sb() local
609 if (sbi) { in affs_kill_sb()
611 affs_brelse(sbi->s_root_bh); in affs_kill_sb()
612 kfree(sbi->s_prefix); in affs_kill_sb()
613 mutex_destroy(&sbi->s_bmlock); in affs_kill_sb()
614 kfree(sbi); in affs_kill_sb()