• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/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 *);
53 int hfs_brec_insert(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd, void *entry, int entry_len)
65 hfs_btree_inc_height(hfsplus_handle, tree);
66 fd->bnode = hfs_bnode_find(hfsplus_handle, tree, tree->leaf_head);
88 new_node = hfs_bnode_split(hfsplus_handle, fd);
95 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))
100 hfs_bnode_write_u16(hfsplus_handle, node, offsetof(struct hfs_bnode_desc, num_recs), node->num_recs);
101 hfs_bnode_write_u16(hfsplus_handle, node, end_rec_off, end_off + size);
110 hfs_bnode_write_u16(hfsplus_handle, node, data_rec_off, data_off + size);
115 hfs_bnode_move(hfsplus_handle, node, data_off + size, data_off,
119 hfs_bnode_write(hfsplus_handle, node, fd->search_key, data_off, key_len);
120 hfs_bnode_write(hfsplus_handle, node, entry, data_off + key_len, entry_len);
128 hfs_brec_update_parent(hfsplus_handle, fd);
130 hfs_bnode_put(hfsplus_handle, fd->bnode);
132 hfs_btree_inc_height(hfsplus_handle, tree);
135 fd->bnode = hfs_bnode_find(hfsplus_handle, tree, new_node->parent);
146 hfs_bnode_put(hfsplus_handle, new_node);
159 hfs_brec_update_parent(hfsplus_handle, fd);
164 int hfs_brec_remove(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd)
178 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))
184 hfs_bnode_unlink(hfsplus_handle, node);
187 parent = hfs_bnode_find(hfsplus_handle, tree, node->parent);
190 hfs_bnode_put(hfsplus_handle, node);
196 hfs_bnode_write_u16(hfsplus_handle, node, offsetof(struct hfs_bnode_desc, num_recs), node->num_recs);
204 hfs_bnode_write_u16(hfsplus_handle, node, rec_off + 2, data_off - size);
209 hfs_bnode_move(hfsplus_handle, node, fd->keyoffset, fd->keyoffset + size,
214 hfs_brec_update_parent(hfsplus_handle, fd);
218 static struct hfs_bnode *hfs_bnode_split(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd)
228 new_node = hfs_bmap_alloc(hfsplus_handle, tree);
251 hfs_bnode_put(hfsplus_handle, node);
252 hfs_bnode_put(hfsplus_handle, new_node);
264 hfs_bnode_put(hfsplus_handle, node);
280 hfs_bnode_write_u16(hfsplus_handle, new_node, new_rec_off, new_off);
287 hfs_bnode_write_u16(hfsplus_handle, new_node, new_rec_off, new_off);
288 hfs_bnode_copy(hfsplus_handle, new_node, 14, node, data_start, data_end - data_start);
297 hfs_bnode_write(hfsplus_handle, new_node, &node_desc, 0, sizeof(node_desc));
304 hfs_bnode_write(hfsplus_handle, node, &node_desc, 0, sizeof(node_desc));
308 struct hfs_bnode *next_node = hfs_bnode_find(hfsplus_handle, tree, new_node->next);
312 hfs_bnode_write(hfsplus_handle, next_node, &node_desc, 0, sizeof(node_desc));
313 hfs_bnode_put(hfsplus_handle, next_node);
317 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))
323 hfs_bnode_put(hfsplus_handle, node);
328 static int hfs_brec_update_parent(hfsplus_handle_t *hfsplus_handle, struct hfs_find_data *fd)
343 parent = hfs_bnode_find(hfsplus_handle, tree, node->parent);
368 new_node = hfs_bnode_split(hfsplus_handle, fd);
379 hfs_bnode_write_u16(hfsplus_handle, parent, rec_off, start_off + diff);
385 hfs_bnode_write_u16(hfsplus_handle, parent, rec_off, end_off + diff);
387 hfs_bnode_move(hfsplus_handle, parent, start_off + diff, start_off,
390 hfs_bnode_copy(hfsplus_handle, parent, fd->keyoffset, node, 14, newkeylen);
393 hfs_bnode_put(hfsplus_handle, node);
399 fd->bnode = hfs_bnode_find(hfsplus_handle, tree, new_node->parent);
405 hfs_brec_insert(hfsplus_handle, fd, &cnid, sizeof(cnid));
406 hfs_bnode_put(hfsplus_handle, fd->bnode);
407 hfs_bnode_put(hfsplus_handle, new_node);
424 static int hfs_btree_inc_height(hfsplus_handle_t *hfsplus_handle, struct hfs_btree *tree)
433 node = hfs_bnode_find(hfsplus_handle, tree, tree->root);
437 new_node = hfs_bmap_alloc(hfsplus_handle, tree);
439 hfs_bnode_put(hfsplus_handle, node);
463 hfs_bnode_write(hfsplus_handle, new_node, &node_desc, 0, sizeof(node_desc));
466 hfs_bnode_write_u16(hfsplus_handle, new_node, rec, 14);
476 hfs_bnode_copy(hfsplus_handle, new_node, 14, node, 14, key_size);
480 hfs_bnode_write_u16(hfsplus_handle, new_node, 14, tree->max_key_len);
483 hfs_bnode_write(hfsplus_handle, new_node, &cnid, 14 + key_size, 4);
486 hfs_bnode_write_u16(hfsplus_handle, new_node, rec, 14 + key_size + 4);
488 hfs_bnode_put(hfsplus_handle, node);
490 hfs_bnode_put(hfsplus_handle, new_node);
491 if (hfsplus_journalled_mark_inode_dirty(__FUNCTION__, hfsplus_handle, tree->inode))