diff options
author | Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> | 2006-12-08 05:36:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:40 -0500 |
commit | fec6d055da71fb02a76f9c2c12427fa79974018b (patch) | |
tree | d6fb2e5fea74ab83280389ef8a16564bf284ebc5 /fs/reiserfs/stree.c | |
parent | 0cc72dc7f050188d8d7344b1dd688cbc68d3cd30 (diff) |
[PATCH] struct path: rename Reiserfs's struct path
Rename Reiserfs's struct path to struct treepath to prevent name collision
between it and struct path from fs/namei.c.
Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Cc: <reiserfs-dev@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/stree.c')
-rw-r--r-- | fs/reiserfs/stree.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c index 5240abe1a709..47e7027ea39f 100644 --- a/fs/reiserfs/stree.c +++ b/fs/reiserfs/stree.c | |||
@@ -244,7 +244,7 @@ static const struct reiserfs_key MAX_KEY = { | |||
244 | of the path, and going upwards. We must check the path's validity at each step. If the key is not in | 244 | of the path, and going upwards. We must check the path's validity at each step. If the key is not in |
245 | the path, there is no delimiting key in the tree (buffer is first or last buffer in tree), and in this | 245 | the path, there is no delimiting key in the tree (buffer is first or last buffer in tree), and in this |
246 | case we return a special key, either MIN_KEY or MAX_KEY. */ | 246 | case we return a special key, either MIN_KEY or MAX_KEY. */ |
247 | static inline const struct reiserfs_key *get_lkey(const struct path | 247 | static inline const struct reiserfs_key *get_lkey(const struct treepath |
248 | *p_s_chk_path, | 248 | *p_s_chk_path, |
249 | const struct super_block | 249 | const struct super_block |
250 | *p_s_sb) | 250 | *p_s_sb) |
@@ -290,7 +290,7 @@ static inline const struct reiserfs_key *get_lkey(const struct path | |||
290 | } | 290 | } |
291 | 291 | ||
292 | /* Get delimiting key of the buffer at the path and its right neighbor. */ | 292 | /* Get delimiting key of the buffer at the path and its right neighbor. */ |
293 | inline const struct reiserfs_key *get_rkey(const struct path *p_s_chk_path, | 293 | inline const struct reiserfs_key *get_rkey(const struct treepath *p_s_chk_path, |
294 | const struct super_block *p_s_sb) | 294 | const struct super_block *p_s_sb) |
295 | { | 295 | { |
296 | int n_position, n_path_offset = p_s_chk_path->path_length; | 296 | int n_position, n_path_offset = p_s_chk_path->path_length; |
@@ -337,7 +337,7 @@ inline const struct reiserfs_key *get_rkey(const struct path *p_s_chk_path, | |||
337 | the path. These delimiting keys are stored at least one level above that buffer in the tree. If the | 337 | the path. These delimiting keys are stored at least one level above that buffer in the tree. If the |
338 | buffer is the first or last node in the tree order then one of the delimiting keys may be absent, and in | 338 | buffer is the first or last node in the tree order then one of the delimiting keys may be absent, and in |
339 | this case get_lkey and get_rkey return a special key which is MIN_KEY or MAX_KEY. */ | 339 | this case get_lkey and get_rkey return a special key which is MIN_KEY or MAX_KEY. */ |
340 | static inline int key_in_buffer(struct path *p_s_chk_path, /* Path which should be checked. */ | 340 | static inline int key_in_buffer(struct treepath *p_s_chk_path, /* Path which should be checked. */ |
341 | const struct cpu_key *p_s_key, /* Key which should be checked. */ | 341 | const struct cpu_key *p_s_key, /* Key which should be checked. */ |
342 | struct super_block *p_s_sb /* Super block pointer. */ | 342 | struct super_block *p_s_sb /* Super block pointer. */ |
343 | ) | 343 | ) |
@@ -374,7 +374,7 @@ inline void decrement_bcount(struct buffer_head *p_s_bh) | |||
374 | } | 374 | } |
375 | 375 | ||
376 | /* Decrement b_count field of the all buffers in the path. */ | 376 | /* Decrement b_count field of the all buffers in the path. */ |
377 | void decrement_counters_in_path(struct path *p_s_search_path) | 377 | void decrement_counters_in_path(struct treepath *p_s_search_path) |
378 | { | 378 | { |
379 | int n_path_offset = p_s_search_path->path_length; | 379 | int n_path_offset = p_s_search_path->path_length; |
380 | 380 | ||
@@ -391,7 +391,7 @@ void decrement_counters_in_path(struct path *p_s_search_path) | |||
391 | p_s_search_path->path_length = ILLEGAL_PATH_ELEMENT_OFFSET; | 391 | p_s_search_path->path_length = ILLEGAL_PATH_ELEMENT_OFFSET; |
392 | } | 392 | } |
393 | 393 | ||
394 | int reiserfs_check_path(struct path *p) | 394 | int reiserfs_check_path(struct treepath *p) |
395 | { | 395 | { |
396 | RFALSE(p->path_length != ILLEGAL_PATH_ELEMENT_OFFSET, | 396 | RFALSE(p->path_length != ILLEGAL_PATH_ELEMENT_OFFSET, |
397 | "path not properly relsed"); | 397 | "path not properly relsed"); |
@@ -403,7 +403,7 @@ int reiserfs_check_path(struct path *p) | |||
403 | ** | 403 | ** |
404 | ** only called from fix_nodes() | 404 | ** only called from fix_nodes() |
405 | */ | 405 | */ |
406 | void pathrelse_and_restore(struct super_block *s, struct path *p_s_search_path) | 406 | void pathrelse_and_restore(struct super_block *s, struct treepath *p_s_search_path) |
407 | { | 407 | { |
408 | int n_path_offset = p_s_search_path->path_length; | 408 | int n_path_offset = p_s_search_path->path_length; |
409 | 409 | ||
@@ -421,7 +421,7 @@ void pathrelse_and_restore(struct super_block *s, struct path *p_s_search_path) | |||
421 | } | 421 | } |
422 | 422 | ||
423 | /* Release all buffers in the path. */ | 423 | /* Release all buffers in the path. */ |
424 | void pathrelse(struct path *p_s_search_path) | 424 | void pathrelse(struct treepath *p_s_search_path) |
425 | { | 425 | { |
426 | int n_path_offset = p_s_search_path->path_length; | 426 | int n_path_offset = p_s_search_path->path_length; |
427 | 427 | ||
@@ -602,7 +602,7 @@ static void search_by_key_reada(struct super_block *s, | |||
602 | correctness of the bottom of the path */ | 602 | correctness of the bottom of the path */ |
603 | /* The function is NOT SCHEDULE-SAFE! */ | 603 | /* The function is NOT SCHEDULE-SAFE! */ |
604 | int search_by_key(struct super_block *p_s_sb, const struct cpu_key *p_s_key, /* Key to search. */ | 604 | int search_by_key(struct super_block *p_s_sb, const struct cpu_key *p_s_key, /* Key to search. */ |
605 | struct path *p_s_search_path, /* This structure was | 605 | struct treepath *p_s_search_path,/* This structure was |
606 | allocated and initialized | 606 | allocated and initialized |
607 | by the calling | 607 | by the calling |
608 | function. It is filled up | 608 | function. It is filled up |
@@ -813,7 +813,7 @@ int search_by_key(struct super_block *p_s_sb, const struct cpu_key *p_s_key, /* | |||
813 | /* The function is NOT SCHEDULE-SAFE! */ | 813 | /* The function is NOT SCHEDULE-SAFE! */ |
814 | int search_for_position_by_key(struct super_block *p_s_sb, /* Pointer to the super block. */ | 814 | int search_for_position_by_key(struct super_block *p_s_sb, /* Pointer to the super block. */ |
815 | const struct cpu_key *p_cpu_key, /* Key to search (cpu variable) */ | 815 | const struct cpu_key *p_cpu_key, /* Key to search (cpu variable) */ |
816 | struct path *p_s_search_path /* Filled up by this function. */ | 816 | struct treepath *p_s_search_path /* Filled up by this function. */ |
817 | ) | 817 | ) |
818 | { | 818 | { |
819 | struct item_head *p_le_ih; /* pointer to on-disk structure */ | 819 | struct item_head *p_le_ih; /* pointer to on-disk structure */ |
@@ -884,7 +884,7 @@ int search_for_position_by_key(struct super_block *p_s_sb, /* Pointer to the sup | |||
884 | } | 884 | } |
885 | 885 | ||
886 | /* Compare given item and item pointed to by the path. */ | 886 | /* Compare given item and item pointed to by the path. */ |
887 | int comp_items(const struct item_head *stored_ih, const struct path *p_s_path) | 887 | int comp_items(const struct item_head *stored_ih, const struct treepath *p_s_path) |
888 | { | 888 | { |
889 | struct buffer_head *p_s_bh; | 889 | struct buffer_head *p_s_bh; |
890 | struct item_head *ih; | 890 | struct item_head *ih; |
@@ -911,7 +911,7 @@ int comp_items(const struct item_head *stored_ih, const struct path *p_s_path) | |||
911 | #define block_in_use(bh) (buffer_locked(bh) || (held_by_others(bh))) | 911 | #define block_in_use(bh) (buffer_locked(bh) || (held_by_others(bh))) |
912 | 912 | ||
913 | // prepare for delete or cut of direct item | 913 | // prepare for delete or cut of direct item |
914 | static inline int prepare_for_direct_item(struct path *path, | 914 | static inline int prepare_for_direct_item(struct treepath *path, |
915 | struct item_head *le_ih, | 915 | struct item_head *le_ih, |
916 | struct inode *inode, | 916 | struct inode *inode, |
917 | loff_t new_file_length, int *cut_size) | 917 | loff_t new_file_length, int *cut_size) |
@@ -952,7 +952,7 @@ static inline int prepare_for_direct_item(struct path *path, | |||
952 | return M_CUT; /* Cut from this item. */ | 952 | return M_CUT; /* Cut from this item. */ |
953 | } | 953 | } |
954 | 954 | ||
955 | static inline int prepare_for_direntry_item(struct path *path, | 955 | static inline int prepare_for_direntry_item(struct treepath *path, |
956 | struct item_head *le_ih, | 956 | struct item_head *le_ih, |
957 | struct inode *inode, | 957 | struct inode *inode, |
958 | loff_t new_file_length, | 958 | loff_t new_file_length, |
@@ -987,7 +987,7 @@ static inline int prepare_for_direntry_item(struct path *path, | |||
987 | In case of file truncate calculate whether this item must be deleted/truncated or last | 987 | In case of file truncate calculate whether this item must be deleted/truncated or last |
988 | unformatted node of this item will be converted to a direct item. | 988 | unformatted node of this item will be converted to a direct item. |
989 | This function returns a determination of what balance mode the calling function should employ. */ | 989 | This function returns a determination of what balance mode the calling function should employ. */ |
990 | static char prepare_for_delete_or_cut(struct reiserfs_transaction_handle *th, struct inode *inode, struct path *p_s_path, const struct cpu_key *p_s_item_key, int *p_n_removed, /* Number of unformatted nodes which were removed | 990 | static char prepare_for_delete_or_cut(struct reiserfs_transaction_handle *th, struct inode *inode, struct treepath *p_s_path, const struct cpu_key *p_s_item_key, int *p_n_removed, /* Number of unformatted nodes which were removed |
991 | from end of the file. */ | 991 | from end of the file. */ |
992 | int *p_n_cut_size, unsigned long long n_new_file_length /* MAX_KEY_OFFSET in case of delete. */ | 992 | int *p_n_cut_size, unsigned long long n_new_file_length /* MAX_KEY_OFFSET in case of delete. */ |
993 | ) | 993 | ) |
@@ -1125,7 +1125,7 @@ static int calc_deleted_bytes_number(struct tree_balance *p_s_tb, char c_mode) | |||
1125 | static void init_tb_struct(struct reiserfs_transaction_handle *th, | 1125 | static void init_tb_struct(struct reiserfs_transaction_handle *th, |
1126 | struct tree_balance *p_s_tb, | 1126 | struct tree_balance *p_s_tb, |
1127 | struct super_block *p_s_sb, | 1127 | struct super_block *p_s_sb, |
1128 | struct path *p_s_path, int n_size) | 1128 | struct treepath *p_s_path, int n_size) |
1129 | { | 1129 | { |
1130 | 1130 | ||
1131 | BUG_ON(!th->t_trans_id); | 1131 | BUG_ON(!th->t_trans_id); |
@@ -1176,7 +1176,7 @@ char head2type(struct item_head *ih) | |||
1176 | #endif | 1176 | #endif |
1177 | 1177 | ||
1178 | /* Delete object item. */ | 1178 | /* Delete object item. */ |
1179 | int reiserfs_delete_item(struct reiserfs_transaction_handle *th, struct path *p_s_path, /* Path to the deleted item. */ | 1179 | int reiserfs_delete_item(struct reiserfs_transaction_handle *th, struct treepath *p_s_path, /* Path to the deleted item. */ |
1180 | const struct cpu_key *p_s_item_key, /* Key to search for the deleted item. */ | 1180 | const struct cpu_key *p_s_item_key, /* Key to search for the deleted item. */ |
1181 | struct inode *p_s_inode, /* inode is here just to update i_blocks and quotas */ | 1181 | struct inode *p_s_inode, /* inode is here just to update i_blocks and quotas */ |
1182 | struct buffer_head *p_s_un_bh) | 1182 | struct buffer_head *p_s_un_bh) |
@@ -1468,7 +1468,7 @@ static void unmap_buffers(struct page *page, loff_t pos) | |||
1468 | static int maybe_indirect_to_direct(struct reiserfs_transaction_handle *th, | 1468 | static int maybe_indirect_to_direct(struct reiserfs_transaction_handle *th, |
1469 | struct inode *p_s_inode, | 1469 | struct inode *p_s_inode, |
1470 | struct page *page, | 1470 | struct page *page, |
1471 | struct path *p_s_path, | 1471 | struct treepath *p_s_path, |
1472 | const struct cpu_key *p_s_item_key, | 1472 | const struct cpu_key *p_s_item_key, |
1473 | loff_t n_new_file_size, char *p_c_mode) | 1473 | loff_t n_new_file_size, char *p_c_mode) |
1474 | { | 1474 | { |
@@ -1503,7 +1503,7 @@ static int maybe_indirect_to_direct(struct reiserfs_transaction_handle *th, | |||
1503 | pointer being converted. Therefore we have to delete inserted | 1503 | pointer being converted. Therefore we have to delete inserted |
1504 | direct item(s) */ | 1504 | direct item(s) */ |
1505 | static void indirect_to_direct_roll_back(struct reiserfs_transaction_handle *th, | 1505 | static void indirect_to_direct_roll_back(struct reiserfs_transaction_handle *th, |
1506 | struct inode *inode, struct path *path) | 1506 | struct inode *inode, struct treepath *path) |
1507 | { | 1507 | { |
1508 | struct cpu_key tail_key; | 1508 | struct cpu_key tail_key; |
1509 | int tail_len; | 1509 | int tail_len; |
@@ -1545,7 +1545,7 @@ static void indirect_to_direct_roll_back(struct reiserfs_transaction_handle *th, | |||
1545 | 1545 | ||
1546 | /* (Truncate or cut entry) or delete object item. Returns < 0 on failure */ | 1546 | /* (Truncate or cut entry) or delete object item. Returns < 0 on failure */ |
1547 | int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th, | 1547 | int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th, |
1548 | struct path *p_s_path, | 1548 | struct treepath *p_s_path, |
1549 | struct cpu_key *p_s_item_key, | 1549 | struct cpu_key *p_s_item_key, |
1550 | struct inode *p_s_inode, | 1550 | struct inode *p_s_inode, |
1551 | struct page *page, loff_t n_new_file_size) | 1551 | struct page *page, loff_t n_new_file_size) |
@@ -1920,7 +1920,7 @@ int reiserfs_do_truncate(struct reiserfs_transaction_handle *th, struct inode *p | |||
1920 | 1920 | ||
1921 | #ifdef CONFIG_REISERFS_CHECK | 1921 | #ifdef CONFIG_REISERFS_CHECK |
1922 | // this makes sure, that we __append__, not overwrite or add holes | 1922 | // this makes sure, that we __append__, not overwrite or add holes |
1923 | static void check_research_for_paste(struct path *path, | 1923 | static void check_research_for_paste(struct treepath *path, |
1924 | const struct cpu_key *p_s_key) | 1924 | const struct cpu_key *p_s_key) |
1925 | { | 1925 | { |
1926 | struct item_head *found_ih = get_ih(path); | 1926 | struct item_head *found_ih = get_ih(path); |
@@ -1954,7 +1954,7 @@ static void check_research_for_paste(struct path *path, | |||
1954 | #endif /* config reiserfs check */ | 1954 | #endif /* config reiserfs check */ |
1955 | 1955 | ||
1956 | /* Paste bytes to the existing item. Returns bytes number pasted into the item. */ | 1956 | /* Paste bytes to the existing item. Returns bytes number pasted into the item. */ |
1957 | int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct path *p_s_search_path, /* Path to the pasted item. */ | 1957 | int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct treepath *p_s_search_path, /* Path to the pasted item. */ |
1958 | const struct cpu_key *p_s_key, /* Key to search for the needed item. */ | 1958 | const struct cpu_key *p_s_key, /* Key to search for the needed item. */ |
1959 | struct inode *inode, /* Inode item belongs to */ | 1959 | struct inode *inode, /* Inode item belongs to */ |
1960 | const char *p_c_body, /* Pointer to the bytes to paste. */ | 1960 | const char *p_c_body, /* Pointer to the bytes to paste. */ |
@@ -2036,7 +2036,7 @@ int reiserfs_paste_into_item(struct reiserfs_transaction_handle *th, struct path | |||
2036 | } | 2036 | } |
2037 | 2037 | ||
2038 | /* Insert new item into the buffer at the path. */ | 2038 | /* Insert new item into the buffer at the path. */ |
2039 | int reiserfs_insert_item(struct reiserfs_transaction_handle *th, struct path *p_s_path, /* Path to the inserteded item. */ | 2039 | int reiserfs_insert_item(struct reiserfs_transaction_handle *th, struct treepath *p_s_path, /* Path to the inserteded item. */ |
2040 | const struct cpu_key *key, struct item_head *p_s_ih, /* Pointer to the item header to insert. */ | 2040 | const struct cpu_key *key, struct item_head *p_s_ih, /* Pointer to the item header to insert. */ |
2041 | struct inode *inode, const char *p_c_body) | 2041 | struct inode *inode, const char *p_c_body) |
2042 | { /* Pointer to the bytes to insert. */ | 2042 | { /* Pointer to the bytes to insert. */ |