Lines Matching refs:sb
33 static int hfs_sync_fs(struct super_block *sb, int wait) in hfs_sync_fs() argument
35 hfs_mdb_commit(sb); in hfs_sync_fs()
46 static void hfs_put_super(struct super_block *sb) in hfs_put_super() argument
48 cancel_delayed_work_sync(&HFS_SB(sb)->mdb_work); in hfs_put_super()
49 hfs_mdb_close(sb); in hfs_put_super()
51 hfs_mdb_put(sb); in hfs_put_super()
57 struct super_block *sb; in flush_mdb() local
60 sb = sbi->sb; in flush_mdb()
66 hfs_mdb_commit(sb); in flush_mdb()
69 void hfs_mark_mdb_dirty(struct super_block *sb) in hfs_mark_mdb_dirty() argument
71 struct hfs_sb_info *sbi = HFS_SB(sb); in hfs_mark_mdb_dirty()
74 if (sb->s_flags & MS_RDONLY) in hfs_mark_mdb_dirty()
97 struct super_block *sb = dentry->d_sb; in hfs_statfs() local
98 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in hfs_statfs()
101 buf->f_bsize = sb->s_blocksize; in hfs_statfs()
102 buf->f_blocks = (u32)HFS_SB(sb)->fs_ablocks * HFS_SB(sb)->fs_div; in hfs_statfs()
103 buf->f_bfree = (u32)HFS_SB(sb)->free_ablocks * HFS_SB(sb)->fs_div; in hfs_statfs()
105 buf->f_files = HFS_SB(sb)->fs_ablocks; in hfs_statfs()
106 buf->f_ffree = HFS_SB(sb)->free_ablocks; in hfs_statfs()
114 static int hfs_remount(struct super_block *sb, int *flags, char *data) in hfs_remount() argument
116 sync_filesystem(sb); in hfs_remount()
118 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) in hfs_remount()
121 if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { in hfs_remount()
123 sb->s_flags |= MS_RDONLY; in hfs_remount()
125 } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { in hfs_remount()
127 sb->s_flags |= MS_RDONLY; in hfs_remount()
162 static struct inode *hfs_alloc_inode(struct super_block *sb) in hfs_alloc_inode() argument
385 static int hfs_fill_super(struct super_block *sb, void *data, int silent) in hfs_fill_super() argument
397 sbi->sb = sb; in hfs_fill_super()
398 sb->s_fs_info = sbi; in hfs_fill_super()
408 sb->s_op = &hfs_super_operations; in hfs_fill_super()
409 sb->s_flags |= MS_NODIRATIME; in hfs_fill_super()
412 res = hfs_mdb_get(sb); in hfs_fill_super()
416 hfs_mdb_name(sb)); in hfs_fill_super()
422 res = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_fill_super()
425 res = hfs_cat_find_brec(sb, HFS_ROOT_CNID, &fd); in hfs_fill_super()
438 root_inode = hfs_iget(sb, &fd.search_key->cat, &rec); in hfs_fill_super()
443 sb->s_d_op = &hfs_dentry_operations; in hfs_fill_super()
445 sb->s_root = d_make_root(root_inode); in hfs_fill_super()
446 if (!sb->s_root) in hfs_fill_super()
455 hfs_mdb_put(sb); in hfs_fill_super()