• Home
  • Raw
  • Download

Lines Matching refs:sbi

113 static void free_sbi(struct hpfs_sb_info *sbi)  in free_sbi()  argument
115 kfree(sbi->sb_cp_table); in free_sbi()
116 kfree(sbi->sb_bmp_dir); in free_sbi()
117 kfree(sbi); in free_sbi()
167 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_get_free_dnodes() local
168 if (sbi->sb_n_free_dnodes == (unsigned)-1) { in hpfs_get_free_dnodes()
169 unsigned c = hpfs_count_one_bitmap(s, sbi->sb_dmap); in hpfs_get_free_dnodes()
172 sbi->sb_n_free_dnodes = c; in hpfs_get_free_dnodes()
174 return sbi->sb_n_free_dnodes; in hpfs_get_free_dnodes()
180 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_statfs() local
185 if (sbi->sb_n_free == (unsigned)-1) in hpfs_statfs()
186 sbi->sb_n_free = count_bitmaps(s); in hpfs_statfs()
190 buf->f_blocks = sbi->sb_fs_size; in hpfs_statfs()
191 buf->f_bfree = sbi->sb_n_free; in hpfs_statfs()
192 buf->f_bavail = sbi->sb_n_free; in hpfs_statfs()
193 buf->f_files = sbi->sb_dirband_size / 4; in hpfs_statfs()
449 struct hpfs_sb_info *sbi = hpfs_sb(s); in hpfs_remount_fs() local
456 uid = sbi->sb_uid; gid = sbi->sb_gid; in hpfs_remount_fs()
457 umask = 0777 & ~sbi->sb_mode; in hpfs_remount_fs()
458 lowercase = sbi->sb_lowercase; in hpfs_remount_fs()
459 eas = sbi->sb_eas; chk = sbi->sb_chk; chkdsk = sbi->sb_chkdsk; in hpfs_remount_fs()
460 errs = sbi->sb_err; timeshift = sbi->sb_timeshift; in hpfs_remount_fs()
471 if (timeshift != sbi->sb_timeshift) { in hpfs_remount_fs()
478 sbi->sb_uid = uid; sbi->sb_gid = gid; in hpfs_remount_fs()
479 sbi->sb_mode = 0777 & ~umask; in hpfs_remount_fs()
480 sbi->sb_lowercase = lowercase; in hpfs_remount_fs()
481 sbi->sb_eas = eas; sbi->sb_chk = chk; sbi->sb_chkdsk = chkdsk; in hpfs_remount_fs()
482 sbi->sb_err = errs; sbi->sb_timeshift = timeshift; in hpfs_remount_fs()
496 struct hpfs_sb_info *sbi = hpfs_sb(root->d_sb); in hpfs_show_options() local
498 seq_printf(seq, ",uid=%u", from_kuid_munged(&init_user_ns, sbi->sb_uid)); in hpfs_show_options()
499 seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, sbi->sb_gid)); in hpfs_show_options()
500 seq_printf(seq, ",umask=%03o", (~sbi->sb_mode & 0777)); in hpfs_show_options()
501 if (sbi->sb_lowercase) in hpfs_show_options()
503 if (!sbi->sb_chk) in hpfs_show_options()
505 if (sbi->sb_chk == 2) in hpfs_show_options()
507 if (!sbi->sb_err) in hpfs_show_options()
509 if (sbi->sb_err == 2) in hpfs_show_options()
511 if (!sbi->sb_chkdsk) in hpfs_show_options()
513 if (sbi->sb_chkdsk == 2) in hpfs_show_options()
515 if (!sbi->sb_eas) in hpfs_show_options()
517 if (sbi->sb_eas == 1) in hpfs_show_options()
519 if (sbi->sb_timeshift) in hpfs_show_options()
520 seq_printf(seq, ",timeshift=%d", sbi->sb_timeshift); in hpfs_show_options()
543 struct hpfs_sb_info *sbi; in hpfs_fill_super() local
557 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); in hpfs_fill_super()
558 if (!sbi) { in hpfs_fill_super()
561 s->s_fs_info = sbi; in hpfs_fill_super()
563 mutex_init(&sbi->hpfs_mutex); in hpfs_fill_super()
588 sbi->sb_fs_size = -1; in hpfs_fill_super()
619 sbi->sb_root = le32_to_cpu(superblock->root); in hpfs_fill_super()
620 sbi->sb_fs_size = le32_to_cpu(superblock->n_sectors); in hpfs_fill_super()
621 sbi->sb_bitmaps = le32_to_cpu(superblock->bitmaps); in hpfs_fill_super()
622 sbi->sb_dirband_start = le32_to_cpu(superblock->dir_band_start); in hpfs_fill_super()
623 sbi->sb_dirband_size = le32_to_cpu(superblock->n_dir_band); in hpfs_fill_super()
624 sbi->sb_dmap = le32_to_cpu(superblock->dir_band_bitmap); in hpfs_fill_super()
625 sbi->sb_uid = uid; in hpfs_fill_super()
626 sbi->sb_gid = gid; in hpfs_fill_super()
627 sbi->sb_mode = 0777 & ~umask; in hpfs_fill_super()
628 sbi->sb_n_free = -1; in hpfs_fill_super()
629 sbi->sb_n_free_dnodes = -1; in hpfs_fill_super()
630 sbi->sb_lowercase = lowercase; in hpfs_fill_super()
631 sbi->sb_eas = eas; in hpfs_fill_super()
632 sbi->sb_chk = chk; in hpfs_fill_super()
633 sbi->sb_chkdsk = chkdsk; in hpfs_fill_super()
634 sbi->sb_err = errs; in hpfs_fill_super()
635 sbi->sb_timeshift = timeshift; in hpfs_fill_super()
636 sbi->sb_was_error = 0; in hpfs_fill_super()
637 sbi->sb_cp_table = NULL; in hpfs_fill_super()
638 sbi->sb_c_bitmap = -1; in hpfs_fill_super()
639 sbi->sb_max_fwd_alloc = 0xffffff; in hpfs_fill_super()
641 if (sbi->sb_fs_size >= 0x80000000) { in hpfs_fill_super()
643 (unsigned)sbi->sb_fs_size); in hpfs_fill_super()
651 if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, le32_to_cpu(superblock->bitmaps)))) in hpfs_fill_super()
687 a = sbi->sb_dirband_size; in hpfs_fill_super()
688 sbi->sb_dirband_size = 0; in hpfs_fill_super()
695 sbi->sb_dirband_size = a; in hpfs_fill_super()
701 if (!(sbi->sb_cp_table = hpfs_load_code_page(s, le32_to_cpu(spareblock->code_page_dir)))) in hpfs_fill_super()
708 root = iget_locked(s, sbi->sb_root); in hpfs_fill_super()
722 root_dno = hpfs_fnode_dno(s, sbi->sb_root); in hpfs_fill_super()
751 free_sbi(sbi); in hpfs_fill_super()