diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-03-30 14:02:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 15:16:40 -0400 |
commit | ee93961be1faddf9e9a638bc519145c20f0cfeba (patch) | |
tree | 9c62f05dca9ea72c2b419a7f1f9d5874b587e5ab /fs/reiserfs/tail_conversion.c | |
parent | d68caa9530a8ba54f97002e02bf6a0ad2462b8c0 (diff) |
reiserfs: rename [cn]_* variables
This patch renames n_, c_, etc variables to something more sane. This
is the sixth 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 'fs/reiserfs/tail_conversion.c')
-rw-r--r-- | fs/reiserfs/tail_conversion.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c index 2b90c0e5697..d7f6e51bef2 100644 --- a/fs/reiserfs/tail_conversion.c +++ b/fs/reiserfs/tail_conversion.c | |||
@@ -26,7 +26,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
26 | converted item. */ | 26 | converted item. */ |
27 | struct item_head ind_ih; /* new indirect item to be inserted or | 27 | struct item_head ind_ih; /* new indirect item to be inserted or |
28 | key of unfm pointer to be pasted */ | 28 | key of unfm pointer to be pasted */ |
29 | int n_blk_size, n_retval; /* returned value for reiserfs_insert_item and clones */ | 29 | int blk_size, retval; /* returned value for reiserfs_insert_item and clones */ |
30 | unp_t unfm_ptr; /* Handle on an unformatted node | 30 | unp_t unfm_ptr; /* Handle on an unformatted node |
31 | that will be inserted in the | 31 | that will be inserted in the |
32 | tree. */ | 32 | tree. */ |
@@ -35,7 +35,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
35 | 35 | ||
36 | REISERFS_SB(sb)->s_direct2indirect++; | 36 | REISERFS_SB(sb)->s_direct2indirect++; |
37 | 37 | ||
38 | n_blk_size = sb->s_blocksize; | 38 | blk_size = sb->s_blocksize; |
39 | 39 | ||
40 | /* and key to search for append or insert pointer to the new | 40 | /* and key to search for append or insert pointer to the new |
41 | unformatted node. */ | 41 | unformatted node. */ |
@@ -64,17 +64,17 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
64 | set_ih_free_space(&ind_ih, 0); /* delete at nearest future */ | 64 | set_ih_free_space(&ind_ih, 0); /* delete at nearest future */ |
65 | put_ih_item_len(&ind_ih, UNFM_P_SIZE); | 65 | put_ih_item_len(&ind_ih, UNFM_P_SIZE); |
66 | PATH_LAST_POSITION(path)++; | 66 | PATH_LAST_POSITION(path)++; |
67 | n_retval = | 67 | retval = |
68 | reiserfs_insert_item(th, path, &end_key, &ind_ih, inode, | 68 | reiserfs_insert_item(th, path, &end_key, &ind_ih, inode, |
69 | (char *)&unfm_ptr); | 69 | (char *)&unfm_ptr); |
70 | } else { | 70 | } else { |
71 | /* Paste into last indirect item of an object. */ | 71 | /* Paste into last indirect item of an object. */ |
72 | n_retval = reiserfs_paste_into_item(th, path, &end_key, inode, | 72 | retval = reiserfs_paste_into_item(th, path, &end_key, inode, |
73 | (char *)&unfm_ptr, | 73 | (char *)&unfm_ptr, |
74 | UNFM_P_SIZE); | 74 | UNFM_P_SIZE); |
75 | } | 75 | } |
76 | if (n_retval) { | 76 | if (retval) { |
77 | return n_retval; | 77 | return retval; |
78 | } | 78 | } |
79 | // note: from here there are two keys which have matching first | 79 | // note: from here there are two keys which have matching first |
80 | // three key components. They only differ by the fourth one. | 80 | // three key components. They only differ by the fourth one. |
@@ -98,7 +98,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
98 | RFALSE(!is_direct_le_ih(p_le_ih), | 98 | RFALSE(!is_direct_le_ih(p_le_ih), |
99 | "vs-14055: direct item expected(%K), found %h", | 99 | "vs-14055: direct item expected(%K), found %h", |
100 | &end_key, p_le_ih); | 100 | &end_key, p_le_ih); |
101 | tail_size = (le_ih_k_offset(p_le_ih) & (n_blk_size - 1)) | 101 | tail_size = (le_ih_k_offset(p_le_ih) & (blk_size - 1)) |
102 | + ih_item_len(p_le_ih) - 1; | 102 | + ih_item_len(p_le_ih) - 1; |
103 | 103 | ||
104 | /* we only send the unbh pointer if the buffer is not up to date. | 104 | /* we only send the unbh pointer if the buffer is not up to date. |
@@ -113,11 +113,11 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
113 | } else { | 113 | } else { |
114 | up_to_date_bh = unbh; | 114 | up_to_date_bh = unbh; |
115 | } | 115 | } |
116 | n_retval = reiserfs_delete_item(th, path, &end_key, inode, | 116 | retval = reiserfs_delete_item(th, path, &end_key, inode, |
117 | up_to_date_bh); | 117 | up_to_date_bh); |
118 | 118 | ||
119 | total_tail += n_retval; | 119 | total_tail += retval; |
120 | if (tail_size == n_retval) | 120 | if (tail_size == retval) |
121 | // done: file does not have direct items anymore | 121 | // done: file does not have direct items anymore |
122 | break; | 122 | break; |
123 | 123 | ||
@@ -129,7 +129,7 @@ int direct2indirect(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
129 | unsigned pgoff = | 129 | unsigned pgoff = |
130 | (tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1); | 130 | (tail_offset + total_tail - 1) & (PAGE_CACHE_SIZE - 1); |
131 | char *kaddr = kmap_atomic(up_to_date_bh->b_page, KM_USER0); | 131 | char *kaddr = kmap_atomic(up_to_date_bh->b_page, KM_USER0); |
132 | memset(kaddr + pgoff, 0, n_blk_size - total_tail); | 132 | memset(kaddr + pgoff, 0, blk_size - total_tail); |
133 | kunmap_atomic(kaddr, KM_USER0); | 133 | kunmap_atomic(kaddr, KM_USER0); |
134 | } | 134 | } |
135 | 135 | ||
@@ -181,7 +181,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, | |||
181 | { | 181 | { |
182 | struct super_block *sb = inode->i_sb; | 182 | struct super_block *sb = inode->i_sb; |
183 | struct item_head s_ih; | 183 | struct item_head s_ih; |
184 | unsigned long n_block_size = sb->s_blocksize; | 184 | unsigned long block_size = sb->s_blocksize; |
185 | char *tail; | 185 | char *tail; |
186 | int tail_len, round_tail_len; | 186 | int tail_len, round_tail_len; |
187 | loff_t pos, pos1; /* position of first byte of the tail */ | 187 | loff_t pos, pos1; /* position of first byte of the tail */ |
@@ -196,7 +196,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, | |||
196 | /* store item head path points to. */ | 196 | /* store item head path points to. */ |
197 | copy_item_head(&s_ih, PATH_PITEM_HEAD(path)); | 197 | copy_item_head(&s_ih, PATH_PITEM_HEAD(path)); |
198 | 198 | ||
199 | tail_len = (n_new_file_size & (n_block_size - 1)); | 199 | tail_len = (n_new_file_size & (block_size - 1)); |
200 | if (get_inode_sd_version(inode) == STAT_DATA_V2) | 200 | if (get_inode_sd_version(inode) == STAT_DATA_V2) |
201 | round_tail_len = ROUND_UP(tail_len); | 201 | round_tail_len = ROUND_UP(tail_len); |
202 | else | 202 | else |
@@ -257,7 +257,7 @@ int indirect2direct(struct reiserfs_transaction_handle *th, | |||
257 | unformatted node. For now i_size is considered as guard for | 257 | unformatted node. For now i_size is considered as guard for |
258 | going out of file size */ | 258 | going out of file size */ |
259 | kunmap(page); | 259 | kunmap(page); |
260 | return n_block_size - round_tail_len; | 260 | return block_size - round_tail_len; |
261 | } | 261 | } |
262 | kunmap(page); | 262 | kunmap(page); |
263 | 263 | ||
@@ -276,5 +276,5 @@ int indirect2direct(struct reiserfs_transaction_handle *th, | |||
276 | /* mark_file_with_tail (inode, pos1 + 1); */ | 276 | /* mark_file_with_tail (inode, pos1 + 1); */ |
277 | REISERFS_I(inode)->i_first_direct_byte = pos1 + 1; | 277 | REISERFS_I(inode)->i_first_direct_byte = pos1 + 1; |
278 | 278 | ||
279 | return n_block_size - round_tail_len; | 279 | return block_size - round_tail_len; |
280 | } | 280 | } |