Lines Matching defs:offset

67 static unsigned long cramino(const struct cramfs_inode *cino, unsigned int offset)
69 if (!cino->offset)
70 return offset + 1;
72 return offset + 1;
76 * cramfs_inode->offset is set to a non zero value for entries
83 return cino->offset << 2;
87 return offset + 1;
91 const struct cramfs_inode *cramfs_inode, unsigned int offset)
96 inode = iget_locked(sb, cramino(cramfs_inode, offset));
182 static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset,
193 blocknr = offset >> PAGE_SHIFT;
194 offset &= PAGE_SIZE - 1;
205 blk_offset += offset;
257 return read_buffers[buffer] + offset;
263 static void *cramfs_direct_read(struct super_block *sb, unsigned int offset,
270 if (len > sbi->size || offset > sbi->size - len)
272 return sbi->linear_virt_addr + offset;
277 * filesystem starting at byte offset OFFSET into the filesystem.
279 static void *cramfs_read(struct super_block *sb, unsigned int offset,
285 return cramfs_direct_read(sb, offset, len);
287 return cramfs_blkdev_read(sb, offset, len);
294 * contiguous blocks. Return the offset for the first block and number of
359 unsigned int pages, max_pages, offset;
384 offset = cramfs_get_block_range(inode, pgoff, &pages);
386 if (!offset)
388 address = sbi->linear_phys_addr + offset;
409 * in /proc/<pid>/maps by substituting the file offset
461 unsigned int pages, block_pages, max_pages, offset;
468 offset = cramfs_get_block_range(inode, pgoff, &block_pages);
469 if (!offset || block_pages != pages)
471 addr = sbi->linear_phys_addr + offset;
541 /* check at 512 byte offset */
570 root_offset = super->root.offset << 2;
588 errorfc(fc, "bad root offset %lu", root_offset);
706 unsigned int offset;
711 offset = ctx->pos;
713 if (offset & 3)
720 while (offset < inode->i_size) {
729 de = cramfs_read(sb, OFFSET(inode) + offset, sizeof(*de)+CRAMFS_MAXPATHLEN);
739 ino = cramino(de, OFFSET(inode) + offset);
742 nextoffset = offset + sizeof(*de) + namelen;
755 ctx->pos = offset = nextoffset;
766 unsigned int offset = 0;
772 while (offset < dir->i_size) {
776 int dir_off = OFFSET(dir) + offset;
786 offset += sizeof(*de) + namelen;