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()
429 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_remount_fs() local
436 uid = sbi->sb_uid; gid = sbi->sb_gid; in hpfs_remount_fs()
437 umask = 0777 & ~sbi->sb_mode; in hpfs_remount_fs()
438 lowercase = sbi->sb_lowercase; in hpfs_remount_fs()
439 eas = sbi->sb_eas; chk = sbi->sb_chk; chkdsk = sbi->sb_chkdsk; in hpfs_remount_fs()
440 errs = sbi->sb_err; timeshift = sbi->sb_timeshift; in hpfs_remount_fs()
451 if (timeshift != sbi->sb_timeshift) { in hpfs_remount_fs()
458 sbi->sb_uid = uid; sbi->sb_gid = gid; in hpfs_remount_fs()
459 sbi->sb_mode = 0777 & ~umask; in hpfs_remount_fs()
460 sbi->sb_lowercase = lowercase; in hpfs_remount_fs()
461 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk; in hpfs_remount_fs()
462 sbi->sb_err = errs; sbi->sb_timeshift = timeshift; in hpfs_remount_fs()
476 struct hpfs_sb_info *sbi = hpfs_sb(root->d_sb); in hpfs_show_options() local
478 seq_printf(seq, ",uid=%u", from_kuid_munged(&init_user_ns, sbi->sb_uid)); in hpfs_show_options()
479 seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, sbi->sb_gid)); in hpfs_show_options()
480 seq_printf(seq, ",umask=%03o", (~sbi->sb_mode & 0777)); in hpfs_show_options()
481 if (sbi->sb_lowercase) in hpfs_show_options()
483 if (!sbi->sb_chk) in hpfs_show_options()
485 if (sbi->sb_chk == 2) in hpfs_show_options()
487 if (!sbi->sb_err) in hpfs_show_options()
489 if (sbi->sb_err == 2) in hpfs_show_options()
491 if (!sbi->sb_chkdsk) in hpfs_show_options()
493 if (sbi->sb_chkdsk == 2) in hpfs_show_options()
495 if (!sbi->sb_eas) in hpfs_show_options()
497 if (sbi->sb_eas == 1) in hpfs_show_options()
499 if (sbi->sb_timeshift) in hpfs_show_options()
500 seq_printf(seq, ",timeshift=%d", sbi->sb_timeshift); in hpfs_show_options()
523 struct hpfs_sb_info *sbi; in hpfs_fill_super() local
537 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in hpfs_fill_super()
538 if (!sbi) { in hpfs_fill_super()
541 s->s_fs_info = sbi; in hpfs_fill_super()
543 mutex_init(&sbi->hpfs_mutex); in hpfs_fill_super()
568 sbi->sb_fs_size = -1; in hpfs_fill_super()
598 sbi->sb_root = le32_to_cpu(superblock->root); in hpfs_fill_super()
599 sbi->sb_fs_size = le32_to_cpu(superblock->n_sectors); in hpfs_fill_super()
600 sbi->sb_bitmaps = le32_to_cpu(superblock->bitmaps); in hpfs_fill_super()
601 sbi->sb_dirband_start = le32_to_cpu(superblock->dir_band_start); in hpfs_fill_super()
602 sbi->sb_dirband_size = le32_to_cpu(superblock->n_dir_band); in hpfs_fill_super()
603 sbi->sb_dmap = le32_to_cpu(superblock->dir_band_bitmap); in hpfs_fill_super()
604 sbi->sb_uid = uid; in hpfs_fill_super()
605 sbi->sb_gid = gid; in hpfs_fill_super()
606 sbi->sb_mode = 0777 & ~umask; in hpfs_fill_super()
607 sbi->sb_n_free = -1; in hpfs_fill_super()
608 sbi->sb_n_free_dnodes = -1; in hpfs_fill_super()
609 sbi->sb_lowercase = lowercase; in hpfs_fill_super()
610 sbi->sb_eas = eas; in hpfs_fill_super()
611 sbi->sb_chk = chk; in hpfs_fill_super()
612 sbi->sb_chkdsk = chkdsk; in hpfs_fill_super()
613 sbi->sb_err = errs; in hpfs_fill_super()
614 sbi->sb_timeshift = timeshift; in hpfs_fill_super()
615 sbi->sb_was_error = 0; in hpfs_fill_super()
616 sbi->sb_cp_table = NULL; in hpfs_fill_super()
617 sbi->sb_c_bitmap = -1; in hpfs_fill_super()
618 sbi->sb_max_fwd_alloc = 0xffffff; in hpfs_fill_super()
620 if (sbi->sb_fs_size >= 0x80000000) { in hpfs_fill_super()
622 (unsigned)sbi->sb_fs_size); in hpfs_fill_super()
627 if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, le32_to_cpu(superblock->bitmaps)))) in hpfs_fill_super()
675 a = sbi->sb_dirband_size; in hpfs_fill_super()
676 sbi->sb_dirband_size = 0; in hpfs_fill_super()
683 sbi->sb_dirband_size = a; in hpfs_fill_super()
689 if (!(sbi->sb_cp_table = hpfs_load_code_page(s, le32_to_cpu(spareblock->code_page_dir)))) in hpfs_fill_super()
696 root = iget_locked(s, sbi->sb_root); in hpfs_fill_super()
710 root_dno = hpfs_fnode_dno(s, sbi->sb_root); in hpfs_fill_super()
739 free_sbi(sbi); in hpfs_fill_super()