Lines Matching defs:pos
72 /* Returns the inode number of the directory entry at offset pos. If bh is
82 static int fat__get_entry(struct inode *dir, loff_t *pos,
93 iblock = *pos >> sb->s_blocksize_bits;
105 *pos = (iblock + 1) << sb->s_blocksize_bits;
109 offset = *pos & (sb->s_blocksize - 1);
110 *pos += sizeof(struct msdos_dir_entry);
116 static inline int fat_get_entry(struct inode *dir, loff_t *pos,
124 *pos += sizeof(struct msdos_dir_entry);
128 return fat__get_entry(dir, pos, bh, de);
279 static int fat_parse_long(struct inode *dir, loff_t *pos,
316 if (fat_get_entry(dir, pos, bh, de) < 0)
573 cpos = ctx->pos;
578 if (ctx->pos == 2) {
658 ctx->pos = cpos - (nr_slots + 1) * sizeof(struct msdos_dir_entry);
659 if (fake_offset && ctx->pos < 2)
660 ctx->pos = 2;
684 ctx->pos = cpos;
689 ctx->pos = 2;
691 ctx->pos = cpos;
774 buf.ctx.pos = file->f_pos;
779 file->f_pos = buf.ctx.pos;
869 static int fat_get_short_entry(struct inode *dir, loff_t *pos,
873 while (fat_get_entry(dir, pos, bh, de) >= 0) {
994 static int __fat_remove_entries(struct inode *dir, loff_t pos, int nr_slots)
1003 if (fat_get_entry(dir, &pos, &bh, &de) < 0) {
1022 /* pos is *next* de's position, so this does `- sizeof(de)' */
1023 pos += ((orig_slots - nr_slots) * sizeof(*de)) - sizeof(*de);
1289 loff_t pos, i_pos;
1296 pos = 0;
1298 while (fat_get_entry(dir, &pos, &bh, &de) > -1) {
1300 if (pos >= FAT_MAX_DIR_SIZE)
1331 pos -= free_slots * sizeof(*de);
1340 int offset = pos & (sb->s_blocksize - 1);
1395 sinfo->slot_off = pos;
1411 __fat_remove_entries(dir, pos, free_slots);