Lines Matching full:off
18 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 pagenum = off >> PAGE_SHIFT; in hfs_bnode_read()
28 off &= ~PAGE_MASK; /* compute page offset for the first page */ in hfs_bnode_read()
34 bytes_to_read = min_t(int, len - bytes_read, PAGE_SIZE - off); in hfs_bnode_read()
37 memcpy(buf + bytes_read, vaddr + off, bytes_to_read); in hfs_bnode_read()
41 off = 0; /* page offset only applies to the first page */ in hfs_bnode_read()
45 u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off) in hfs_bnode_read_u16() argument
49 hfs_bnode_read(node, &data, off, 2); in hfs_bnode_read_u16()
53 u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off) in hfs_bnode_read_u8() argument
57 hfs_bnode_read(node, &data, off, 1); in hfs_bnode_read_u8()
61 void hfs_bnode_read_key(struct hfs_bnode *node, void *key, int off) in hfs_bnode_read_key() argument
69 key_len = hfs_bnode_read_u8(node, off) + 1; in hfs_bnode_read_key()
73 hfs_bnode_read(node, key, off, key_len); in hfs_bnode_read_key()
76 void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len) in hfs_bnode_write() argument
80 off += node->page_offset; in hfs_bnode_write()
83 memcpy(kmap(page) + off, buf, len); in hfs_bnode_write()
88 void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data) in hfs_bnode_write_u16() argument
92 hfs_bnode_write(node, &v, off, 2); in hfs_bnode_write_u16()
95 void hfs_bnode_write_u8(struct hfs_bnode *node, int off, u8 data) in hfs_bnode_write_u8() argument
98 hfs_bnode_write(node, &data, off, 1); in hfs_bnode_write_u8()
101 void hfs_bnode_clear(struct hfs_bnode *node, int off, int len) in hfs_bnode_clear() argument
105 off += node->page_offset; in hfs_bnode_clear()
108 memset(kmap(page) + off, 0, len); in hfs_bnode_clear()
153 int i, off, key_off; in hfs_bnode_dump() local
161 off = node->tree->node_size - 2; in hfs_bnode_dump()
162 for (i = be16_to_cpu(desc.num_recs); i >= 0; off -= 2, i--) { in hfs_bnode_dump()
163 key_off = hfs_bnode_read_u16(node, off); in hfs_bnode_dump()
257 loff_t off; in __hfs_bnode_create() local
292 off = (loff_t)cnid * tree->node_size; in __hfs_bnode_create()
293 block = off >> PAGE_SHIFT; in __hfs_bnode_create()
294 node->page_offset = off & ~PAGE_MASK; in __hfs_bnode_create()
331 int i, rec_off, off, next_off; in hfs_bnode_find() local
380 off = hfs_bnode_read_u16(node, rec_off); in hfs_bnode_find()
381 if (off != sizeof(struct hfs_bnode_desc)) in hfs_bnode_find()
383 for (i = 1; i <= node->num_recs; off = next_off, i++) { in hfs_bnode_find()
386 if (next_off <= off || in hfs_bnode_find()
390 entry_size = next_off - off; in hfs_bnode_find()
394 key_size = hfs_bnode_read_u8(node, off) + 1; in hfs_bnode_find()