Lines Matching refs:pos
16 unsigned pos = 0; in hpfs_ea_ext_remove() local
17 while (pos < len) { in hpfs_ea_ext_remove()
20 if (pos + 4 > len) { in hpfs_ea_ext_remove()
25 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return; in hpfs_ea_ext_remove()
29 ano ? "anode" : "sectors", a, pos); in hpfs_ea_ext_remove()
32 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove()
36 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove()
76 unsigned pos; in hpfs_read_ea() local
95 pos = 0; in hpfs_read_ea()
96 while (pos < len) { in hpfs_read_ea()
98 if (pos + 4 > len) { in hpfs_read_ea()
103 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return -EIO; in hpfs_read_ea()
104 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_read_ea()
111 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), buf)) in hpfs_read_ea()
116 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_read_ea()
132 unsigned pos; in hpfs_get_ea() local
152 pos = 0; in hpfs_get_ea()
153 while (pos < len) { in hpfs_get_ea()
156 if (pos + 4 > len) { in hpfs_get_ea()
161 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return NULL; in hpfs_get_ea()
162 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_get_ea()
171 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), ret)) { in hpfs_get_ea()
178 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_get_ea()
194 unsigned pos; in hpfs_set_ea() local
213 pos = 0; in hpfs_set_ea()
214 while (pos < len) { in hpfs_set_ea()
217 if (pos + 4 > len) { in hpfs_set_ea()
222 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return; in hpfs_set_ea()
223 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_set_ea()
232 hpfs_ea_write(s, a, ano, pos + 4 + ea->namelen + 1, size, data); in hpfs_set_ea()
236 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_set_ea()
283 pos = le32_to_cpu(fnode->ea_size_l) + 5 + strlen(key) + size; in hpfs_set_ea()
285 if (pos >= 30000) goto bail; in hpfs_set_ea()
286 while (((pos + 511) >> 9) > len) { in hpfs_set_ea()
317 if (!(new_sec = hpfs_alloc_sector(s, fno, 1, 1 - ((pos + 511) >> 9)))) in hpfs_set_ea()
323 hpfs_free_sectors(s, new_sec, (pos + 511) >> 9); in hpfs_set_ea()
328 hpfs_free_sectors(s, new_sec, (pos + 511) >> 9); in hpfs_set_ea()
338 len = (pos + 511) >> 9; in hpfs_set_ea()
357 fnode->ea_size_l = cpu_to_le32(pos); in hpfs_set_ea()