aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2009-03-30 14:02:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 15:16:40 -0400
commitd68caa9530a8ba54f97002e02bf6a0ad2462b8c0 (patch)
tree39a2b877483270253f95f3678a4559e9bd5524e8 /include/linux/reiserfs_fs.h
parenta063ae17925cafabe55ebe1957ca0e8c480bd132 (diff)
reiserfs: rename p_._ variables
This patch is a simple s/p_._//g to the reiserfs code. This is the fifth in a series of patches to rip out some of the awful variable naming in reiserfs. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/reiserfs_fs.h')
-rw-r--r--include/linux/reiserfs_fs.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index b72dc2095478..e711c796e9d1 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -694,9 +694,9 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key)
694#define is_indirect_cpu_ih(ih) (is_indirect_cpu_key (&((ih)->ih_key))) 694#define is_indirect_cpu_ih(ih) (is_indirect_cpu_key (&((ih)->ih_key)))
695#define is_statdata_cpu_ih(ih) (is_statdata_cpu_key (&((ih)->ih_key))) 695#define is_statdata_cpu_ih(ih) (is_statdata_cpu_key (&((ih)->ih_key)))
696 696
697#define I_K_KEY_IN_ITEM(p_s_ih, p_s_key, n_blocksize) \ 697#define I_K_KEY_IN_ITEM(ih, key, n_blocksize) \
698 ( ! COMP_SHORT_KEYS(p_s_ih, p_s_key) && \ 698 (!COMP_SHORT_KEYS(ih, key) && \
699 I_OFF_BYTE_IN_ITEM(p_s_ih, k_offset (p_s_key), n_blocksize) ) 699 I_OFF_BYTE_IN_ITEM(ih, k_offset(key), n_blocksize))
700 700
701/* maximal length of item */ 701/* maximal length of item */
702#define MAX_ITEM_LEN(block_size) (block_size - BLKH_SIZE - IH_SIZE) 702#define MAX_ITEM_LEN(block_size) (block_size - BLKH_SIZE - IH_SIZE)
@@ -1196,33 +1196,33 @@ struct treepath {
1196struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,} 1196struct treepath var = {.path_length = ILLEGAL_PATH_ELEMENT_OFFSET, .reada = 0,}
1197 1197
1198/* Get path element by path and path position. */ 1198/* Get path element by path and path position. */
1199#define PATH_OFFSET_PELEMENT(p_s_path,n_offset) ((p_s_path)->path_elements +(n_offset)) 1199#define PATH_OFFSET_PELEMENT(path, n_offset) ((path)->path_elements + (n_offset))
1200 1200
1201/* Get buffer header at the path by path and path position. */ 1201/* Get buffer header at the path by path and path position. */
1202#define PATH_OFFSET_PBUFFER(p_s_path,n_offset) (PATH_OFFSET_PELEMENT(p_s_path,n_offset)->pe_buffer) 1202#define PATH_OFFSET_PBUFFER(path, n_offset) (PATH_OFFSET_PELEMENT(path, n_offset)->pe_buffer)
1203 1203
1204/* Get position in the element at the path by path and path position. */ 1204/* Get position in the element at the path by path and path position. */
1205#define PATH_OFFSET_POSITION(p_s_path,n_offset) (PATH_OFFSET_PELEMENT(p_s_path,n_offset)->pe_position) 1205#define PATH_OFFSET_POSITION(path, n_offset) (PATH_OFFSET_PELEMENT(path, n_offset)->pe_position)
1206 1206
1207#define PATH_PLAST_BUFFER(p_s_path) (PATH_OFFSET_PBUFFER((p_s_path), (p_s_path)->path_length)) 1207#define PATH_PLAST_BUFFER(path) (PATH_OFFSET_PBUFFER((path), (path)->path_length))
1208 /* you know, to the person who didn't 1208 /* you know, to the person who didn't
1209 write this the macro name does not 1209 write this the macro name does not
1210 at first suggest what it does. 1210 at first suggest what it does.
1211 Maybe POSITION_FROM_PATH_END? Or 1211 Maybe POSITION_FROM_PATH_END? Or
1212 maybe we should just focus on 1212 maybe we should just focus on
1213 dumping paths... -Hans */ 1213 dumping paths... -Hans */
1214#define PATH_LAST_POSITION(p_s_path) (PATH_OFFSET_POSITION((p_s_path), (p_s_path)->path_length)) 1214#define PATH_LAST_POSITION(path) (PATH_OFFSET_POSITION((path), (path)->path_length))
1215 1215
1216#define PATH_PITEM_HEAD(p_s_path) B_N_PITEM_HEAD(PATH_PLAST_BUFFER(p_s_path),PATH_LAST_POSITION(p_s_path)) 1216#define PATH_PITEM_HEAD(path) B_N_PITEM_HEAD(PATH_PLAST_BUFFER(path), PATH_LAST_POSITION(path))
1217 1217
1218/* in do_balance leaf has h == 0 in contrast with path structure, 1218/* in do_balance leaf has h == 0 in contrast with path structure,
1219 where root has level == 0. That is why we need these defines */ 1219 where root has level == 0. That is why we need these defines */
1220#define PATH_H_PBUFFER(p_s_path, h) PATH_OFFSET_PBUFFER (p_s_path, p_s_path->path_length - (h)) /* tb->S[h] */ 1220#define PATH_H_PBUFFER(path, h) PATH_OFFSET_PBUFFER (path, path->path_length - (h)) /* tb->S[h] */
1221#define PATH_H_PPARENT(path, h) PATH_H_PBUFFER (path, (h) + 1) /* tb->F[h] or tb->S[0]->b_parent */ 1221#define PATH_H_PPARENT(path, h) PATH_H_PBUFFER (path, (h) + 1) /* tb->F[h] or tb->S[0]->b_parent */
1222#define PATH_H_POSITION(path, h) PATH_OFFSET_POSITION (path, path->path_length - (h)) 1222#define PATH_H_POSITION(path, h) PATH_OFFSET_POSITION (path, path->path_length - (h))
1223#define PATH_H_B_ITEM_ORDER(path, h) PATH_H_POSITION(path, h + 1) /* tb->S[h]->b_item_order */ 1223#define PATH_H_B_ITEM_ORDER(path, h) PATH_H_POSITION(path, h + 1) /* tb->S[h]->b_item_order */
1224 1224
1225#define PATH_H_PATH_OFFSET(p_s_path, n_h) ((p_s_path)->path_length - (n_h)) 1225#define PATH_H_PATH_OFFSET(path, n_h) ((path)->path_length - (n_h))
1226 1226
1227#define get_last_bh(path) PATH_PLAST_BUFFER(path) 1227#define get_last_bh(path) PATH_PLAST_BUFFER(path)
1228#define get_ih(path) PATH_PITEM_HEAD(path) 1228#define get_ih(path) PATH_PITEM_HEAD(path)
@@ -1512,7 +1512,7 @@ extern struct item_operations *item_ops[TYPE_ANY + 1];
1512#define COMP_SHORT_KEYS comp_short_keys 1512#define COMP_SHORT_KEYS comp_short_keys
1513 1513
1514/* number of blocks pointed to by the indirect item */ 1514/* number of blocks pointed to by the indirect item */
1515#define I_UNFM_NUM(p_s_ih) ( ih_item_len(p_s_ih) / UNFM_P_SIZE ) 1515#define I_UNFM_NUM(ih) (ih_item_len(ih) / UNFM_P_SIZE)
1516 1516
1517/* the used space within the unformatted node corresponding to pos within the item pointed to by ih */ 1517/* the used space within the unformatted node corresponding to pos within the item pointed to by ih */
1518#define I_POS_UNFM_SIZE(ih,pos,size) (((pos) == I_UNFM_NUM(ih) - 1 ) ? (size) - ih_free_space(ih) : (size)) 1518#define I_POS_UNFM_SIZE(ih,pos,size) (((pos) == I_UNFM_NUM(ih) - 1 ) ? (size) - ih_free_space(ih) : (size))
@@ -1793,8 +1793,8 @@ int reiserfs_convert_objectid_map_v1(struct super_block *);
1793 1793
1794/* stree.c */ 1794/* stree.c */
1795int B_IS_IN_TREE(const struct buffer_head *); 1795int B_IS_IN_TREE(const struct buffer_head *);
1796extern void copy_item_head(struct item_head *p_v_to, 1796extern void copy_item_head(struct item_head *to,
1797 const struct item_head *p_v_from); 1797 const struct item_head *from);
1798 1798
1799// first key is in cpu form, second - le 1799// first key is in cpu form, second - le
1800extern int comp_short_keys(const struct reiserfs_key *le_key, 1800extern int comp_short_keys(const struct reiserfs_key *le_key,
@@ -1829,20 +1829,20 @@ static inline void copy_key(struct reiserfs_key *to,
1829 memcpy(to, from, KEY_SIZE); 1829 memcpy(to, from, KEY_SIZE);
1830} 1830}
1831 1831
1832int comp_items(const struct item_head *stored_ih, const struct treepath *p_s_path); 1832int comp_items(const struct item_head *stored_ih, const struct treepath *path);
1833const struct reiserfs_key *get_rkey(const struct treepath *p_s_chk_path, 1833const struct reiserfs_key *get_rkey(const struct treepath *chk_path,
1834 const struct super_block *sb); 1834 const struct super_block *sb);
1835int search_by_key(struct super_block *, const struct cpu_key *, 1835int search_by_key(struct super_block *, const struct cpu_key *,
1836 struct treepath *, int); 1836 struct treepath *, int);
1837#define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL) 1837#define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL)
1838int search_for_position_by_key(struct super_block *sb, 1838int search_for_position_by_key(struct super_block *sb,
1839 const struct cpu_key *p_s_cpu_key, 1839 const struct cpu_key *cpu_key,
1840 struct treepath *p_s_search_path); 1840 struct treepath *search_path);
1841extern void decrement_bcount(struct buffer_head *bh); 1841extern void decrement_bcount(struct buffer_head *bh);
1842void decrement_counters_in_path(struct treepath *p_s_search_path); 1842void decrement_counters_in_path(struct treepath *search_path);
1843void pathrelse(struct treepath *p_s_search_path); 1843void pathrelse(struct treepath *search_path);
1844int reiserfs_check_path(struct treepath *p); 1844int reiserfs_check_path(struct treepath *p);
1845void pathrelse_and_restore(struct super_block *s, struct treepath *p_s_search_path); 1845void pathrelse_and_restore(struct super_block *s, struct treepath *search_path);
1846 1846
1847int reiserfs_insert_item(struct reiserfs_transaction_handle *th, 1847int reiserfs_insert_item(struct reiserfs_transaction_handle *th,
1848 struct treepath *path, 1848 struct treepath *path,
@@ -1865,7 +1865,7 @@ int reiserfs_cut_from_item(struct reiserfs_transaction_handle *th,
1865int reiserfs_delete_item(struct reiserfs_transaction_handle *th, 1865int reiserfs_delete_item(struct reiserfs_transaction_handle *th,
1866 struct treepath *path, 1866 struct treepath *path,
1867 const struct cpu_key *key, 1867 const struct cpu_key *key,
1868 struct inode *inode, struct buffer_head *p_s_un_bh); 1868 struct inode *inode, struct buffer_head *un_bh);
1869 1869
1870void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th, 1870void reiserfs_delete_solid_item(struct reiserfs_transaction_handle *th,
1871 struct inode *inode, struct reiserfs_key *key); 1871 struct inode *inode, struct reiserfs_key *key);
@@ -2005,7 +2005,7 @@ extern const struct address_space_operations reiserfs_address_space_operations;
2005/* fix_nodes.c */ 2005/* fix_nodes.c */
2006 2006
2007int fix_nodes(int n_op_mode, struct tree_balance *tb, 2007int fix_nodes(int n_op_mode, struct tree_balance *tb,
2008 struct item_head *p_s_ins_ih, const void *); 2008 struct item_head *ins_ih, const void *);
2009void unfix_nodes(struct tree_balance *); 2009void unfix_nodes(struct tree_balance *);
2010 2010
2011/* prints.c */ 2011/* prints.c */