Lines Matching refs:sbi

112 static void free_sbi(struct hpfs_sb_info *sbi)  in free_sbi()  argument
114 kfree(sbi->sb_cp_table); in free_sbi()
115 kfree(sbi->sb_bmp_dir); in free_sbi()
116 kfree(sbi); in free_sbi()
166 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_get_free_dnodes() local
167 if (sbi->sb_n_free_dnodes == (unsigned)-1) { in hpfs_get_free_dnodes()
168 unsigned c = hpfs_count_one_bitmap(s, sbi->sb_dmap); in hpfs_get_free_dnodes()
171 sbi->sb_n_free_dnodes = c; in hpfs_get_free_dnodes()
173 return sbi->sb_n_free_dnodes; in hpfs_get_free_dnodes()
179 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_statfs() local
184 if (sbi->sb_n_free == (unsigned)-1) in hpfs_statfs()
185 sbi->sb_n_free = count_bitmaps(s); in hpfs_statfs()
189 buf->f_blocks = sbi->sb_fs_size; in hpfs_statfs()
190 buf->f_bfree = sbi->sb_n_free; in hpfs_statfs()
191 buf->f_bavail = sbi->sb_n_free; in hpfs_statfs()
192 buf->f_files = sbi->sb_dirband_size / 4; in hpfs_statfs()
456 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_remount_fs() local
463 uid = sbi->sb_uid; gid = sbi->sb_gid; in hpfs_remount_fs()
464 umask = 0777 & ~sbi->sb_mode; in hpfs_remount_fs()
465 lowercase = sbi->sb_lowercase; in hpfs_remount_fs()
466 eas = sbi->sb_eas; chk = sbi->sb_chk; chkdsk = sbi->sb_chkdsk; in hpfs_remount_fs()
467 errs = sbi->sb_err; timeshift = sbi->sb_timeshift; in hpfs_remount_fs()
478 if (timeshift != sbi->sb_timeshift) { in hpfs_remount_fs()
485 sbi->sb_uid = uid; sbi->sb_gid = gid; in hpfs_remount_fs()
486 sbi->sb_mode = 0777 & ~umask; in hpfs_remount_fs()
487 sbi->sb_lowercase = lowercase; in hpfs_remount_fs()
488 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk; in hpfs_remount_fs()
489 sbi->sb_err = errs; sbi->sb_timeshift = timeshift; in hpfs_remount_fs()
503 struct hpfs_sb_info *sbi = hpfs_sb(root->d_sb); in hpfs_show_options() local
505 seq_printf(seq, ",uid=%u", from_kuid_munged(&init_user_ns, sbi->sb_uid)); in hpfs_show_options()
506 seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, sbi->sb_gid)); in hpfs_show_options()
507 seq_printf(seq, ",umask=%03o", (~sbi->sb_mode & 0777)); in hpfs_show_options()
508 if (sbi->sb_lowercase) in hpfs_show_options()
510 if (!sbi->sb_chk) in hpfs_show_options()
512 if (sbi->sb_chk == 2) in hpfs_show_options()
514 if (!sbi->sb_err) in hpfs_show_options()
516 if (sbi->sb_err == 2) in hpfs_show_options()
518 if (!sbi->sb_chkdsk) in hpfs_show_options()
520 if (sbi->sb_chkdsk == 2) in hpfs_show_options()
522 if (!sbi->sb_eas) in hpfs_show_options()
524 if (sbi->sb_eas == 1) in hpfs_show_options()
526 if (sbi->sb_timeshift) in hpfs_show_options()
527 seq_printf(seq, ",timeshift=%d", sbi->sb_timeshift); in hpfs_show_options()
550 struct hpfs_sb_info *sbi; in hpfs_fill_super() local
564 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in hpfs_fill_super()
565 if (!sbi) { in hpfs_fill_super()
568 s->s_fs_info = sbi; in hpfs_fill_super()
570 mutex_init(&sbi->hpfs_mutex); in hpfs_fill_super()
595 sbi->sb_fs_size = -1; in hpfs_fill_super()
625 sbi->sb_root = le32_to_cpu(superblock->root); in hpfs_fill_super()
626 sbi->sb_fs_size = le32_to_cpu(superblock->n_sectors); in hpfs_fill_super()
627 sbi->sb_bitmaps = le32_to_cpu(superblock->bitmaps); in hpfs_fill_super()
628 sbi->sb_dirband_start = le32_to_cpu(superblock->dir_band_start); in hpfs_fill_super()
629 sbi->sb_dirband_size = le32_to_cpu(superblock->n_dir_band); in hpfs_fill_super()
630 sbi->sb_dmap = le32_to_cpu(superblock->dir_band_bitmap); in hpfs_fill_super()
631 sbi->sb_uid = uid; in hpfs_fill_super()
632 sbi->sb_gid = gid; in hpfs_fill_super()
633 sbi->sb_mode = 0777 & ~umask; in hpfs_fill_super()
634 sbi->sb_n_free = -1; in hpfs_fill_super()
635 sbi->sb_n_free_dnodes = -1; in hpfs_fill_super()
636 sbi->sb_lowercase = lowercase; in hpfs_fill_super()
637 sbi->sb_eas = eas; in hpfs_fill_super()
638 sbi->sb_chk = chk; in hpfs_fill_super()
639 sbi->sb_chkdsk = chkdsk; in hpfs_fill_super()
640 sbi->sb_err = errs; in hpfs_fill_super()
641 sbi->sb_timeshift = timeshift; in hpfs_fill_super()
642 sbi->sb_was_error = 0; in hpfs_fill_super()
643 sbi->sb_cp_table = NULL; in hpfs_fill_super()
644 sbi->sb_c_bitmap = -1; in hpfs_fill_super()
645 sbi->sb_max_fwd_alloc = 0xffffff; in hpfs_fill_super()
647 if (sbi->sb_fs_size >= 0x80000000) { in hpfs_fill_super()
649 (unsigned)sbi->sb_fs_size); in hpfs_fill_super()
657 if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, le32_to_cpu(superblock->bitmaps)))) in hpfs_fill_super()
693 a = sbi->sb_dirband_size; in hpfs_fill_super()
694 sbi->sb_dirband_size = 0; in hpfs_fill_super()
701 sbi->sb_dirband_size = a; in hpfs_fill_super()
707 if (!(sbi->sb_cp_table = hpfs_load_code_page(s, le32_to_cpu(spareblock->code_page_dir)))) in hpfs_fill_super()
714 root = iget_locked(s, sbi->sb_root); in hpfs_fill_super()
728 root_dno = hpfs_fnode_dno(s, sbi->sb_root); in hpfs_fill_super()
757 free_sbi(sbi); in hpfs_fill_super()