Lines Matching refs:s

11 __le32 *hpfs_map_dnode_bitmap(struct super_block *s, struct quad_buffer_head *qbh)  in hpfs_map_dnode_bitmap()  argument
13 return hpfs_map_4sectors(s, hpfs_sb(s)->sb_dmap, qbh, 0); in hpfs_map_dnode_bitmap()
16 __le32 *hpfs_map_bitmap(struct super_block *s, unsigned bmp_block, in hpfs_map_bitmap() argument
21 unsigned n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; in hpfs_map_bitmap()
22 if (hpfs_sb(s)->sb_chk) if (bmp_block >= n_bands) { in hpfs_map_bitmap()
23 hpfs_error(s, "hpfs_map_bitmap called with bad parameter: %08x at %s", bmp_block, id); in hpfs_map_bitmap()
26 sec = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block]); in hpfs_map_bitmap()
27 if (!sec || sec > hpfs_sb(s)->sb_fs_size-4) { in hpfs_map_bitmap()
28 hpfs_error(s, "invalid bitmap block pointer %08x -> %08x at %s", bmp_block, sec, id); in hpfs_map_bitmap()
31 ret = hpfs_map_4sectors(s, sec, qbh, 4); in hpfs_map_bitmap()
32 if (ret) hpfs_prefetch_bitmap(s, bmp_block + 1); in hpfs_map_bitmap()
36 void hpfs_prefetch_bitmap(struct super_block *s, unsigned bmp_block) in hpfs_prefetch_bitmap() argument
39 unsigned n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; in hpfs_prefetch_bitmap()
42 to_prefetch = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block]); in hpfs_prefetch_bitmap()
46 next_prefetch = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block + 1]); in hpfs_prefetch_bitmap()
47 hpfs_prefetch_sectors(s, to_prefetch, 4 + 4 * (to_prefetch + 4 == next_prefetch)); in hpfs_prefetch_bitmap()
56 unsigned char *hpfs_load_code_page(struct super_block *s, secno cps) in hpfs_load_code_page() argument
65 struct code_page_directory *cp = hpfs_map_sector(s, cps, &bh, 0); in hpfs_load_code_page()
87 if (!(cpd = hpfs_map_sector(s, cpds, &bh, 0))) return NULL; in hpfs_load_code_page()
111 __le32 *hpfs_load_bitmap_directory(struct super_block *s, secno bmp) in hpfs_load_bitmap_directory() argument
114 int n = (hpfs_sb(s)->sb_fs_size + 0x200000 - 1) >> 21; in hpfs_load_bitmap_directory()
122 __le32 *d = hpfs_map_sector(s, bmp+i, &bh, n - i - 1); in hpfs_load_bitmap_directory()
137 struct fnode *hpfs_map_fnode(struct super_block *s, ino_t ino, struct buffer_head **bhp) in hpfs_map_fnode() argument
140 if (hpfs_sb(s)->sb_chk) if (hpfs_chk_sectors(s, ino, 1, "fnode")) { in hpfs_map_fnode()
143 if ((fnode = hpfs_map_sector(s, ino, bhp, FNODE_RD_AHEAD))) { in hpfs_map_fnode()
144 if (hpfs_sb(s)->sb_chk) { in hpfs_map_fnode()
148 hpfs_error(s, "bad magic on fnode %08lx", in hpfs_map_fnode()
155 hpfs_error(s, in hpfs_map_fnode()
162 hpfs_error(s, in hpfs_map_fnode()
170 hpfs_error(s, in hpfs_map_fnode()
180 hpfs_error(s, "bad EA in fnode %08lx", in hpfs_map_fnode()
194 struct anode *hpfs_map_anode(struct super_block *s, anode_secno ano, struct buffer_head **bhp) in hpfs_map_anode() argument
197 if (hpfs_sb(s)->sb_chk) if (hpfs_chk_sectors(s, ano, 1, "anode")) return NULL; in hpfs_map_anode()
198 if ((anode = hpfs_map_sector(s, ano, bhp, ANODE_RD_AHEAD))) in hpfs_map_anode()
199 if (hpfs_sb(s)->sb_chk) { in hpfs_map_anode()
201 hpfs_error(s, "bad magic on anode %08x", ano); in hpfs_map_anode()
205 hpfs_error(s, "self pointer invalid on anode %08x", ano); in hpfs_map_anode()
210 hpfs_error(s, "bad number of nodes in anode %08x", ano); in hpfs_map_anode()
215 hpfs_error(s, "bad first_free pointer in anode %08x", ano); in hpfs_map_anode()
229 struct dnode *hpfs_map_dnode(struct super_block *s, unsigned secno, in hpfs_map_dnode() argument
233 if (hpfs_sb(s)->sb_chk) { in hpfs_map_dnode()
234 if (hpfs_chk_sectors(s, secno, 4, "dnode")) return NULL; in hpfs_map_dnode()
236 hpfs_error(s, "dnode %08x not byte-aligned", secno); in hpfs_map_dnode()
240 if ((dnode = hpfs_map_4sectors(s, secno, qbh, DNODE_RD_AHEAD))) in hpfs_map_dnode()
241 if (hpfs_sb(s)->sb_chk) { in hpfs_map_dnode()
246 hpfs_error(s, "bad magic on dnode %08x", secno); in hpfs_map_dnode()
250 hpfs_error(s, "bad self pointer on dnode %08x self = %08x", secno, le32_to_cpu(dnode->self)); in hpfs_map_dnode()
254 hpfs_error(s, "dnode %08x has first_free == %08x", secno, le32_to_cpu(dnode->first_free)); in hpfs_map_dnode()
260 hpfs_error(s, "bad dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); in hpfs_map_dnode()
264 …if (((31 + de->namelen + de->down*4 + 3) & ~3) < le16_to_cpu(de->length) && s->s_flags & MS_RDONLY… in hpfs_map_dnode()
265 …hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p… in hpfs_map_dnode()
269 if (hpfs_sb(s)->sb_chk >= 2) b |= 1 << de->down; in hpfs_map_dnode()
271 hpfs_error(s, "bad down pointer in dnode %08x, dirent %03x, last %03x", secno, p, pp); in hpfs_map_dnode()
278 hpfs_error(s, "size on last dirent does not match first_free; dnode %08x", secno); in hpfs_map_dnode()
282 hpfs_error(s, "dnode %08x does not end with \\377 entry", secno); in hpfs_map_dnode()
295 dnode_secno hpfs_fnode_dno(struct super_block *s, ino_t ino) in hpfs_fnode_dno() argument
301 fnode = hpfs_map_fnode(s, ino, &bh); in hpfs_fnode_dno()