Lines Matching refs:sb

39 static inline loff_t fat_make_i_pos(struct super_block *sb,  in fat_make_i_pos()  argument
43 return ((loff_t)bh->b_blocknr << MSDOS_SB(sb)->dir_per_block_bits) in fat_make_i_pos()
50 struct super_block *sb = dir->i_sb; in fat_dir_readahead() local
51 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_dir_readahead()
62 bh = sb_find_get_block(sb, phys); in fat_dir_readahead()
65 sb_breadahead(sb, phys + sec); in fat_dir_readahead()
83 struct super_block *sb = dir->i_sb; in fat__get_entry() local
93 iblock = *pos >> sb->s_blocksize_bits; in fat__get_entry()
100 *bh = sb_bread(sb, phys); in fat__get_entry()
102 fat_msg_ratelimit(sb, KERN_ERR, in fat__get_entry()
105 *pos = (iblock + 1) << sb->s_blocksize_bits; in fat__get_entry()
109 offset = *pos & (sb->s_blocksize - 1); in fat__get_entry()
141 static int uni16_to_x8(struct super_block *sb, unsigned char *ascii, in uni16_to_x8() argument
144 int uni_xlate = MSDOS_SB(sb)->options.unicode_xlate; in uni16_to_x8()
173 fat_msg(sb, KERN_WARNING, in uni16_to_x8()
181 static inline int fat_uni_to_x8(struct super_block *sb, const wchar_t *uni, in fat_uni_to_x8() argument
184 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_uni_to_x8()
189 return uni16_to_x8(sb, buf, uni, size, sbi->nls_io); in fat_uni_to_x8()
350 static int fat_parse_short(struct super_block *sb, in fat_parse_short() argument
354 const struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_parse_short()
451 name_len = fat_uni_to_x8(sb, uni_name, name, in fat_parse_short()
465 struct super_block *sb = inode->i_sb; in fat_search_long() local
466 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_search_long()
506 len = fat_parse_short(sb, de, bufname, 0); in fat_search_long()
519 len = fat_uni_to_x8(sb, unicode, longname, size); in fat_search_long()
531 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_search_long()
556 struct super_block *sb = inode->i_sb; in __fat_readdir() local
557 struct msdos_sb_info *sbi = MSDOS_SB(sb); in __fat_readdir()
626 int len = fat_uni_to_x8(sb, unicode, longname, size); in __fat_readdir()
634 short_len = fat_parse_short(sb, de, bufname, in __fat_readdir()
649 short_len = fat_parse_short(sb, de, bufname, sbi->options.dotsOK); in __fat_readdir()
668 loff_t i_pos = fat_make_i_pos(sb, bh, de); in __fat_readdir()
669 struct inode *tmp = fat_iget(sb, i_pos); in __fat_readdir()
674 inum = iunique(sb, MSDOS_ROOT_INO); in __fat_readdir()
951 struct super_block *sb = dir->i_sb; in fat_scan() local
960 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_scan()
975 struct super_block *sb = dir->i_sb; in fat_scan_logstart() local
981 if (fat_get_start(MSDOS_SB(sb), sinfo->de) == i_logstart) { in fat_scan_logstart()
984 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_scan_logstart()
993 struct super_block *sb = dir->i_sb; in __fat_remove_entries() local
1006 endp = (struct msdos_dir_entry *)(bh->b_data + sb->s_blocksize); in __fat_remove_entries()
1028 struct super_block *sb = dir->i_sb; in fat_remove_entries() local
1063 fat_msg(sb, KERN_WARNING, in fat_remove_entries()
1081 struct super_block *sb = dir->i_sb; in fat_zeroed_cluster() local
1082 sector_t last_blknr = blknr + MSDOS_SB(sb)->sec_per_clus; in fat_zeroed_cluster()
1089 bhs[n] = sb_getblk(sb, blknr); in fat_zeroed_cluster()
1094 memset(bhs[n]->b_data, 0, sb->s_blocksize); in fat_zeroed_cluster()
1129 struct super_block *sb = dir->i_sb; in fat_alloc_new_dir() local
1130 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_alloc_new_dir()
1143 bhs[0] = sb_getblk(sb, blknr); in fat_alloc_new_dir()
1172 memset(de + 2, 0, sb->s_blocksize - 2 * sizeof(*de)); in fat_alloc_new_dir()
1193 struct super_block *sb = dir->i_sb; in fat_add_new_entries() local
1194 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_add_new_entries()
1223 bhs[n] = sb_getblk(sb, blknr); in fat_add_new_entries()
1230 copy = min(size, sb->s_blocksize); in fat_add_new_entries()
1243 memset(bhs[n]->b_data + copy, 0, sb->s_blocksize - copy); in fat_add_new_entries()
1248 *i_pos = fat_make_i_pos(sb, *bh, *de); in fat_add_new_entries()
1272 struct super_block *sb = dir->i_sb; in fat_add_entries() local
1273 struct msdos_sb_info *sbi = MSDOS_SB(sb); in fat_add_entries()
1311 fat_msg(sb, KERN_ERR, "Corrupted directory (i_pos %lld)", in fat_add_entries()
1328 int offset = pos & (sb->s_blocksize - 1); in fat_add_entries()
1333 int copy = min_t(int, sb->s_blocksize - offset, size); in fat_add_entries()
1344 int copy = min_t(int, sb->s_blocksize - offset, size); in fat_add_entries()
1376 fat_fs_error(sb, "Odd directory size"); in fat_add_entries()
1386 sinfo->i_pos = fat_make_i_pos(sb, sinfo->bh, sinfo->de); in fat_add_entries()