Lines Matching refs:path
209 * path, starting from the bottom of the path, and going upwards. We must
210 * check the path's validity at each step. If the key is not in the path,
222 "PAP-5010: invalid offset in the path");
224 /* While not higher in path than first element. */
231 /* Parent at the path is not in the tree now. */
242 /* Check whether parent at the path really points to the child. */
261 /* Get delimiting key of the buffer at the path and its right neighbor. */
269 "PAP-5030: invalid offset in the path");
277 /* Parent at the path is not in the tree now. */
289 * Check whether parent at the path really points
313 * Check whether a key is contained in the tree rooted from a buffer at a path.
315 * in the last path_element in the path. These delimiting keys are stored
332 "PAP-5050: pointer to the key(%p) is NULL or invalid path length(%d)",
350 "path not properly relsed");
355 * Drop the reference to each buffer in a path and restore
365 "clm-4000: invalid path offset");
376 /* Drop the reference to each buffer in a path */
382 "PAP-5090: invalid path offset");
590 * This function fills up the path from the root to the leaf as it
600 * key. search_by_key returns a path that must be checked for the
601 * correctness of the top of the path but need not be checked for the
602 * correctness of the bottom of the path
635 * As we add each node to a path we increase its count. This means
636 * that we must be careful to release all nodes in a path before we
637 * either discard the path struct or re-use the path struct, as we
645 * current node, and calculate the next current node(next path element)
661 /* prep path to have another element added to it. */
669 * in the path to have a pointer to it.
838 * Form the path to an item and position in this item which contains
840 * corresponding to the key, we point the path to the item with
892 /* Item is not found. Set path to the previous item. */
906 /* Needed byte is contained in the item pointed to by the path. */
918 * path. Set pos_in_item out of the item.
929 /* Compare given item and item pointed to by the path. */
930 int comp_items(const struct item_head *stored_ih, const struct treepath *path)
932 struct buffer_head *bh = PATH_PLAST_BUFFER(path);
935 /* Last buffer at the path is not in the tree. */
939 /* Last path position is invalid. */
940 if (PATH_LAST_POSITION(path) >= B_NR_ITEMS(bh))
944 ih = tp_item_head(path);
949 static inline int prepare_for_direct_item(struct treepath *path,
970 pos_in_item(path) = round_len - (le_ih_k_offset(le_ih) - 1);
971 *cut_size = -(ih_item_len(le_ih) - pos_in_item(path));
985 (pos_in_item(path) =
990 static inline int prepare_for_direntry_item(struct treepath *path,
1017 entry_length(get_last_bh(path), le_ih, pos_in_item(path)));
1024 * If the path points to a directory or direct item, calculate mode
1026 * If the path points to an indirect item, remove some number of its
1036 struct treepath *path,
1050 struct item_head *p_le_ih = tp_item_head(path);
1051 struct buffer_head *bh = PATH_PLAST_BUFFER(path);
1067 return prepare_for_direntry_item(path, p_le_ih, inode,
1073 return prepare_for_direct_item(path, p_le_ih, inode,
1097 bh = PATH_PLAST_BUFFER(path);
1098 copy_item_head(&s_ih, tp_item_head(path));
1127 if (item_moved (&s_ih, path)) {
1149 search_for_position_by_key(sb, item_key, path) == POSITION_FOUND);
1150 pos_in_item(path) = pos * UNFM_P_SIZE;
1193 struct treepath *path, int size)
1201 tb->tb_path = path;
1202 PATH_OFFSET_PBUFFER(path, ILLEGAL_PATH_ELEMENT_OFFSET) = NULL;
1203 PATH_OFFSET_POSITION(path, ILLEGAL_PATH_ELEMENT_OFFSET) = 0;
1246 * path - path to the deleted item
1252 struct treepath *path, const struct cpu_key *item_key,
1269 init_tb_struct(th, &s_del_balance, sb, path,
1278 prepare_for_delete_or_cut(th, inode, path,
1285 copy_item_head(&s_ih, tp_item_head(path));
1296 search_for_position_by_key(sb, item_key, path);
1314 q_ih = tp_item_head(path);
1363 ih_item_body(PATH_PLAST_BUFFER(path), &s_ih),
1407 INITIALIZE_PATH(path);
1419 retval = search_item(th->t_super, &cpu_key, &path);
1427 pathrelse(&path);
1447 item_len = ih_item_len(tp_item_head(&path));
1448 init_tb_struct(th, &tb, th->t_super, &path,
1451 quota_cut_bytes = ih_item_len(tp_item_head(&path));
1489 reiserfs_check_path(&path);
1558 struct treepath *path,
1580 pathrelse(path);
1585 return indirect2direct(th, inode, page, path, item_key,
1596 struct inode *inode, struct treepath *path)
1610 if (search_for_position_by_key(inode->i_sb, &tail_key, path) ==
1614 RFALSE(path->pos_in_item !=
1615 ih_item_len(tp_item_head(path)) - 1,
1617 PATH_LAST_POSITION(path)--;
1620 reiserfs_delete_item(th, path, &tail_key, inode,
1638 struct treepath *path,
1664 init_tb_struct(th, &s_cut_balance, inode->i_sb, path,
1680 prepare_for_delete_or_cut(th, inode, path,
1693 path, item_key,
1723 path) == POSITION_NOT_FOUND) {
1724 print_block(PATH_PLAST_BUFFER(path), 3,
1725 PATH_LAST_POSITION(path) - 1,
1726 PATH_LAST_POSITION(path) + 1);
1734 pathrelse(path);
1747 search_for_position_by_key(sb, item_key, path);
1764 indirect_to_direct_roll_back(th, inode, path);
1780 M_DELETE) ? ih_item_len(tp_item_head(path)) : -s_cut_balance.
2043 static void check_research_for_paste(struct treepath *path,
2046 struct item_head *found_ih = tp_item_head(path);
2051 get_last_bh(path)->b_size) !=
2054 get_last_bh(path)->b_size) !=
2055 pos_in_item(path))
2059 pos_in_item(path), key);
2064 get_last_bh(path)->b_size) !=
2066 || I_UNFM_NUM(found_ih) != pos_in_item(path)
2071 found_ih, pos_in_item(path), key);
2162 /* this also releases the path */
2177 * Insert new item into the buffer at the path.
2179 * path - path to the inserted item
2184 struct treepath *path, const struct cpu_key *key,
2220 pathrelse(path);
2224 init_tb_struct(th, &s_ins_balance, th->t_super, path,
2243 retval = search_item(th->t_super, key, path);
2265 /* also releases the path */