• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/hfsplus_journal/

Lines Matching defs:hfsplus_handle

14 static struct hfs_bnode *hfs_bnode_split(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd);
15 static int hfs_brec_update_parent(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd);
16 static int hfs_btree_inc_height(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *);
56 int hfs_brec_insert(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd, void *entry, int entry_len)
68 hfs_btree_inc_height(hfsplus_handle, tree);
69 fd->bnode = hfs_bnode_find(hfsplus_handle, tree, tree->leaf_head);
91 new_node = hfs_bnode_split(hfsplus_handle, fd);
98 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))
103 hfs_bnode_write_u16(hfsplus_handle, node, offsetof(struct hfs_bnode_desc, num_recs), node->num_recs);
104 hfs_bnode_write_u16(hfsplus_handle, node, end_rec_off, end_off + size);
113 hfs_bnode_write_u16(hfsplus_handle, node, data_rec_off, data_off + size);
118 hfs_bnode_move(hfsplus_handle, node, data_off + size, data_off,
122 hfs_bnode_write(hfsplus_handle, node, fd->search_key, data_off, key_len);
123 hfs_bnode_write(hfsplus_handle, node, entry, data_off + key_len, entry_len);
131 hfs_brec_update_parent(hfsplus_handle, fd);
133 hfs_bnode_put(hfsplus_handle, fd->bnode);
135 hfs_btree_inc_height(hfsplus_handle, tree);
138 fd->bnode = hfs_bnode_find(hfsplus_handle, tree, new_node->parent);
149 hfs_bnode_put(hfsplus_handle, new_node);
162 hfs_brec_update_parent(hfsplus_handle, fd);
167 int hfs_brec_remove(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd)
181 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))
187 hfs_bnode_unlink(hfsplus_handle, node);
190 parent = hfs_bnode_find(hfsplus_handle, tree, node->parent);
193 hfs_bnode_put(hfsplus_handle, node);
199 hfs_bnode_write_u16(hfsplus_handle, node, offsetof(struct hfs_bnode_desc, num_recs), node->num_recs);
207 hfs_bnode_write_u16(hfsplus_handle, node, rec_off + 2, data_off - size);
212 hfs_bnode_move(hfsplus_handle, node, fd->keyoffset, fd->keyoffset + size,
217 hfs_brec_update_parent(hfsplus_handle, fd);
221 static struct hfs_bnode *hfs_bnode_split(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd)
231 new_node = hfs_bmap_alloc(hfsplus_handle, tree);
244 next_node = hfs_bnode_find(hfsplus_handle,tree, node->next);
249 hfs_bnode_put(hfsplus_handle,node);
250 hfs_bnode_put(hfsplus_handle,new_node);
265 hfs_bnode_put(hfsplus_handle, node);
266 hfs_bnode_put(hfsplus_handle, new_node);
268 hfs_bnode_put(hfsplus_handle,next_node);
280 hfs_bnode_put(hfsplus_handle, node);
296 hfs_bnode_write_u16(hfsplus_handle, new_node, new_rec_off, new_off);
303 hfs_bnode_write_u16(hfsplus_handle, new_node, new_rec_off, new_off);
304 hfs_bnode_copy(hfsplus_handle, new_node, 14, node, data_start, data_end - data_start);
313 hfs_bnode_write(hfsplus_handle, new_node, &node_desc, 0, sizeof(node_desc));
320 hfs_bnode_write(hfsplus_handle, node, &node_desc, 0, sizeof(node_desc));
327 hfs_bnode_write(hfsplus_handle, next_node, &node_desc, 0, sizeof(node_desc));
328 hfs_bnode_put(hfsplus_handle, next_node);
332 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))
338 hfs_bnode_put(hfsplus_handle, node);
343 static int hfs_brec_update_parent(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd)
358 parent = hfs_bnode_find(hfsplus_handle, tree, node->parent);
383 new_node = hfs_bnode_split(hfsplus_handle, fd);
394 hfs_bnode_write_u16(hfsplus_handle, parent, rec_off, start_off + diff);
400 hfs_bnode_write_u16(hfsplus_handle, parent, rec_off, end_off + diff);
402 hfs_bnode_move(hfsplus_handle, parent, start_off + diff, start_off,
405 hfs_bnode_copy(hfsplus_handle, parent, fd->keyoffset, node, 14, newkeylen);
408 hfs_bnode_put(hfsplus_handle, node);
414 fd->bnode = hfs_bnode_find(hfsplus_handle, tree, new_node->parent);
420 hfs_brec_insert(hfsplus_handle, fd, &cnid, sizeof(cnid));
421 hfs_bnode_put(hfsplus_handle, fd->bnode);
422 hfs_bnode_put(hfsplus_handle, new_node);
439 static int hfs_btree_inc_height(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *tree)
448 node = hfs_bnode_find(hfsplus_handle, tree, tree->root);
452 new_node = hfs_bmap_alloc(hfsplus_handle, tree);
454 hfs_bnode_put(hfsplus_handle, node);
478 hfs_bnode_write(hfsplus_handle, new_node, &node_desc, 0, sizeof(node_desc));
481 hfs_bnode_write_u16(hfsplus_handle, new_node, rec, 14);
491 hfs_bnode_copy(hfsplus_handle, new_node, 14, node, 14, key_size);
495 hfs_bnode_write_u16(hfsplus_handle, new_node, 14, tree->max_key_len);
498 hfs_bnode_write(hfsplus_handle, new_node, &cnid, 14 + key_size, 4);
501 hfs_bnode_write_u16(hfsplus_handle, new_node, rec, 14 + key_size + 4);
503 hfs_bnode_put(hfsplus_handle, node);
505 hfs_bnode_put(hfsplus_handle, new_node);
506 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))