Lines Matching refs:off
21 void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len) in hfs_bnode_read() argument
26 off += node->page_offset; in hfs_bnode_read()
27 pagep = node->page + (off >> PAGE_CACHE_SHIFT); in hfs_bnode_read()
28 off &= ~PAGE_CACHE_MASK; in hfs_bnode_read()
30 l = min(len, (int)PAGE_CACHE_SIZE - off); in hfs_bnode_read()
31 memcpy(buf, kmap(*pagep) + off, l); in hfs_bnode_read()
42 u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off) in hfs_bnode_read_u16() argument
46 hfs_bnode_read(node, &data, off, 2); in hfs_bnode_read_u16()
50 u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off) in hfs_bnode_read_u8() argument
54 hfs_bnode_read(node, &data, off, 1); in hfs_bnode_read_u8()
58 void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off) in hfs_bnode_read_key() argument
66 key_len = hfs_bnode_read_u16(node, off) + 2; in hfs_bnode_read_key()
70 hfs_bnode_read(node, key, off, key_len); in hfs_bnode_read_key()
73 void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len) in hfs_bnode_write() argument
78 off += node->page_offset; in hfs_bnode_write()
79 pagep = node->page + (off >> PAGE_CACHE_SHIFT); in hfs_bnode_write()
80 off &= ~PAGE_CACHE_MASK; in hfs_bnode_write()
82 l = min(len, (int)PAGE_CACHE_SIZE - off); in hfs_bnode_write()
83 memcpy(kmap(*pagep) + off, buf, l); in hfs_bnode_write()
96 void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data) in hfs_bnode_write_u16() argument
100 hfs_bnode_write(node, &v, off, 2); in hfs_bnode_write_u16()
103 void hfs_bnode_clear(struct hfs_bnode *node, int off, int len) in hfs_bnode_clear() argument
108 off += node->page_offset; in hfs_bnode_clear()
109 pagep = node->page + (off >> PAGE_CACHE_SHIFT); in hfs_bnode_clear()
110 off &= ~PAGE_CACHE_MASK; in hfs_bnode_clear()
112 l = min(len, (int)PAGE_CACHE_SIZE - off); in hfs_bnode_clear()
113 memset(kmap(*pagep) + off, 0, l); in hfs_bnode_clear()
302 int i, off, key_off; in hfs_bnode_dump() local
310 off = node->tree->node_size - 2; in hfs_bnode_dump()
311 for (i = be16_to_cpu(desc.num_recs); i >= 0; off -= 2, i--) { in hfs_bnode_dump()
312 key_off = hfs_bnode_read_u16(node, off); in hfs_bnode_dump()
407 loff_t off; in __hfs_bnode_create() local
446 off = (loff_t)cnid << tree->node_size_shift; in __hfs_bnode_create()
447 block = off >> PAGE_CACHE_SHIFT; in __hfs_bnode_create()
448 node->page_offset = off & ~PAGE_CACHE_MASK; in __hfs_bnode_create()
486 int i, rec_off, off, next_off; in hfs_bnode_find() local
537 off = hfs_bnode_read_u16(node, rec_off); in hfs_bnode_find()
538 if (off != sizeof(struct hfs_bnode_desc)) in hfs_bnode_find()
540 for (i = 1; i <= node->num_recs; off = next_off, i++) { in hfs_bnode_find()
543 if (next_off <= off || in hfs_bnode_find()
547 entry_size = next_off - off; in hfs_bnode_find()
551 key_size = hfs_bnode_read_u16(node, off) + 2; in hfs_bnode_find()