aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-09-04 12:49:07 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-09-04 12:49:07 -0400
commitcd915493fce912f1bd838ee1250737ecf33b8fae (patch)
treee14ec6643de91f473edb26a89905e710596fe6bc /fs/gfs2/bmap.c
parenta91ea69ffd3f8a0b7139bfd44042ab384461e631 (diff)
[GFS2] Change all types to uX style
This makes all fixed size types have consistent names. Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index bb597839c0c9..a97ad74d880c 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -38,8 +38,8 @@ struct metapath {
38}; 38};
39 39
40typedef int (*block_call_t) (struct gfs2_inode *ip, struct buffer_head *dibh, 40typedef int (*block_call_t) (struct gfs2_inode *ip, struct buffer_head *dibh,
41 struct buffer_head *bh, uint64_t *top, 41 struct buffer_head *bh, u64 *top,
42 uint64_t *bottom, unsigned int height, 42 u64 *bottom, unsigned int height,
43 void *data); 43 void *data);
44 44
45struct strip_mine { 45struct strip_mine {
@@ -58,7 +58,7 @@ struct strip_mine {
58 */ 58 */
59 59
60static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, 60static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh,
61 uint64_t block, struct page *page) 61 u64 block, struct page *page)
62{ 62{
63 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 63 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
64 struct inode *inode = &ip->i_inode; 64 struct inode *inode = &ip->i_inode;
@@ -121,7 +121,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh,
121int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) 121int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
122{ 122{
123 struct buffer_head *bh, *dibh; 123 struct buffer_head *bh, *dibh;
124 uint64_t block = 0; 124 u64 block = 0;
125 int isdir = gfs2_is_dir(ip); 125 int isdir = gfs2_is_dir(ip);
126 int error; 126 int error;
127 127
@@ -161,7 +161,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
161 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); 161 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
162 162
163 if (ip->i_di.di_size) { 163 if (ip->i_di.di_size) {
164 *(uint64_t *)(dibh->b_data + sizeof(struct gfs2_dinode)) = 164 *(u64 *)(dibh->b_data + sizeof(struct gfs2_dinode)) =
165 cpu_to_be64(block); 165 cpu_to_be64(block);
166 ip->i_di.di_blocks++; 166 ip->i_di.di_blocks++;
167 } 167 }
@@ -190,10 +190,10 @@ out:
190 * Returns: the height the tree should be 190 * Returns: the height the tree should be
191 */ 191 */
192 192
193static unsigned int calc_tree_height(struct gfs2_inode *ip, uint64_t size) 193static unsigned int calc_tree_height(struct gfs2_inode *ip, u64 size)
194{ 194{
195 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 195 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
196 uint64_t *arr; 196 u64 *arr;
197 unsigned int max, height; 197 unsigned int max, height;
198 198
199 if (ip->i_di.di_size > size) 199 if (ip->i_di.di_size > size)
@@ -336,11 +336,11 @@ static int build_height(struct inode *inode, unsigned height)
336 * 336 *
337 */ 337 */
338 338
339static void find_metapath(struct gfs2_inode *ip, uint64_t block, 339static void find_metapath(struct gfs2_inode *ip, u64 block,
340 struct metapath *mp) 340 struct metapath *mp)
341{ 341{
342 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 342 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
343 uint64_t b = block; 343 u64 b = block;
344 unsigned int i; 344 unsigned int i;
345 345
346 for (i = ip->i_di.di_height; i--;) 346 for (i = ip->i_di.di_height; i--;)
@@ -390,10 +390,10 @@ static inline u64 *metapointer(struct buffer_head *bh, int *boundary,
390 390
391static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, 391static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh,
392 unsigned int height, struct metapath *mp, int create, 392 unsigned int height, struct metapath *mp, int create,
393 int *new, uint64_t *block) 393 int *new, u64 *block)
394{ 394{
395 int boundary; 395 int boundary;
396 uint64_t *ptr = metapointer(bh, &boundary, height, mp); 396 u64 *ptr = metapointer(bh, &boundary, height, mp);
397 397
398 if (*ptr) { 398 if (*ptr) {
399 *block = be64_to_cpu(*ptr); 399 *block = be64_to_cpu(*ptr);
@@ -594,13 +594,13 @@ int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsi
594 594
595static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh, 595static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh,
596 struct metapath *mp, unsigned int height, 596 struct metapath *mp, unsigned int height,
597 uint64_t block, int first, block_call_t bc, 597 u64 block, int first, block_call_t bc,
598 void *data) 598 void *data)
599{ 599{
600 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 600 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
601 struct buffer_head *bh = NULL; 601 struct buffer_head *bh = NULL;
602 uint64_t *top, *bottom; 602 u64 *top, *bottom;
603 uint64_t bn; 603 u64 bn;
604 int error; 604 int error;
605 int mh_size = sizeof(struct gfs2_meta_header); 605 int mh_size = sizeof(struct gfs2_meta_header);
606 606
@@ -617,10 +617,10 @@ static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh,
617 if (error) 617 if (error)
618 return error; 618 return error;
619 619
620 top = (uint64_t *)(bh->b_data + mh_size) + 620 top = (u64 *)(bh->b_data + mh_size) +
621 ((first) ? mp->mp_list[height] : 0); 621 ((first) ? mp->mp_list[height] : 0);
622 622
623 bottom = (uint64_t *)(bh->b_data + mh_size) + sdp->sd_inptrs; 623 bottom = (u64 *)(bh->b_data + mh_size) + sdp->sd_inptrs;
624 } 624 }
625 625
626 error = bc(ip, dibh, bh, top, bottom, height, data); 626 error = bc(ip, dibh, bh, top, bottom, height, data);
@@ -659,15 +659,15 @@ out:
659 */ 659 */
660 660
661static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, 661static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
662 struct buffer_head *bh, uint64_t *top, uint64_t *bottom, 662 struct buffer_head *bh, u64 *top, u64 *bottom,
663 unsigned int height, void *data) 663 unsigned int height, void *data)
664{ 664{
665 struct strip_mine *sm = data; 665 struct strip_mine *sm = data;
666 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 666 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
667 struct gfs2_rgrp_list rlist; 667 struct gfs2_rgrp_list rlist;
668 uint64_t bn, bstart; 668 u64 bn, bstart;
669 uint32_t blen; 669 u32 blen;
670 uint64_t *p; 670 u64 *p;
671 unsigned int rg_blocks = 0; 671 unsigned int rg_blocks = 0;
672 int metadata; 672 int metadata;
673 unsigned int revokes = 0; 673 unsigned int revokes = 0;
@@ -804,7 +804,7 @@ out:
804 * Returns: errno 804 * Returns: errno
805 */ 805 */
806 806
807static int do_grow(struct gfs2_inode *ip, uint64_t size) 807static int do_grow(struct gfs2_inode *ip, u64 size)
808{ 808{
809 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 809 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
810 struct gfs2_alloc *al; 810 struct gfs2_alloc *al;
@@ -949,7 +949,7 @@ unlock:
949 return err; 949 return err;
950} 950}
951 951
952static int trunc_start(struct gfs2_inode *ip, uint64_t size) 952static int trunc_start(struct gfs2_inode *ip, u64 size)
953{ 953{
954 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 954 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
955 struct buffer_head *dibh; 955 struct buffer_head *dibh;
@@ -974,7 +974,7 @@ static int trunc_start(struct gfs2_inode *ip, uint64_t size)
974 error = 1; 974 error = 1;
975 975
976 } else { 976 } else {
977 if (size & (uint64_t)(sdp->sd_sb.sb_bsize - 1)) 977 if (size & (u64)(sdp->sd_sb.sb_bsize - 1))
978 error = gfs2_block_truncate_page(ip->i_inode.i_mapping); 978 error = gfs2_block_truncate_page(ip->i_inode.i_mapping);
979 979
980 if (!error) { 980 if (!error) {
@@ -993,10 +993,10 @@ out:
993 return error; 993 return error;
994} 994}
995 995
996static int trunc_dealloc(struct gfs2_inode *ip, uint64_t size) 996static int trunc_dealloc(struct gfs2_inode *ip, u64 size)
997{ 997{
998 unsigned int height = ip->i_di.di_height; 998 unsigned int height = ip->i_di.di_height;
999 uint64_t lblock; 999 u64 lblock;
1000 struct metapath mp; 1000 struct metapath mp;
1001 int error; 1001 int error;
1002 1002
@@ -1076,7 +1076,7 @@ out:
1076 * Returns: errno 1076 * Returns: errno
1077 */ 1077 */
1078 1078
1079static int do_shrink(struct gfs2_inode *ip, uint64_t size) 1079static int do_shrink(struct gfs2_inode *ip, u64 size)
1080{ 1080{
1081 int error; 1081 int error;
1082 1082
@@ -1104,7 +1104,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size)
1104 * Returns: errno 1104 * Returns: errno
1105 */ 1105 */
1106 1106
1107int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size) 1107int gfs2_truncatei(struct gfs2_inode *ip, u64 size)
1108{ 1108{
1109 int error; 1109 int error;
1110 1110
@@ -1172,12 +1172,12 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len,
1172 * Returns: errno 1172 * Returns: errno
1173 */ 1173 */
1174 1174
1175int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, 1175int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset,
1176 unsigned int len, int *alloc_required) 1176 unsigned int len, int *alloc_required)
1177{ 1177{
1178 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1178 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1179 uint64_t lblock, lblock_stop, dblock; 1179 u64 lblock, lblock_stop, dblock;
1180 uint32_t extlen; 1180 u32 extlen;
1181 int new = 0; 1181 int new = 0;
1182 int error = 0; 1182 int error = 0;
1183 1183