Lines Matching refs:s

12 __le32 *hpfs_map_dnode_bitmap(struct super_block *s, struct quad_buffer_head *qbh)  in hpfs_map_dnode_bitmap()  argument
14 return hpfs_map_4sectors(s, hpfs_sb(s)->sb_dmap, qbh, 0); in hpfs_map_dnode_bitmap()
17 __le32 *hpfs_map_bitmap(struct super_block *s, unsigned bmp_block, in hpfs_map_bitmap() argument
22 unsigned n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; in hpfs_map_bitmap()
23 if (hpfs_sb(s)->sb_chk) if (bmp_block >= n_bands) { in hpfs_map_bitmap()
24 hpfs_error(s, "hpfs_map_bitmap called with bad parameter: %08x at %s", bmp_block, id); in hpfs_map_bitmap()
27 sec = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block]); in hpfs_map_bitmap()
28 if (!sec || sec > hpfs_sb(s)->sb_fs_size-4) { in hpfs_map_bitmap()
29 hpfs_error(s, "invalid bitmap block pointer %08x -> %08x at %s", bmp_block, sec, id); in hpfs_map_bitmap()
32 ret = hpfs_map_4sectors(s, sec, qbh, 4); in hpfs_map_bitmap()
33 if (ret) hpfs_prefetch_bitmap(s, bmp_block + 1); in hpfs_map_bitmap()
37 void hpfs_prefetch_bitmap(struct super_block *s, unsigned bmp_block) in hpfs_prefetch_bitmap() argument
40 unsigned n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; in hpfs_prefetch_bitmap()
43 to_prefetch = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block]); in hpfs_prefetch_bitmap()
47 next_prefetch = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block + 1]); in hpfs_prefetch_bitmap()
48 hpfs_prefetch_sectors(s, to_prefetch, 4 + 4 * (to_prefetch + 4 == next_prefetch)); in hpfs_prefetch_bitmap()
57 unsigned char *hpfs_load_code_page(struct super_block *s, secno cps) in hpfs_load_code_page() argument
66 struct code_page_directory *cp = hpfs_map_sector(s, cps, &bh, 0); in hpfs_load_code_page()
88 if (!(cpd = hpfs_map_sector(s, cpds, &bh, 0))) return NULL; in hpfs_load_code_page()
112 __le32 *hpfs_load_bitmap_directory(struct super_block *s, secno bmp) in hpfs_load_bitmap_directory() argument
115 int n = (hpfs_sb(s)->sb_fs_size + 0x200000 - 1) >> 21; in hpfs_load_bitmap_directory()
123 __le32 *d = hpfs_map_sector(s, bmp+i, &bh, n - i - 1); in hpfs_load_bitmap_directory()
134 void hpfs_load_hotfix_map(struct super_block *s, struct hpfs_spare_block *spareblock) in hpfs_load_hotfix_map() argument
145 hpfs_error(s, "invalid number of hotfixes: %u, used: %u", n_hotfixes, n_used_hotfixes); in hpfs_load_hotfix_map()
148 if (!(directory = hpfs_map_4sectors(s, le32_to_cpu(spareblock->hotfix_map), &qbh, 0))) { in hpfs_load_hotfix_map()
149 hpfs_error(s, "can't load hotfix map"); in hpfs_load_hotfix_map()
153 hpfs_sb(s)->hotfix_from[i] = le32_to_cpu(directory[i]); in hpfs_load_hotfix_map()
154 hpfs_sb(s)->hotfix_to[i] = le32_to_cpu(directory[n_hotfixes + i]); in hpfs_load_hotfix_map()
156 hpfs_sb(s)->n_hotfixes = n_used_hotfixes; in hpfs_load_hotfix_map()
164 struct fnode *hpfs_map_fnode(struct super_block *s, ino_t ino, struct buffer_head **bhp) in hpfs_map_fnode() argument
167 if (hpfs_sb(s)->sb_chk) if (hpfs_chk_sectors(s, ino, 1, "fnode")) { in hpfs_map_fnode()
170 if ((fnode = hpfs_map_sector(s, ino, bhp, FNODE_RD_AHEAD))) { in hpfs_map_fnode()
171 if (hpfs_sb(s)->sb_chk) { in hpfs_map_fnode()
175 hpfs_error(s, "bad magic on fnode %08lx", in hpfs_map_fnode()
182 hpfs_error(s, in hpfs_map_fnode()
189 hpfs_error(s, in hpfs_map_fnode()
197 hpfs_error(s, in hpfs_map_fnode()
207 hpfs_error(s, "bad EA in fnode %08lx", in hpfs_map_fnode()
221 struct anode *hpfs_map_anode(struct super_block *s, anode_secno ano, struct buffer_head **bhp) in hpfs_map_anode() argument
224 if (hpfs_sb(s)->sb_chk) if (hpfs_chk_sectors(s, ano, 1, "anode")) return NULL; in hpfs_map_anode()
225 if ((anode = hpfs_map_sector(s, ano, bhp, ANODE_RD_AHEAD))) in hpfs_map_anode()
226 if (hpfs_sb(s)->sb_chk) { in hpfs_map_anode()
228 hpfs_error(s, "bad magic on anode %08x", ano); in hpfs_map_anode()
232 hpfs_error(s, "self pointer invalid on anode %08x", ano); in hpfs_map_anode()
237 hpfs_error(s, "bad number of nodes in anode %08x", ano); in hpfs_map_anode()
242 hpfs_error(s, "bad first_free pointer in anode %08x", ano); in hpfs_map_anode()
256 struct dnode *hpfs_map_dnode(struct super_block *s, unsigned secno, in hpfs_map_dnode() argument
260 if (hpfs_sb(s)->sb_chk) { in hpfs_map_dnode()
261 if (hpfs_chk_sectors(s, secno, 4, "dnode")) return NULL; in hpfs_map_dnode()
263 hpfs_error(s, "dnode %08x not byte-aligned", secno); in hpfs_map_dnode()
267 if ((dnode = hpfs_map_4sectors(s, secno, qbh, DNODE_RD_AHEAD))) in hpfs_map_dnode()
268 if (hpfs_sb(s)->sb_chk) { in hpfs_map_dnode()
273 hpfs_error(s, "bad magic on dnode %08x", secno); in hpfs_map_dnode()
277 hpfs_error(s, "bad self pointer on dnode %08x self = %08x", secno, le32_to_cpu(dnode->self)); in hpfs_map_dnode()
281 hpfs_error(s, "dnode %08x has first_free == %08x", secno, le32_to_cpu(dnode->first_free)); in hpfs_map_dnode()
287 hpfs_error(s, "bad dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); in hpfs_map_dnode()
291 …if (((31 + de->namelen + de->down*4 + 3) & ~3) < le16_to_cpu(de->length) && s->s_flags & SB_RDONLY… in hpfs_map_dnode()
292 …hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p… in hpfs_map_dnode()
296 if (hpfs_sb(s)->sb_chk >= 2) b |= 1 << de->down; in hpfs_map_dnode()
298 hpfs_error(s, "bad down pointer in dnode %08x, dirent %03x, last %03x", secno, p, pp); in hpfs_map_dnode()
305 hpfs_error(s, "size on last dirent does not match first_free; dnode %08x", secno); in hpfs_map_dnode()
309 hpfs_error(s, "dnode %08x does not end with \\377 entry", secno); in hpfs_map_dnode()
322 dnode_secno hpfs_fnode_dno(struct super_block *s, ino_t ino) in hpfs_fnode_dno() argument
328 fnode = hpfs_map_fnode(s, ino, &bh); in hpfs_fnode_dno()