Lines Matching refs:s
11 unsigned *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 unsigned int *hpfs_map_bitmap(struct super_block *s, unsigned bmp_block, in hpfs_map_bitmap() argument
20 unsigned n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14; in hpfs_map_bitmap()
21 if (hpfs_sb(s)->sb_chk) if (bmp_block >= n_bands) { in hpfs_map_bitmap()
22 hpfs_error(s, "hpfs_map_bitmap called with bad parameter: %08x at %s", bmp_block, id); in hpfs_map_bitmap()
25 sec = le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[bmp_block]); in hpfs_map_bitmap()
26 if (!sec || sec > hpfs_sb(s)->sb_fs_size-4) { in hpfs_map_bitmap()
27 hpfs_error(s, "invalid bitmap block pointer %08x -> %08x at %s", bmp_block, sec, id); in hpfs_map_bitmap()
30 return hpfs_map_4sectors(s, sec, qbh, 4); in hpfs_map_bitmap()
39 unsigned char *hpfs_load_code_page(struct super_block *s, secno cps) in hpfs_load_code_page() argument
48 struct code_page_directory *cp = hpfs_map_sector(s, cps, &bh, 0); in hpfs_load_code_page()
69 if (!(cpd = hpfs_map_sector(s, cpds, &bh, 0))) return NULL; in hpfs_load_code_page()
93 secno *hpfs_load_bitmap_directory(struct super_block *s, secno bmp) in hpfs_load_bitmap_directory() argument
96 int n = (hpfs_sb(s)->sb_fs_size + 0x200000 - 1) >> 21; in hpfs_load_bitmap_directory()
104 secno *d = hpfs_map_sector(s, bmp+i, &bh, n - i - 1); in hpfs_load_bitmap_directory()
119 struct fnode *hpfs_map_fnode(struct super_block *s, ino_t ino, struct buffer_head **bhp) in hpfs_map_fnode() argument
122 if (hpfs_sb(s)->sb_chk) if (hpfs_chk_sectors(s, ino, 1, "fnode")) { in hpfs_map_fnode()
125 if ((fnode = hpfs_map_sector(s, ino, bhp, FNODE_RD_AHEAD))) { in hpfs_map_fnode()
126 if (hpfs_sb(s)->sb_chk) { in hpfs_map_fnode()
130 hpfs_error(s, "bad magic on fnode %08lx", in hpfs_map_fnode()
137 hpfs_error(s, in hpfs_map_fnode()
144 hpfs_error(s, in hpfs_map_fnode()
152 hpfs_error(s, in hpfs_map_fnode()
162 hpfs_error(s, "bad EA in fnode %08lx", in hpfs_map_fnode()
176 struct anode *hpfs_map_anode(struct super_block *s, anode_secno ano, struct buffer_head **bhp) in hpfs_map_anode() argument
179 if (hpfs_sb(s)->sb_chk) if (hpfs_chk_sectors(s, ano, 1, "anode")) return NULL; in hpfs_map_anode()
180 if ((anode = hpfs_map_sector(s, ano, bhp, ANODE_RD_AHEAD))) in hpfs_map_anode()
181 if (hpfs_sb(s)->sb_chk) { in hpfs_map_anode()
183 hpfs_error(s, "bad magic on anode %08x", ano); in hpfs_map_anode()
187 hpfs_error(s, "self pointer invalid on anode %08x", ano); in hpfs_map_anode()
192 hpfs_error(s, "bad number of nodes in anode %08x", ano); in hpfs_map_anode()
197 hpfs_error(s, "bad first_free pointer in anode %08x", ano); in hpfs_map_anode()
211 struct dnode *hpfs_map_dnode(struct super_block *s, unsigned secno, in hpfs_map_dnode() argument
215 if (hpfs_sb(s)->sb_chk) { in hpfs_map_dnode()
216 if (hpfs_chk_sectors(s, secno, 4, "dnode")) return NULL; in hpfs_map_dnode()
218 hpfs_error(s, "dnode %08x not byte-aligned", secno); in hpfs_map_dnode()
222 if ((dnode = hpfs_map_4sectors(s, secno, qbh, DNODE_RD_AHEAD))) in hpfs_map_dnode()
223 if (hpfs_sb(s)->sb_chk) { in hpfs_map_dnode()
228 hpfs_error(s, "bad magic on dnode %08x", secno); in hpfs_map_dnode()
232 hpfs_error(s, "bad self pointer on dnode %08x self = %08x", secno, le32_to_cpu(dnode->self)); in hpfs_map_dnode()
236 hpfs_error(s, "dnode %08x has first_free == %08x", secno, le32_to_cpu(dnode->first_free)); in hpfs_map_dnode()
242 hpfs_error(s, "bad dirent size in dnode %08x, dirent %03x, last %03x", secno, p, pp); in hpfs_map_dnode()
246 …if (((31 + de->namelen + de->down*4 + 3) & ~3) < le16_to_cpu(de->length) && s->s_flags & MS_RDONLY… in hpfs_map_dnode()
247 …hpfs_error(s, "namelen does not match dirent size in dnode %08x, dirent %03x, last %03x", secno, p… in hpfs_map_dnode()
251 if (hpfs_sb(s)->sb_chk >= 2) b |= 1 << de->down; in hpfs_map_dnode()
253 hpfs_error(s, "bad down pointer in dnode %08x, dirent %03x, last %03x", secno, p, pp); in hpfs_map_dnode()
260 hpfs_error(s, "size on last dirent does not match first_free; dnode %08x", secno); in hpfs_map_dnode()
264 hpfs_error(s, "dnode %08x does not end with \\377 entry", secno); in hpfs_map_dnode()
275 dnode_secno hpfs_fnode_dno(struct super_block *s, ino_t ino) in hpfs_fnode_dno() argument
281 fnode = hpfs_map_fnode(s, ino, &bh); in hpfs_fnode_dno()