• Home
  • Raw
  • Download

Lines Matching refs:sbi

27 	struct omfs_sb_info *sbi = OMFS_SB(dir->i_sb);  in omfs_new_inode()  local
33 err = omfs_allocate_range(dir->i_sb, sbi->s_mirrors, sbi->s_mirrors, in omfs_new_inode()
49 inode->i_size = sbi->s_sys_blocksize; in omfs_new_inode()
95 struct omfs_sb_info *sbi = OMFS_SB(inode->i_sb); in omfs_write_inode() local
104 block = clus_to_blk(sbi, inode->i_ino); in omfs_write_inode()
122 oi->i_head.h_body_size = cpu_to_be32(sbi->s_sys_blocksize - in omfs_write_inode()
143 for (i = 1; i < sbi->s_mirrors; i++) { in omfs_write_inode()
145 (sbi->s_blocksize / sbi->s_sys_blocksize)); in omfs_write_inode()
189 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_iget() local
203 block = clus_to_blk(sbi, ino); in omfs_iget()
214 inode->i_uid = sbi->s_uid; in omfs_iget()
215 inode->i_gid = sbi->s_gid; in omfs_iget()
231 inode->i_mode = S_IFDIR | (S_IRWXUGO & ~sbi->s_dmask); in omfs_iget()
234 inode->i_size = sbi->s_sys_blocksize; in omfs_iget()
238 inode->i_mode = S_IFREG | (S_IRWXUGO & ~sbi->s_fmask); in omfs_iget()
255 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_put_super() local
256 kfree(sbi->s_imap); in omfs_put_super()
257 kfree(sbi); in omfs_put_super()
264 struct omfs_sb_info *sbi = OMFS_SB(s); in omfs_statfs() local
266 buf->f_bsize = sbi->s_blocksize; in omfs_statfs()
267 buf->f_blocks = sbi->s_num_blocks; in omfs_statfs()
268 buf->f_files = sbi->s_num_blocks; in omfs_statfs()
296 struct omfs_sb_info *sbi = OMFS_SB(sb); in omfs_get_imap() local
301 bitmap_size = DIV_ROUND_UP(sbi->s_num_blocks, 8); in omfs_get_imap()
304 if (sbi->s_bitmap_ino == ~0ULL) in omfs_get_imap()
307 sbi->s_imap_size = array_size; in omfs_get_imap()
308 sbi->s_imap = kzalloc(array_size * sizeof(unsigned long *), GFP_KERNEL); in omfs_get_imap()
309 if (!sbi->s_imap) in omfs_get_imap()
312 block = clus_to_blk(sbi, sbi->s_bitmap_ino); in omfs_get_imap()
313 ptr = sbi->s_imap; in omfs_get_imap()
335 kfree(sbi->s_imap[count]); in omfs_get_imap()
337 kfree(sbi->s_imap); in omfs_get_imap()
339 sbi->s_imap = NULL; in omfs_get_imap()
340 sbi->s_imap_size = 0; in omfs_get_imap()
356 static int parse_options(char *options, struct omfs_sb_info *sbi) in parse_options() argument
375 sbi->s_uid = option; in parse_options()
380 sbi->s_gid = option; in parse_options()
385 sbi->s_fmask = sbi->s_dmask = option; in parse_options()
390 sbi->s_dmask = option; in parse_options()
395 sbi->s_fmask = option; in parse_options()
409 struct omfs_sb_info *sbi; in omfs_fill_super() local
416 sbi = kzalloc(sizeof(struct omfs_sb_info), GFP_KERNEL); in omfs_fill_super()
417 if (!sbi) in omfs_fill_super()
420 sb->s_fs_info = sbi; in omfs_fill_super()
422 sbi->s_uid = current_uid(); in omfs_fill_super()
423 sbi->s_gid = current_gid(); in omfs_fill_super()
424 sbi->s_dmask = sbi->s_fmask = current->fs->umask; in omfs_fill_super()
426 if (!parse_options((char *) data, sbi)) in omfs_fill_super()
447 sbi->s_num_blocks = be64_to_cpu(omfs_sb->s_num_blocks); in omfs_fill_super()
448 sbi->s_blocksize = be32_to_cpu(omfs_sb->s_blocksize); in omfs_fill_super()
449 sbi->s_mirrors = be32_to_cpu(omfs_sb->s_mirrors); in omfs_fill_super()
450 sbi->s_root_ino = be64_to_cpu(omfs_sb->s_root_block); in omfs_fill_super()
451 sbi->s_sys_blocksize = be32_to_cpu(omfs_sb->s_sys_blocksize); in omfs_fill_super()
452 mutex_init(&sbi->s_bitmap_lock); in omfs_fill_super()
454 if (sbi->s_sys_blocksize > PAGE_SIZE) { in omfs_fill_super()
456 sbi->s_sys_blocksize); in omfs_fill_super()
460 if (sbi->s_blocksize < sbi->s_sys_blocksize || in omfs_fill_super()
461 sbi->s_blocksize > OMFS_MAX_BLOCK_SIZE) { in omfs_fill_super()
463 sbi->s_blocksize); in omfs_fill_super()
471 sb_set_blocksize(sb, sbi->s_sys_blocksize); in omfs_fill_super()
477 sbi->s_block_shift = get_bitmask_order(sbi->s_blocksize) - in omfs_fill_super()
478 get_bitmask_order(sbi->s_sys_blocksize); in omfs_fill_super()
480 start = clus_to_blk(sbi, be64_to_cpu(omfs_sb->s_root_block)); in omfs_fill_super()
487 sbi->s_bitmap_ino = be64_to_cpu(omfs_rb->r_bitmap); in omfs_fill_super()
488 sbi->s_clustersize = be32_to_cpu(omfs_rb->r_clustersize); in omfs_fill_super()
490 if (sbi->s_num_blocks != be64_to_cpu(omfs_rb->r_num_blocks)) { in omfs_fill_super()
493 (unsigned long long)sbi->s_num_blocks, in omfs_fill_super()