aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/bmap.c60
-rw-r--r--fs/gfs2/bmap.h4
-rw-r--r--fs/gfs2/dir.c124
-rw-r--r--fs/gfs2/dir.h8
-rw-r--r--fs/gfs2/eattr.c56
-rw-r--r--fs/gfs2/eattr.h6
-rw-r--r--fs/gfs2/glock.c8
-rw-r--r--fs/gfs2/glock.h6
-rw-r--r--fs/gfs2/incore.h72
-rw-r--r--fs/gfs2/inode.c20
-rw-r--r--fs/gfs2/lm_interface.h2
-rw-r--r--fs/gfs2/locking/dlm/lock.c8
-rw-r--r--fs/gfs2/locking/dlm/lock_dlm.h14
-rw-r--r--fs/gfs2/locking/dlm/thread.c2
-rw-r--r--fs/gfs2/log.c18
-rw-r--r--fs/gfs2/lops.c18
-rw-r--r--fs/gfs2/meta_io.c18
-rw-r--r--fs/gfs2/meta_io.h10
-rw-r--r--fs/gfs2/ops_address.c8
-rw-r--r--fs/gfs2/ops_export.c12
-rw-r--r--fs/gfs2/ops_file.c10
-rw-r--r--fs/gfs2/ops_inode.c12
-rw-r--r--fs/gfs2/ops_vm.c4
-rw-r--r--fs/gfs2/quota.c50
-rw-r--r--fs/gfs2/quota.h14
-rw-r--r--fs/gfs2/recovery.c16
-rw-r--r--fs/gfs2/recovery.h4
-rw-r--r--fs/gfs2/rgrp.c72
-rw-r--r--fs/gfs2/rgrp.h10
-rw-r--r--fs/gfs2/super.c28
-rw-r--r--fs/gfs2/super.h2
-rw-r--r--fs/gfs2/sys.c4
-rw-r--r--fs/gfs2/trans.c6
-rw-r--r--fs/gfs2/trans.h4
-rw-r--r--fs/gfs2/util.c2
-rw-r--r--fs/gfs2/util.h14
36 files changed, 363 insertions, 363 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
diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h
index ab0157c5ed0e..cb3b624fea31 100644
--- a/fs/gfs2/bmap.h
+++ b/fs/gfs2/bmap.h
@@ -14,14 +14,14 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page);
14int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary); 14int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary);
15int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); 15int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen);
16 16
17int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size); 17int gfs2_truncatei(struct gfs2_inode *ip, u64 size);
18int gfs2_truncatei_resume(struct gfs2_inode *ip); 18int gfs2_truncatei_resume(struct gfs2_inode *ip);
19int gfs2_file_dealloc(struct gfs2_inode *ip); 19int gfs2_file_dealloc(struct gfs2_inode *ip);
20 20
21void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, 21void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len,
22 unsigned int *data_blocks, 22 unsigned int *data_blocks,
23 unsigned int *ind_blocks); 23 unsigned int *ind_blocks);
24int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, 24int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset,
25 unsigned int len, int *alloc_required); 25 unsigned int len, int *alloc_required);
26 26
27#endif /* __BMAP_DOT_H__ */ 27#endif /* __BMAP_DOT_H__ */
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 59d0cbcaecff..2023dc4ea306 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -78,15 +78,15 @@
78#define IS_LEAF 1 /* Hashed (leaf) directory */ 78#define IS_LEAF 1 /* Hashed (leaf) directory */
79#define IS_DINODE 2 /* Linear (stuffed dinode block) directory */ 79#define IS_DINODE 2 /* Linear (stuffed dinode block) directory */
80 80
81#define gfs2_disk_hash2offset(h) (((uint64_t)(h)) >> 1) 81#define gfs2_disk_hash2offset(h) (((u64)(h)) >> 1)
82#define gfs2_dir_offset2hash(p) ((uint32_t)(((uint64_t)(p)) << 1)) 82#define gfs2_dir_offset2hash(p) ((u32)(((u64)(p)) << 1))
83 83
84typedef int (*leaf_call_t) (struct gfs2_inode *dip, 84typedef int (*leaf_call_t) (struct gfs2_inode *dip,
85 uint32_t index, uint32_t len, uint64_t leaf_no, 85 u32 index, u32 len, u64 leaf_no,
86 void *data); 86 void *data);
87 87
88 88
89int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, uint64_t block, 89int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block,
90 struct buffer_head **bhp) 90 struct buffer_head **bhp)
91{ 91{
92 struct buffer_head *bh; 92 struct buffer_head *bh;
@@ -99,7 +99,7 @@ int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, uint64_t block,
99 return 0; 99 return 0;
100} 100}
101 101
102static int gfs2_dir_get_existing_buffer(struct gfs2_inode *ip, uint64_t block, 102static int gfs2_dir_get_existing_buffer(struct gfs2_inode *ip, u64 block,
103 struct buffer_head **bhp) 103 struct buffer_head **bhp)
104{ 104{
105 struct buffer_head *bh; 105 struct buffer_head *bh;
@@ -151,12 +151,12 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf,
151 * Returns: The number of bytes correctly written or error code 151 * Returns: The number of bytes correctly written or error code
152 */ 152 */
153static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf, 153static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf,
154 uint64_t offset, unsigned int size) 154 u64 offset, unsigned int size)
155{ 155{
156 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 156 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
157 struct buffer_head *dibh; 157 struct buffer_head *dibh;
158 uint64_t lblock, dblock; 158 u64 lblock, dblock;
159 uint32_t extlen = 0; 159 u32 extlen = 0;
160 unsigned int o; 160 unsigned int o;
161 int copied = 0; 161 int copied = 0;
162 int error = 0; 162 int error = 0;
@@ -271,11 +271,11 @@ static int gfs2_dir_read_stuffed(struct gfs2_inode *ip, char *buf,
271 * Returns: The amount of data actually copied or the error 271 * Returns: The amount of data actually copied or the error
272 */ 272 */
273static int gfs2_dir_read_data(struct gfs2_inode *ip, char *buf, 273static int gfs2_dir_read_data(struct gfs2_inode *ip, char *buf,
274 uint64_t offset, unsigned int size) 274 u64 offset, unsigned int size)
275{ 275{
276 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 276 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
277 uint64_t lblock, dblock; 277 u64 lblock, dblock;
278 uint32_t extlen = 0; 278 u32 extlen = 0;
279 unsigned int o; 279 unsigned int o;
280 int copied = 0; 280 int copied = 0;
281 int error = 0; 281 int error = 0;
@@ -581,7 +581,7 @@ static int dirent_next(struct gfs2_inode *dip, struct buffer_head *bh,
581{ 581{
582 struct gfs2_dirent *tmp, *cur; 582 struct gfs2_dirent *tmp, *cur;
583 char *bh_end; 583 char *bh_end;
584 uint16_t cur_rec_len; 584 u16 cur_rec_len;
585 585
586 cur = *dent; 586 cur = *dent;
587 bh_end = bh->b_data + bh->b_size; 587 bh_end = bh->b_data + bh->b_size;
@@ -630,7 +630,7 @@ static int dirent_next(struct gfs2_inode *dip, struct buffer_head *bh,
630static void dirent_del(struct gfs2_inode *dip, struct buffer_head *bh, 630static void dirent_del(struct gfs2_inode *dip, struct buffer_head *bh,
631 struct gfs2_dirent *prev, struct gfs2_dirent *cur) 631 struct gfs2_dirent *prev, struct gfs2_dirent *cur)
632{ 632{
633 uint16_t cur_rec_len, prev_rec_len; 633 u16 cur_rec_len, prev_rec_len;
634 634
635 if (!cur->de_inum.no_addr) { 635 if (!cur->de_inum.no_addr) {
636 gfs2_consist_inode(dip); 636 gfs2_consist_inode(dip);
@@ -698,7 +698,7 @@ static struct gfs2_dirent *gfs2_dirent_alloc(struct inode *inode,
698 return gfs2_init_dirent(inode, dent, name, bh); 698 return gfs2_init_dirent(inode, dent, name, bh);
699} 699}
700 700
701static int get_leaf(struct gfs2_inode *dip, uint64_t leaf_no, 701static int get_leaf(struct gfs2_inode *dip, u64 leaf_no,
702 struct buffer_head **bhp) 702 struct buffer_head **bhp)
703{ 703{
704 int error; 704 int error;
@@ -721,16 +721,16 @@ static int get_leaf(struct gfs2_inode *dip, uint64_t leaf_no,
721 * Returns: 0 on success, error code otherwise 721 * Returns: 0 on success, error code otherwise
722 */ 722 */
723 723
724static int get_leaf_nr(struct gfs2_inode *dip, uint32_t index, 724static int get_leaf_nr(struct gfs2_inode *dip, u32 index,
725 uint64_t *leaf_out) 725 u64 *leaf_out)
726{ 726{
727 uint64_t leaf_no; 727 u64 leaf_no;
728 int error; 728 int error;
729 729
730 error = gfs2_dir_read_data(dip, (char *)&leaf_no, 730 error = gfs2_dir_read_data(dip, (char *)&leaf_no,
731 index * sizeof(uint64_t), 731 index * sizeof(u64),
732 sizeof(uint64_t)); 732 sizeof(u64));
733 if (error != sizeof(uint64_t)) 733 if (error != sizeof(u64))
734 return (error < 0) ? error : -EIO; 734 return (error < 0) ? error : -EIO;
735 735
736 *leaf_out = be64_to_cpu(leaf_no); 736 *leaf_out = be64_to_cpu(leaf_no);
@@ -738,10 +738,10 @@ static int get_leaf_nr(struct gfs2_inode *dip, uint32_t index,
738 return 0; 738 return 0;
739} 739}
740 740
741static int get_first_leaf(struct gfs2_inode *dip, uint32_t index, 741static int get_first_leaf(struct gfs2_inode *dip, u32 index,
742 struct buffer_head **bh_out) 742 struct buffer_head **bh_out)
743{ 743{
744 uint64_t leaf_no; 744 u64 leaf_no;
745 int error; 745 int error;
746 746
747 error = get_leaf_nr(dip, index, &leaf_no); 747 error = get_leaf_nr(dip, index, &leaf_no);
@@ -847,8 +847,8 @@ static int dir_make_exhash(struct inode *inode)
847 struct buffer_head *bh, *dibh; 847 struct buffer_head *bh, *dibh;
848 struct gfs2_leaf *leaf; 848 struct gfs2_leaf *leaf;
849 int y; 849 int y;
850 uint32_t x; 850 u32 x;
851 uint64_t *lp, bn; 851 u64 *lp, bn;
852 int error; 852 int error;
853 853
854 error = gfs2_meta_inode_buffer(dip, &dibh); 854 error = gfs2_meta_inode_buffer(dip, &dibh);
@@ -904,7 +904,7 @@ static int dir_make_exhash(struct inode *inode)
904 gfs2_trans_add_bh(dip->i_gl, dibh, 1); 904 gfs2_trans_add_bh(dip->i_gl, dibh, 1);
905 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); 905 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
906 906
907 lp = (uint64_t *)(dibh->b_data + sizeof(struct gfs2_dinode)); 907 lp = (u64 *)(dibh->b_data + sizeof(struct gfs2_dinode));
908 908
909 for (x = sdp->sd_hash_ptrs; x--; lp++) 909 for (x = sdp->sd_hash_ptrs; x--; lp++)
910 *lp = cpu_to_be64(bn); 910 *lp = cpu_to_be64(bn);
@@ -939,9 +939,9 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
939 struct buffer_head *nbh, *obh, *dibh; 939 struct buffer_head *nbh, *obh, *dibh;
940 struct gfs2_leaf *nleaf, *oleaf; 940 struct gfs2_leaf *nleaf, *oleaf;
941 struct gfs2_dirent *dent = NULL, *prev = NULL, *next = NULL, *new; 941 struct gfs2_dirent *dent = NULL, *prev = NULL, *next = NULL, *new;
942 uint32_t start, len, half_len, divider; 942 u32 start, len, half_len, divider;
943 uint64_t bn, *lp, leaf_no; 943 u64 bn, *lp, leaf_no;
944 uint32_t index; 944 u32 index;
945 int x, moved = 0; 945 int x, moved = 0;
946 int error; 946 int error;
947 947
@@ -985,14 +985,14 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
985 /* Change the pointers. 985 /* Change the pointers.
986 Don't bother distinguishing stuffed from non-stuffed. 986 Don't bother distinguishing stuffed from non-stuffed.
987 This code is complicated enough already. */ 987 This code is complicated enough already. */
988 lp = kmalloc(half_len * sizeof(uint64_t), GFP_NOFS | __GFP_NOFAIL); 988 lp = kmalloc(half_len * sizeof(u64), GFP_NOFS | __GFP_NOFAIL);
989 /* Change the pointers */ 989 /* Change the pointers */
990 for (x = 0; x < half_len; x++) 990 for (x = 0; x < half_len; x++)
991 lp[x] = cpu_to_be64(bn); 991 lp[x] = cpu_to_be64(bn);
992 992
993 error = gfs2_dir_write_data(dip, (char *)lp, start * sizeof(uint64_t), 993 error = gfs2_dir_write_data(dip, (char *)lp, start * sizeof(u64),
994 half_len * sizeof(uint64_t)); 994 half_len * sizeof(u64));
995 if (error != half_len * sizeof(uint64_t)) { 995 if (error != half_len * sizeof(u64)) {
996 if (error >= 0) 996 if (error >= 0)
997 error = -EIO; 997 error = -EIO;
998 goto fail_lpfree; 998 goto fail_lpfree;
@@ -1077,15 +1077,15 @@ static int dir_double_exhash(struct gfs2_inode *dip)
1077{ 1077{
1078 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); 1078 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
1079 struct buffer_head *dibh; 1079 struct buffer_head *dibh;
1080 uint32_t hsize; 1080 u32 hsize;
1081 uint64_t *buf; 1081 u64 *buf;
1082 uint64_t *from, *to; 1082 u64 *from, *to;
1083 uint64_t block; 1083 u64 block;
1084 int x; 1084 int x;
1085 int error = 0; 1085 int error = 0;
1086 1086
1087 hsize = 1 << dip->i_di.di_depth; 1087 hsize = 1 << dip->i_di.di_depth;
1088 if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { 1088 if (hsize * sizeof(u64) != dip->i_di.di_size) {
1089 gfs2_consist_inode(dip); 1089 gfs2_consist_inode(dip);
1090 return -EIO; 1090 return -EIO;
1091 } 1091 }
@@ -1105,7 +1105,7 @@ static int dir_double_exhash(struct gfs2_inode *dip)
1105 } 1105 }
1106 1106
1107 from = buf; 1107 from = buf;
1108 to = (uint64_t *)((char *)buf + sdp->sd_hash_bsize); 1108 to = (u64 *)((char *)buf + sdp->sd_hash_bsize);
1109 1109
1110 for (x = sdp->sd_hash_ptrs; x--; from++) { 1110 for (x = sdp->sd_hash_ptrs; x--; from++) {
1111 *to++ = *from; /* No endianess worries */ 1111 *to++ = *from; /* No endianess worries */
@@ -1153,7 +1153,7 @@ fail:
1153static int compare_dents(const void *a, const void *b) 1153static int compare_dents(const void *a, const void *b)
1154{ 1154{
1155 struct gfs2_dirent *dent_a, *dent_b; 1155 struct gfs2_dirent *dent_a, *dent_b;
1156 uint32_t hash_a, hash_b; 1156 u32 hash_a, hash_b;
1157 int ret = 0; 1157 int ret = 0;
1158 1158
1159 dent_a = *(struct gfs2_dirent **)a; 1159 dent_a = *(struct gfs2_dirent **)a;
@@ -1201,14 +1201,14 @@ static int compare_dents(const void *a, const void *b)
1201 * Returns: errno, >0 on exception from filldir 1201 * Returns: errno, >0 on exception from filldir
1202 */ 1202 */
1203 1203
1204static int do_filldir_main(struct gfs2_inode *dip, uint64_t *offset, 1204static int do_filldir_main(struct gfs2_inode *dip, u64 *offset,
1205 void *opaque, gfs2_filldir_t filldir, 1205 void *opaque, gfs2_filldir_t filldir,
1206 const struct gfs2_dirent **darr, uint32_t entries, 1206 const struct gfs2_dirent **darr, u32 entries,
1207 int *copied) 1207 int *copied)
1208{ 1208{
1209 const struct gfs2_dirent *dent, *dent_next; 1209 const struct gfs2_dirent *dent, *dent_next;
1210 struct gfs2_inum inum; 1210 struct gfs2_inum inum;
1211 uint64_t off, off_next; 1211 u64 off, off_next;
1212 unsigned int x, y; 1212 unsigned int x, y;
1213 int run = 0; 1213 int run = 0;
1214 int error = 0; 1214 int error = 0;
@@ -1346,21 +1346,21 @@ out:
1346 * Returns: errno 1346 * Returns: errno
1347 */ 1347 */
1348 1348
1349static int dir_e_read(struct inode *inode, uint64_t *offset, void *opaque, 1349static int dir_e_read(struct inode *inode, u64 *offset, void *opaque,
1350 gfs2_filldir_t filldir) 1350 gfs2_filldir_t filldir)
1351{ 1351{
1352 struct gfs2_inode *dip = GFS2_I(inode); 1352 struct gfs2_inode *dip = GFS2_I(inode);
1353 struct gfs2_sbd *sdp = GFS2_SB(inode); 1353 struct gfs2_sbd *sdp = GFS2_SB(inode);
1354 uint32_t hsize, len = 0; 1354 u32 hsize, len = 0;
1355 uint32_t ht_offset, lp_offset, ht_offset_cur = -1; 1355 u32 ht_offset, lp_offset, ht_offset_cur = -1;
1356 uint32_t hash, index; 1356 u32 hash, index;
1357 uint64_t *lp; 1357 u64 *lp;
1358 int copied = 0; 1358 int copied = 0;
1359 int error = 0; 1359 int error = 0;
1360 unsigned depth = 0; 1360 unsigned depth = 0;
1361 1361
1362 hsize = 1 << dip->i_di.di_depth; 1362 hsize = 1 << dip->i_di.di_depth;
1363 if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { 1363 if (hsize * sizeof(u64) != dip->i_di.di_size) {
1364 gfs2_consist_inode(dip); 1364 gfs2_consist_inode(dip);
1365 return -EIO; 1365 return -EIO;
1366 } 1366 }
@@ -1378,7 +1378,7 @@ static int dir_e_read(struct inode *inode, uint64_t *offset, void *opaque,
1378 1378
1379 if (ht_offset_cur != ht_offset) { 1379 if (ht_offset_cur != ht_offset) {
1380 error = gfs2_dir_read_data(dip, (char *)lp, 1380 error = gfs2_dir_read_data(dip, (char *)lp,
1381 ht_offset * sizeof(uint64_t), 1381 ht_offset * sizeof(u64),
1382 sdp->sd_hash_bsize); 1382 sdp->sd_hash_bsize);
1383 if (error != sdp->sd_hash_bsize) { 1383 if (error != sdp->sd_hash_bsize) {
1384 if (error >= 0) 1384 if (error >= 0)
@@ -1405,7 +1405,7 @@ out:
1405 return error; 1405 return error;
1406} 1406}
1407 1407
1408int gfs2_dir_read(struct inode *inode, uint64_t *offset, void *opaque, 1408int gfs2_dir_read(struct inode *inode, u64 *offset, void *opaque,
1409 gfs2_filldir_t filldir) 1409 gfs2_filldir_t filldir)
1410{ 1410{
1411 struct gfs2_inode *dip = GFS2_I(inode); 1411 struct gfs2_inode *dip = GFS2_I(inode);
@@ -1725,15 +1725,15 @@ static int foreach_leaf(struct gfs2_inode *dip, leaf_call_t lc, void *data)
1725 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); 1725 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
1726 struct buffer_head *bh; 1726 struct buffer_head *bh;
1727 struct gfs2_leaf *leaf; 1727 struct gfs2_leaf *leaf;
1728 uint32_t hsize, len; 1728 u32 hsize, len;
1729 uint32_t ht_offset, lp_offset, ht_offset_cur = -1; 1729 u32 ht_offset, lp_offset, ht_offset_cur = -1;
1730 uint32_t index = 0; 1730 u32 index = 0;
1731 uint64_t *lp; 1731 u64 *lp;
1732 uint64_t leaf_no; 1732 u64 leaf_no;
1733 int error = 0; 1733 int error = 0;
1734 1734
1735 hsize = 1 << dip->i_di.di_depth; 1735 hsize = 1 << dip->i_di.di_depth;
1736 if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { 1736 if (hsize * sizeof(u64) != dip->i_di.di_size) {
1737 gfs2_consist_inode(dip); 1737 gfs2_consist_inode(dip);
1738 return -EIO; 1738 return -EIO;
1739 } 1739 }
@@ -1748,7 +1748,7 @@ static int foreach_leaf(struct gfs2_inode *dip, leaf_call_t lc, void *data)
1748 1748
1749 if (ht_offset_cur != ht_offset) { 1749 if (ht_offset_cur != ht_offset) {
1750 error = gfs2_dir_read_data(dip, (char *)lp, 1750 error = gfs2_dir_read_data(dip, (char *)lp,
1751 ht_offset * sizeof(uint64_t), 1751 ht_offset * sizeof(u64),
1752 sdp->sd_hash_bsize); 1752 sdp->sd_hash_bsize);
1753 if (error != sdp->sd_hash_bsize) { 1753 if (error != sdp->sd_hash_bsize) {
1754 if (error >= 0) 1754 if (error >= 0)
@@ -1798,17 +1798,17 @@ out:
1798 * Returns: errno 1798 * Returns: errno
1799 */ 1799 */
1800 1800
1801static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, 1801static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
1802 uint64_t leaf_no, void *data) 1802 u64 leaf_no, void *data)
1803{ 1803{
1804 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); 1804 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
1805 struct gfs2_leaf *tmp_leaf; 1805 struct gfs2_leaf *tmp_leaf;
1806 struct gfs2_rgrp_list rlist; 1806 struct gfs2_rgrp_list rlist;
1807 struct buffer_head *bh, *dibh; 1807 struct buffer_head *bh, *dibh;
1808 uint64_t blk, nblk; 1808 u64 blk, nblk;
1809 unsigned int rg_blocks = 0, l_blocks = 0; 1809 unsigned int rg_blocks = 0, l_blocks = 0;
1810 char *ht; 1810 char *ht;
1811 unsigned int x, size = len * sizeof(uint64_t); 1811 unsigned int x, size = len * sizeof(u64);
1812 int error; 1812 int error;
1813 1813
1814 memset(&rlist, 0, sizeof(struct gfs2_rgrp_list)); 1814 memset(&rlist, 0, sizeof(struct gfs2_rgrp_list));
@@ -1874,7 +1874,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len,
1874 dip->i_di.di_blocks--; 1874 dip->i_di.di_blocks--;
1875 } 1875 }
1876 1876
1877 error = gfs2_dir_write_data(dip, ht, index * sizeof(uint64_t), size); 1877 error = gfs2_dir_write_data(dip, ht, index * sizeof(u64), size);
1878 if (error != size) { 1878 if (error != size) {
1879 if (error >= 0) 1879 if (error >= 0)
1880 error = -EIO; 1880 error = -EIO;
diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h
index 366a5571648f..f1f83faa36ec 100644
--- a/fs/gfs2/dir.h
+++ b/fs/gfs2/dir.h
@@ -24,7 +24,7 @@
24 24
25typedef int (*gfs2_filldir_t) (void *opaque, 25typedef int (*gfs2_filldir_t) (void *opaque,
26 const char *name, unsigned int length, 26 const char *name, unsigned int length,
27 uint64_t offset, 27 u64 offset,
28 struct gfs2_inum *inum, unsigned int type); 28 struct gfs2_inum *inum, unsigned int type);
29 29
30int gfs2_dir_search(struct inode *dir, const struct qstr *filename, 30int gfs2_dir_search(struct inode *dir, const struct qstr *filename,
@@ -32,7 +32,7 @@ int gfs2_dir_search(struct inode *dir, const struct qstr *filename,
32int gfs2_dir_add(struct inode *inode, const struct qstr *filename, 32int gfs2_dir_add(struct inode *inode, const struct qstr *filename,
33 const struct gfs2_inum *inum, unsigned int type); 33 const struct gfs2_inum *inum, unsigned int type);
34int gfs2_dir_del(struct gfs2_inode *dip, const struct qstr *filename); 34int gfs2_dir_del(struct gfs2_inode *dip, const struct qstr *filename);
35int gfs2_dir_read(struct inode *inode, uint64_t * offset, void *opaque, 35int gfs2_dir_read(struct inode *inode, u64 * offset, void *opaque,
36 gfs2_filldir_t filldir); 36 gfs2_filldir_t filldir);
37int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename, 37int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename,
38 struct gfs2_inum *new_inum, unsigned int new_type); 38 struct gfs2_inum *new_inum, unsigned int new_type);
@@ -41,10 +41,10 @@ int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip);
41 41
42int gfs2_diradd_alloc_required(struct inode *dir, 42int gfs2_diradd_alloc_required(struct inode *dir,
43 const struct qstr *filename); 43 const struct qstr *filename);
44int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, uint64_t block, 44int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block,
45 struct buffer_head **bhp); 45 struct buffer_head **bhp);
46 46
47static inline uint32_t gfs2_disk_hash(const char *data, int len) 47static inline u32 gfs2_disk_hash(const char *data, int len)
48{ 48{
49 return crc32_le(0xFFFFFFFF, data, len) ^ 0xFFFFFFFF; 49 return crc32_le(0xFFFFFFFF, data, len) ^ 0xFFFFFFFF;
50} 50}
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c
index 5a56e6568622..f6b5e306a6c8 100644
--- a/fs/gfs2/eattr.c
+++ b/fs/gfs2/eattr.c
@@ -115,7 +115,7 @@ fail:
115static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data) 115static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data)
116{ 116{
117 struct buffer_head *bh, *eabh; 117 struct buffer_head *bh, *eabh;
118 uint64_t *eablk, *end; 118 u64 *eablk, *end;
119 int error; 119 int error;
120 120
121 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, 121 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr,
@@ -133,11 +133,11 @@ static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data)
133 goto out; 133 goto out;
134 } 134 }
135 135
136 eablk = (uint64_t *)(bh->b_data + sizeof(struct gfs2_meta_header)); 136 eablk = (u64 *)(bh->b_data + sizeof(struct gfs2_meta_header));
137 end = eablk + GFS2_SB(&ip->i_inode)->sd_inptrs; 137 end = eablk + GFS2_SB(&ip->i_inode)->sd_inptrs;
138 138
139 for (; eablk < end; eablk++) { 139 for (; eablk < end; eablk++) {
140 uint64_t bn; 140 u64 bn;
141 141
142 if (!*eablk) 142 if (!*eablk)
143 break; 143 break;
@@ -235,8 +235,8 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
235 struct gfs2_rgrpd *rgd; 235 struct gfs2_rgrpd *rgd;
236 struct gfs2_holder rg_gh; 236 struct gfs2_holder rg_gh;
237 struct buffer_head *dibh; 237 struct buffer_head *dibh;
238 uint64_t *dataptrs, bn = 0; 238 u64 *dataptrs, bn = 0;
239 uint64_t bstart = 0; 239 u64 bstart = 0;
240 unsigned int blen = 0; 240 unsigned int blen = 0;
241 unsigned int blks = 0; 241 unsigned int blks = 0;
242 unsigned int x; 242 unsigned int x;
@@ -296,7 +296,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
296 gfs2_free_meta(ip, bstart, blen); 296 gfs2_free_meta(ip, bstart, blen);
297 297
298 if (prev && !leave) { 298 if (prev && !leave) {
299 uint32_t len; 299 u32 len;
300 300
301 len = GFS2_EA_REC_LEN(prev) + GFS2_EA_REC_LEN(ea); 301 len = GFS2_EA_REC_LEN(prev) + GFS2_EA_REC_LEN(ea);
302 prev->ea_rec_len = cpu_to_be32(len); 302 prev->ea_rec_len = cpu_to_be32(len);
@@ -459,7 +459,7 @@ static int ea_get_unstuffed(struct gfs2_inode *ip, struct gfs2_ea_header *ea,
459 struct buffer_head **bh; 459 struct buffer_head **bh;
460 unsigned int amount = GFS2_EA_DATA_LEN(ea); 460 unsigned int amount = GFS2_EA_DATA_LEN(ea);
461 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); 461 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize);
462 uint64_t *dataptrs = GFS2_EA2DATAPTRS(ea); 462 u64 *dataptrs = GFS2_EA2DATAPTRS(ea);
463 unsigned int x; 463 unsigned int x;
464 int error = 0; 464 int error = 0;
465 465
@@ -601,7 +601,7 @@ static int ea_alloc_blk(struct gfs2_inode *ip, struct buffer_head **bhp)
601{ 601{
602 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 602 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
603 struct gfs2_ea_header *ea; 603 struct gfs2_ea_header *ea;
604 uint64_t block; 604 u64 block;
605 605
606 block = gfs2_alloc_meta(ip); 606 block = gfs2_alloc_meta(ip);
607 607
@@ -649,7 +649,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea,
649 ea->ea_num_ptrs = 0; 649 ea->ea_num_ptrs = 0;
650 memcpy(GFS2_EA2DATA(ea), er->er_data, er->er_data_len); 650 memcpy(GFS2_EA2DATA(ea), er->er_data, er->er_data_len);
651 } else { 651 } else {
652 uint64_t *dataptr = GFS2_EA2DATAPTRS(ea); 652 u64 *dataptr = GFS2_EA2DATAPTRS(ea);
653 const char *data = er->er_data; 653 const char *data = er->er_data;
654 unsigned int data_len = er->er_data_len; 654 unsigned int data_len = er->er_data_len;
655 unsigned int copy; 655 unsigned int copy;
@@ -658,7 +658,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea,
658 ea->ea_num_ptrs = DIV_ROUND_UP(er->er_data_len, sdp->sd_jbsize); 658 ea->ea_num_ptrs = DIV_ROUND_UP(er->er_data_len, sdp->sd_jbsize);
659 for (x = 0; x < ea->ea_num_ptrs; x++) { 659 for (x = 0; x < ea->ea_num_ptrs; x++) {
660 struct buffer_head *bh; 660 struct buffer_head *bh;
661 uint64_t block; 661 u64 block;
662 int mh_size = sizeof(struct gfs2_meta_header); 662 int mh_size = sizeof(struct gfs2_meta_header);
663 663
664 block = gfs2_alloc_meta(ip); 664 block = gfs2_alloc_meta(ip);
@@ -676,7 +676,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea,
676 memset(bh->b_data + mh_size + copy, 0, 676 memset(bh->b_data + mh_size + copy, 0,
677 sdp->sd_jbsize - copy); 677 sdp->sd_jbsize - copy);
678 678
679 *dataptr++ = cpu_to_be64((uint64_t)bh->b_blocknr); 679 *dataptr++ = cpu_to_be64((u64)bh->b_blocknr);
680 data += copy; 680 data += copy;
681 data_len -= copy; 681 data_len -= copy;
682 682
@@ -792,10 +792,10 @@ static int ea_init(struct gfs2_inode *ip, struct gfs2_ea_request *er)
792 792
793static struct gfs2_ea_header *ea_split_ea(struct gfs2_ea_header *ea) 793static struct gfs2_ea_header *ea_split_ea(struct gfs2_ea_header *ea)
794{ 794{
795 uint32_t ea_size = GFS2_EA_SIZE(ea); 795 u32 ea_size = GFS2_EA_SIZE(ea);
796 struct gfs2_ea_header *new = (struct gfs2_ea_header *)((char *)ea + 796 struct gfs2_ea_header *new = (struct gfs2_ea_header *)((char *)ea +
797 ea_size); 797 ea_size);
798 uint32_t new_size = GFS2_EA_REC_LEN(ea) - ea_size; 798 u32 new_size = GFS2_EA_REC_LEN(ea) - ea_size;
799 int last = ea->ea_flags & GFS2_EAFLAG_LAST; 799 int last = ea->ea_flags & GFS2_EAFLAG_LAST;
800 800
801 ea->ea_rec_len = cpu_to_be32(ea_size); 801 ea->ea_rec_len = cpu_to_be32(ea_size);
@@ -812,7 +812,7 @@ static void ea_set_remove_stuffed(struct gfs2_inode *ip,
812{ 812{
813 struct gfs2_ea_header *ea = el->el_ea; 813 struct gfs2_ea_header *ea = el->el_ea;
814 struct gfs2_ea_header *prev = el->el_prev; 814 struct gfs2_ea_header *prev = el->el_prev;
815 uint32_t len; 815 u32 len;
816 816
817 gfs2_trans_add_bh(ip->i_gl, el->el_bh, 1); 817 gfs2_trans_add_bh(ip->i_gl, el->el_bh, 1);
818 818
@@ -953,12 +953,12 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
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 *indbh, *newbh; 955 struct buffer_head *indbh, *newbh;
956 uint64_t *eablk; 956 u64 *eablk;
957 int error; 957 int error;
958 int mh_size = sizeof(struct gfs2_meta_header); 958 int mh_size = sizeof(struct gfs2_meta_header);
959 959
960 if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) { 960 if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) {
961 uint64_t *end; 961 u64 *end;
962 962
963 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, 963 error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr,
964 DIO_START | DIO_WAIT, &indbh); 964 DIO_START | DIO_WAIT, &indbh);
@@ -970,7 +970,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
970 goto out; 970 goto out;
971 } 971 }
972 972
973 eablk = (uint64_t *)(indbh->b_data + mh_size); 973 eablk = (u64 *)(indbh->b_data + mh_size);
974 end = eablk + sdp->sd_inptrs; 974 end = eablk + sdp->sd_inptrs;
975 975
976 for (; eablk < end; eablk++) 976 for (; eablk < end; eablk++)
@@ -984,7 +984,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
984 984
985 gfs2_trans_add_bh(ip->i_gl, indbh, 1); 985 gfs2_trans_add_bh(ip->i_gl, indbh, 1);
986 } else { 986 } else {
987 uint64_t blk; 987 u64 blk;
988 988
989 blk = gfs2_alloc_meta(ip); 989 blk = gfs2_alloc_meta(ip);
990 990
@@ -993,7 +993,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
993 gfs2_metatype_set(indbh, GFS2_METATYPE_IN, GFS2_FORMAT_IN); 993 gfs2_metatype_set(indbh, GFS2_METATYPE_IN, GFS2_FORMAT_IN);
994 gfs2_buffer_clear_tail(indbh, mh_size); 994 gfs2_buffer_clear_tail(indbh, mh_size);
995 995
996 eablk = (uint64_t *)(indbh->b_data + mh_size); 996 eablk = (u64 *)(indbh->b_data + mh_size);
997 *eablk = cpu_to_be64(ip->i_di.di_eattr); 997 *eablk = cpu_to_be64(ip->i_di.di_eattr);
998 ip->i_di.di_eattr = blk; 998 ip->i_di.di_eattr = blk;
999 ip->i_di.di_flags |= GFS2_DIF_EA_INDIRECT; 999 ip->i_di.di_flags |= GFS2_DIF_EA_INDIRECT;
@@ -1006,7 +1006,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er,
1006 if (error) 1006 if (error)
1007 goto out; 1007 goto out;
1008 1008
1009 *eablk = cpu_to_be64((uint64_t)newbh->b_blocknr); 1009 *eablk = cpu_to_be64((u64)newbh->b_blocknr);
1010 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); 1010 error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er);
1011 brelse(newbh); 1011 brelse(newbh);
1012 if (error) 1012 if (error)
@@ -1140,7 +1140,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el)
1140 gfs2_trans_add_bh(ip->i_gl, el->el_bh, 1); 1140 gfs2_trans_add_bh(ip->i_gl, el->el_bh, 1);
1141 1141
1142 if (prev) { 1142 if (prev) {
1143 uint32_t len; 1143 u32 len;
1144 1144
1145 len = GFS2_EA_REC_LEN(prev) + GFS2_EA_REC_LEN(ea); 1145 len = GFS2_EA_REC_LEN(prev) + GFS2_EA_REC_LEN(ea);
1146 prev->ea_rec_len = cpu_to_be32(len); 1146 prev->ea_rec_len = cpu_to_be32(len);
@@ -1225,7 +1225,7 @@ static int ea_acl_chmod_unstuffed(struct gfs2_inode *ip,
1225 struct buffer_head **bh; 1225 struct buffer_head **bh;
1226 unsigned int amount = GFS2_EA_DATA_LEN(ea); 1226 unsigned int amount = GFS2_EA_DATA_LEN(ea);
1227 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); 1227 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize);
1228 uint64_t *dataptrs = GFS2_EA2DATAPTRS(ea); 1228 u64 *dataptrs = GFS2_EA2DATAPTRS(ea);
1229 unsigned int x; 1229 unsigned int x;
1230 int error; 1230 int error;
1231 1231
@@ -1325,9 +1325,9 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
1325 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1325 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1326 struct gfs2_rgrp_list rlist; 1326 struct gfs2_rgrp_list rlist;
1327 struct buffer_head *indbh, *dibh; 1327 struct buffer_head *indbh, *dibh;
1328 uint64_t *eablk, *end; 1328 u64 *eablk, *end;
1329 unsigned int rg_blocks = 0; 1329 unsigned int rg_blocks = 0;
1330 uint64_t bstart = 0; 1330 u64 bstart = 0;
1331 unsigned int blen = 0; 1331 unsigned int blen = 0;
1332 unsigned int blks = 0; 1332 unsigned int blks = 0;
1333 unsigned int x; 1333 unsigned int x;
@@ -1345,11 +1345,11 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
1345 goto out; 1345 goto out;
1346 } 1346 }
1347 1347
1348 eablk = (uint64_t *)(indbh->b_data + sizeof(struct gfs2_meta_header)); 1348 eablk = (u64 *)(indbh->b_data + sizeof(struct gfs2_meta_header));
1349 end = eablk + sdp->sd_inptrs; 1349 end = eablk + sdp->sd_inptrs;
1350 1350
1351 for (; eablk < end; eablk++) { 1351 for (; eablk < end; eablk++) {
1352 uint64_t bn; 1352 u64 bn;
1353 1353
1354 if (!*eablk) 1354 if (!*eablk)
1355 break; 1355 break;
@@ -1390,12 +1390,12 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
1390 1390
1391 gfs2_trans_add_bh(ip->i_gl, indbh, 1); 1391 gfs2_trans_add_bh(ip->i_gl, indbh, 1);
1392 1392
1393 eablk = (uint64_t *)(indbh->b_data + sizeof(struct gfs2_meta_header)); 1393 eablk = (u64 *)(indbh->b_data + sizeof(struct gfs2_meta_header));
1394 bstart = 0; 1394 bstart = 0;
1395 blen = 0; 1395 blen = 0;
1396 1396
1397 for (; eablk < end; eablk++) { 1397 for (; eablk < end; eablk++) {
1398 uint64_t bn; 1398 u64 bn;
1399 1399
1400 if (!*eablk) 1400 if (!*eablk)
1401 break; 1401 break;
diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h
index 7b0291f99fd9..85c70c335c59 100644
--- a/fs/gfs2/eattr.h
+++ b/fs/gfs2/eattr.h
@@ -16,7 +16,7 @@
16#define GFS2_EA_SIZE(ea) \ 16#define GFS2_EA_SIZE(ea) \
17ALIGN(sizeof(struct gfs2_ea_header) + (ea)->ea_name_len + \ 17ALIGN(sizeof(struct gfs2_ea_header) + (ea)->ea_name_len + \
18 ((GFS2_EA_IS_STUFFED(ea)) ? GFS2_EA_DATA_LEN(ea) : \ 18 ((GFS2_EA_IS_STUFFED(ea)) ? GFS2_EA_DATA_LEN(ea) : \
19 (sizeof(uint64_t) * (ea)->ea_num_ptrs)), 8) 19 (sizeof(u64) * (ea)->ea_num_ptrs)), 8)
20 20
21#define GFS2_EA_IS_STUFFED(ea) (!(ea)->ea_num_ptrs) 21#define GFS2_EA_IS_STUFFED(ea) (!(ea)->ea_num_ptrs)
22#define GFS2_EA_IS_LAST(ea) ((ea)->ea_flags & GFS2_EAFLAG_LAST) 22#define GFS2_EA_IS_LAST(ea) ((ea)->ea_flags & GFS2_EAFLAG_LAST)
@@ -26,13 +26,13 @@ ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + (er)->er_data_len, 8)
26 26
27#define GFS2_EAREQ_SIZE_UNSTUFFED(sdp, er) \ 27#define GFS2_EAREQ_SIZE_UNSTUFFED(sdp, er) \
28ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + \ 28ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + \
29 sizeof(uint64_t) * DIV_ROUND_UP((er)->er_data_len, (sdp)->sd_jbsize), 8) 29 sizeof(u64) * DIV_ROUND_UP((er)->er_data_len, (sdp)->sd_jbsize), 8)
30 30
31#define GFS2_EA2NAME(ea) ((char *)((struct gfs2_ea_header *)(ea) + 1)) 31#define GFS2_EA2NAME(ea) ((char *)((struct gfs2_ea_header *)(ea) + 1))
32#define GFS2_EA2DATA(ea) (GFS2_EA2NAME(ea) + (ea)->ea_name_len) 32#define GFS2_EA2DATA(ea) (GFS2_EA2NAME(ea) + (ea)->ea_name_len)
33 33
34#define GFS2_EA2DATAPTRS(ea) \ 34#define GFS2_EA2DATAPTRS(ea) \
35((uint64_t *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8))) 35((u64 *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8)))
36 36
37#define GFS2_EA2NEXT(ea) \ 37#define GFS2_EA2NEXT(ea) \
38((struct gfs2_ea_header *)((char *)(ea) + GFS2_EA_REC_LEN(ea))) 38((struct gfs2_ea_header *)((char *)(ea) + GFS2_EA_REC_LEN(ea)))
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 1c916fedc04b..f2edc8b76121 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -87,7 +87,7 @@ static unsigned int gl_hash(const struct lm_lockname *name)
87{ 87{
88 unsigned int h; 88 unsigned int h;
89 89
90 h = jhash(&name->ln_number, sizeof(uint64_t), 0); 90 h = jhash(&name->ln_number, sizeof(u64), 0);
91 h = jhash(&name->ln_type, sizeof(unsigned int), h); 91 h = jhash(&name->ln_type, sizeof(unsigned int), h);
92 h &= GFS2_GL_HASH_MASK; 92 h &= GFS2_GL_HASH_MASK;
93 93
@@ -255,7 +255,7 @@ static struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp,
255 * Returns: errno 255 * Returns: errno
256 */ 256 */
257 257
258int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number, 258int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
259 const struct gfs2_glock_operations *glops, int create, 259 const struct gfs2_glock_operations *glops, int create,
260 struct gfs2_glock **glp) 260 struct gfs2_glock **glp)
261{ 261{
@@ -1415,7 +1415,7 @@ void gfs2_glock_dq_uninit(struct gfs2_holder *gh)
1415 * Returns: errno 1415 * Returns: errno
1416 */ 1416 */
1417 1417
1418int gfs2_glock_nq_num(struct gfs2_sbd *sdp, uint64_t number, 1418int gfs2_glock_nq_num(struct gfs2_sbd *sdp, u64 number,
1419 const struct gfs2_glock_operations *glops, 1419 const struct gfs2_glock_operations *glops,
1420 unsigned int state, int flags, struct gfs2_holder *gh) 1420 unsigned int state, int flags, struct gfs2_holder *gh)
1421{ 1421{
@@ -1613,7 +1613,7 @@ void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs)
1613 * Returns: errno 1613 * Returns: errno
1614 */ 1614 */
1615 1615
1616void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, uint64_t number, 1616void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, u64 number,
1617 const struct gfs2_glock_operations *glops, 1617 const struct gfs2_glock_operations *glops,
1618 unsigned int state, int flags) 1618 unsigned int state, int flags)
1619{ 1619{
diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h
index 1a90a1983beb..4762cdb04f64 100644
--- a/fs/gfs2/glock.h
+++ b/fs/gfs2/glock.h
@@ -74,7 +74,7 @@ static inline int gfs2_glock_is_blocking(struct gfs2_glock *gl)
74} 74}
75 75
76int gfs2_glock_get(struct gfs2_sbd *sdp, 76int gfs2_glock_get(struct gfs2_sbd *sdp,
77 uint64_t number, const struct gfs2_glock_operations *glops, 77 u64 number, const struct gfs2_glock_operations *glops,
78 int create, struct gfs2_glock **glp); 78 int create, struct gfs2_glock **glp);
79void gfs2_glock_hold(struct gfs2_glock *gl); 79void gfs2_glock_hold(struct gfs2_glock *gl);
80int gfs2_glock_put(struct gfs2_glock *gl); 80int gfs2_glock_put(struct gfs2_glock *gl);
@@ -96,14 +96,14 @@ int gfs2_glock_be_greedy(struct gfs2_glock *gl, unsigned int time);
96 96
97void gfs2_glock_dq_uninit(struct gfs2_holder *gh); 97void gfs2_glock_dq_uninit(struct gfs2_holder *gh);
98int gfs2_glock_nq_num(struct gfs2_sbd *sdp, 98int gfs2_glock_nq_num(struct gfs2_sbd *sdp,
99 uint64_t number, const struct gfs2_glock_operations *glops, 99 u64 number, const struct gfs2_glock_operations *glops,
100 unsigned int state, int flags, struct gfs2_holder *gh); 100 unsigned int state, int flags, struct gfs2_holder *gh);
101 101
102int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs); 102int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs);
103void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs); 103void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs);
104void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs); 104void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs);
105 105
106void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, uint64_t number, 106void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, u64 number,
107 const struct gfs2_glock_operations *glops, 107 const struct gfs2_glock_operations *glops,
108 unsigned int state, int flags); 108 unsigned int state, int flags);
109void gfs2_glock_inode_squish(struct inode *inode); 109void gfs2_glock_inode_squish(struct inode *inode);
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 06f5ec6ebf7f..407afd18fa2e 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -60,9 +60,9 @@ struct gfs2_log_element {
60struct gfs2_bitmap { 60struct gfs2_bitmap {
61 struct buffer_head *bi_bh; 61 struct buffer_head *bi_bh;
62 char *bi_clone; 62 char *bi_clone;
63 uint32_t bi_offset; 63 u32 bi_offset;
64 uint32_t bi_start; 64 u32 bi_start;
65 uint32_t bi_len; 65 u32 bi_len;
66}; 66};
67 67
68struct gfs2_rgrpd { 68struct gfs2_rgrpd {
@@ -72,14 +72,14 @@ struct gfs2_rgrpd {
72 struct gfs2_glock *rd_gl; /* Glock for this rgrp */ 72 struct gfs2_glock *rd_gl; /* Glock for this rgrp */
73 struct gfs2_rindex rd_ri; 73 struct gfs2_rindex rd_ri;
74 struct gfs2_rgrp rd_rg; 74 struct gfs2_rgrp rd_rg;
75 uint64_t rd_rg_vn; 75 u64 rd_rg_vn;
76 struct gfs2_bitmap *rd_bits; 76 struct gfs2_bitmap *rd_bits;
77 unsigned int rd_bh_count; 77 unsigned int rd_bh_count;
78 struct mutex rd_mutex; 78 struct mutex rd_mutex;
79 uint32_t rd_free_clone; 79 u32 rd_free_clone;
80 struct gfs2_log_element rd_le; 80 struct gfs2_log_element rd_le;
81 uint32_t rd_last_alloc_data; 81 u32 rd_last_alloc_data;
82 uint32_t rd_last_alloc_meta; 82 u32 rd_last_alloc_meta;
83 struct gfs2_sbd *rd_sbd; 83 struct gfs2_sbd *rd_sbd;
84}; 84};
85 85
@@ -185,7 +185,7 @@ struct gfs2_glock {
185 char *gl_lvb; 185 char *gl_lvb;
186 atomic_t gl_lvb_count; 186 atomic_t gl_lvb_count;
187 187
188 uint64_t gl_vn; 188 u64 gl_vn;
189 unsigned long gl_stamp; 189 unsigned long gl_stamp;
190 void *gl_object; 190 void *gl_object;
191 191
@@ -232,14 +232,14 @@ struct gfs2_inode {
232 232
233 unsigned long i_flags; /* GIF_... */ 233 unsigned long i_flags; /* GIF_... */
234 234
235 uint64_t i_vn; 235 u64 i_vn;
236 struct gfs2_dinode i_di; /* To be replaced by ref to block */ 236 struct gfs2_dinode i_di; /* To be replaced by ref to block */
237 237
238 struct gfs2_glock *i_gl; /* Move into i_gh? */ 238 struct gfs2_glock *i_gl; /* Move into i_gh? */
239 struct gfs2_holder i_iopen_gh; 239 struct gfs2_holder i_iopen_gh;
240 struct gfs2_holder i_gh; /* for prepare/commit_write only */ 240 struct gfs2_holder i_gh; /* for prepare/commit_write only */
241 struct gfs2_alloc i_alloc; 241 struct gfs2_alloc i_alloc;
242 uint64_t i_last_rg_alloc; 242 u64 i_last_rg_alloc;
243 243
244 spinlock_t i_spin; 244 spinlock_t i_spin;
245 struct rw_semaphore i_rw_mutex; 245 struct rw_semaphore i_rw_mutex;
@@ -277,12 +277,12 @@ struct gfs2_file {
277 277
278struct gfs2_revoke { 278struct gfs2_revoke {
279 struct gfs2_log_element rv_le; 279 struct gfs2_log_element rv_le;
280 uint64_t rv_blkno; 280 u64 rv_blkno;
281}; 281};
282 282
283struct gfs2_revoke_replay { 283struct gfs2_revoke_replay {
284 struct list_head rr_list; 284 struct list_head rr_list;
285 uint64_t rr_blkno; 285 u64 rr_blkno;
286 unsigned int rr_where; 286 unsigned int rr_where;
287}; 287};
288 288
@@ -304,11 +304,11 @@ struct gfs2_quota_data {
304 struct list_head qd_list; 304 struct list_head qd_list;
305 unsigned int qd_count; 305 unsigned int qd_count;
306 306
307 uint32_t qd_id; 307 u32 qd_id;
308 unsigned long qd_flags; /* QDF_... */ 308 unsigned long qd_flags; /* QDF_... */
309 309
310 int64_t qd_change; 310 s64 qd_change;
311 int64_t qd_change_sync; 311 s64 qd_change_sync;
312 312
313 unsigned int qd_slot; 313 unsigned int qd_slot;
314 unsigned int qd_slot_count; 314 unsigned int qd_slot_count;
@@ -320,7 +320,7 @@ struct gfs2_quota_data {
320 struct gfs2_glock *qd_gl; 320 struct gfs2_glock *qd_gl;
321 struct gfs2_quota_lvb qd_qb; 321 struct gfs2_quota_lvb qd_qb;
322 322
323 uint64_t qd_sync_gen; 323 u64 qd_sync_gen;
324 unsigned long qd_last_warn; 324 unsigned long qd_last_warn;
325 unsigned long qd_last_touched; 325 unsigned long qd_last_touched;
326}; 326};
@@ -358,7 +358,7 @@ struct gfs2_ail {
358 struct list_head ai_ail1_list; 358 struct list_head ai_ail1_list;
359 struct list_head ai_ail2_list; 359 struct list_head ai_ail2_list;
360 360
361 uint64_t ai_sync_gen; 361 u64 ai_sync_gen;
362}; 362};
363 363
364struct gfs2_jdesc { 364struct gfs2_jdesc {
@@ -466,20 +466,20 @@ struct gfs2_sbd {
466 466
467 /* Constants computed on mount */ 467 /* Constants computed on mount */
468 468
469 uint32_t sd_fsb2bb; 469 u32 sd_fsb2bb;
470 uint32_t sd_fsb2bb_shift; 470 u32 sd_fsb2bb_shift;
471 uint32_t sd_diptrs; /* Number of pointers in a dinode */ 471 u32 sd_diptrs; /* Number of pointers in a dinode */
472 uint32_t sd_inptrs; /* Number of pointers in a indirect block */ 472 u32 sd_inptrs; /* Number of pointers in a indirect block */
473 uint32_t sd_jbsize; /* Size of a journaled data block */ 473 u32 sd_jbsize; /* Size of a journaled data block */
474 uint32_t sd_hash_bsize; /* sizeof(exhash block) */ 474 u32 sd_hash_bsize; /* sizeof(exhash block) */
475 uint32_t sd_hash_bsize_shift; 475 u32 sd_hash_bsize_shift;
476 uint32_t sd_hash_ptrs; /* Number of pointers in a hash block */ 476 u32 sd_hash_ptrs; /* Number of pointers in a hash block */
477 uint32_t sd_qc_per_block; 477 u32 sd_qc_per_block;
478 uint32_t sd_max_dirres; /* Max blocks needed to add a directory entry */ 478 u32 sd_max_dirres; /* Max blocks needed to add a directory entry */
479 uint32_t sd_max_height; /* Max height of a file's metadata tree */ 479 u32 sd_max_height; /* Max height of a file's metadata tree */
480 uint64_t sd_heightsize[GFS2_MAX_META_HEIGHT]; 480 u64 sd_heightsize[GFS2_MAX_META_HEIGHT];
481 uint32_t sd_max_jheight; /* Max height of journaled file's meta tree */ 481 u32 sd_max_jheight; /* Max height of journaled file's meta tree */
482 uint64_t sd_jheightsize[GFS2_MAX_META_HEIGHT]; 482 u64 sd_jheightsize[GFS2_MAX_META_HEIGHT];
483 483
484 struct gfs2_args sd_args; /* Mount arguments */ 484 struct gfs2_args sd_args; /* Mount arguments */
485 struct gfs2_tune sd_tune; /* Filesystem tuning structure */ 485 struct gfs2_tune sd_tune; /* Filesystem tuning structure */
@@ -522,7 +522,7 @@ struct gfs2_sbd {
522 522
523 /* Resource group stuff */ 523 /* Resource group stuff */
524 524
525 uint64_t sd_rindex_vn; 525 u64 sd_rindex_vn;
526 spinlock_t sd_rindex_spin; 526 spinlock_t sd_rindex_spin;
527 struct mutex sd_rindex_mutex; 527 struct mutex sd_rindex_mutex;
528 struct list_head sd_rindex_list; 528 struct list_head sd_rindex_list;
@@ -567,7 +567,7 @@ struct gfs2_sbd {
567 unsigned int sd_quota_chunks; 567 unsigned int sd_quota_chunks;
568 unsigned char **sd_quota_bitmap; 568 unsigned char **sd_quota_bitmap;
569 569
570 uint64_t sd_quota_sync_gen; 570 u64 sd_quota_sync_gen;
571 unsigned long sd_quota_sync_time; 571 unsigned long sd_quota_sync_time;
572 572
573 /* Log stuff */ 573 /* Log stuff */
@@ -595,7 +595,7 @@ struct gfs2_sbd {
595 unsigned int sd_log_blks_free; 595 unsigned int sd_log_blks_free;
596 struct mutex sd_log_reserve_mutex; 596 struct mutex sd_log_reserve_mutex;
597 597
598 uint64_t sd_log_sequence; 598 u64 sd_log_sequence;
599 unsigned int sd_log_head; 599 unsigned int sd_log_head;
600 unsigned int sd_log_tail; 600 unsigned int sd_log_tail;
601 int sd_log_idle; 601 int sd_log_idle;
@@ -605,11 +605,11 @@ struct gfs2_sbd {
605 struct list_head sd_log_flush_list; 605 struct list_head sd_log_flush_list;
606 606
607 unsigned int sd_log_flush_head; 607 unsigned int sd_log_flush_head;
608 uint64_t sd_log_flush_wrapped; 608 u64 sd_log_flush_wrapped;
609 609
610 struct list_head sd_ail1_list; 610 struct list_head sd_ail1_list;
611 struct list_head sd_ail2_list; 611 struct list_head sd_ail2_list;
612 uint64_t sd_ail_sync_gen; 612 u64 sd_ail_sync_gen;
613 613
614 /* Replay stuff */ 614 /* Replay stuff */
615 615
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 1aaaaa1cc8c3..f683a400b006 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -311,7 +311,7 @@ int gfs2_change_nlink(struct gfs2_inode *ip, int diff)
311{ 311{
312 struct gfs2_sbd *sdp = ip->i_inode.i_sb->s_fs_info; 312 struct gfs2_sbd *sdp = ip->i_inode.i_sb->s_fs_info;
313 struct buffer_head *dibh; 313 struct buffer_head *dibh;
314 uint32_t nlink; 314 u32 nlink;
315 int error; 315 int error;
316 316
317 BUG_ON(ip->i_di.di_nlink != ip->i_inode.i_nlink); 317 BUG_ON(ip->i_di.di_nlink != ip->i_inode.i_nlink);
@@ -428,7 +428,7 @@ out:
428 return inode; 428 return inode;
429} 429}
430 430
431static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino) 431static int pick_formal_ino_1(struct gfs2_sbd *sdp, u64 *formal_ino)
432{ 432{
433 struct gfs2_inode *ip = GFS2_I(sdp->sd_ir_inode); 433 struct gfs2_inode *ip = GFS2_I(sdp->sd_ir_inode);
434 struct buffer_head *bh; 434 struct buffer_head *bh;
@@ -469,7 +469,7 @@ static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino)
469 return 1; 469 return 1;
470} 470}
471 471
472static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino) 472static int pick_formal_ino_2(struct gfs2_sbd *sdp, u64 *formal_ino)
473{ 473{
474 struct gfs2_inode *ip = GFS2_I(sdp->sd_ir_inode); 474 struct gfs2_inode *ip = GFS2_I(sdp->sd_ir_inode);
475 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_inum_inode); 475 struct gfs2_inode *m_ip = GFS2_I(sdp->sd_inum_inode);
@@ -495,13 +495,13 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino)
495 495
496 if (!ir.ir_length) { 496 if (!ir.ir_length) {
497 struct buffer_head *m_bh; 497 struct buffer_head *m_bh;
498 uint64_t x, y; 498 u64 x, y;
499 499
500 error = gfs2_meta_inode_buffer(m_ip, &m_bh); 500 error = gfs2_meta_inode_buffer(m_ip, &m_bh);
501 if (error) 501 if (error)
502 goto out_brelse; 502 goto out_brelse;
503 503
504 x = *(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)); 504 x = *(u64 *)(m_bh->b_data + sizeof(struct gfs2_dinode));
505 x = y = be64_to_cpu(x); 505 x = y = be64_to_cpu(x);
506 ir.ir_start = x; 506 ir.ir_start = x;
507 ir.ir_length = GFS2_INUM_QUANTUM; 507 ir.ir_length = GFS2_INUM_QUANTUM;
@@ -510,7 +510,7 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino)
510 gfs2_consist_inode(m_ip); 510 gfs2_consist_inode(m_ip);
511 x = cpu_to_be64(x); 511 x = cpu_to_be64(x);
512 gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1); 512 gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1);
513 *(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x; 513 *(u64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x;
514 514
515 brelse(m_bh); 515 brelse(m_bh);
516 } 516 }
@@ -531,7 +531,7 @@ out:
531 return error; 531 return error;
532} 532}
533 533
534static int pick_formal_ino(struct gfs2_sbd *sdp, uint64_t *inum) 534static int pick_formal_ino(struct gfs2_sbd *sdp, u64 *inum)
535{ 535{
536 int error; 536 int error;
537 537
@@ -577,9 +577,9 @@ static int create_ok(struct gfs2_inode *dip, const struct qstr *name,
577 return error; 577 return error;
578 } 578 }
579 579
580 if (dip->i_di.di_entries == (uint32_t)-1) 580 if (dip->i_di.di_entries == (u32)-1)
581 return -EFBIG; 581 return -EFBIG;
582 if (S_ISDIR(mode) && dip->i_di.di_nlink == (uint32_t)-1) 582 if (S_ISDIR(mode) && dip->i_di.di_nlink == (u32)-1)
583 return -EMLINK; 583 return -EMLINK;
584 584
585 return 0; 585 return 0;
@@ -1131,7 +1131,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh)
1131 struct gfs2_glock *gl = gh->gh_gl; 1131 struct gfs2_glock *gl = gh->gh_gl;
1132 struct gfs2_sbd *sdp = gl->gl_sbd; 1132 struct gfs2_sbd *sdp = gl->gl_sbd;
1133 struct gfs2_inode *ip = gl->gl_object; 1133 struct gfs2_inode *ip = gl->gl_object;
1134 int64_t curtime, quantum = gfs2_tune_get(sdp, gt_atime_quantum); 1134 s64 curtime, quantum = gfs2_tune_get(sdp, gt_atime_quantum);
1135 unsigned int state; 1135 unsigned int state;
1136 int flags; 1136 int flags;
1137 int error; 1137 int error;
diff --git a/fs/gfs2/lm_interface.h b/fs/gfs2/lm_interface.h
index 0bf4c276e0fe..e2dfc3da4da9 100644
--- a/fs/gfs2/lm_interface.h
+++ b/fs/gfs2/lm_interface.h
@@ -160,7 +160,7 @@ typedef void (*lm_callback_t) (lm_fsdata_t *fsdata, unsigned int type,
160 160
161 161
162struct lm_lockname { 162struct lm_lockname {
163 uint64_t ln_number; 163 u64 ln_number;
164 unsigned int ln_type; 164 unsigned int ln_type;
165}; 165};
166 166
diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c
index 1f15b6e8b2cf..dceea419b94b 100644
--- a/fs/gfs2/locking/dlm/lock.c
+++ b/fs/gfs2/locking/dlm/lock.c
@@ -61,7 +61,7 @@ void gdlm_queue_delayed(struct gdlm_lock *lp)
61 61
62/* convert gfs lock-state to dlm lock-mode */ 62/* convert gfs lock-state to dlm lock-mode */
63 63
64static int16_t make_mode(int16_t lmstate) 64static s16 make_mode(s16 lmstate)
65{ 65{
66 switch (lmstate) { 66 switch (lmstate) {
67 case LM_ST_UNLOCKED: 67 case LM_ST_UNLOCKED:
@@ -79,7 +79,7 @@ static int16_t make_mode(int16_t lmstate)
79 79
80/* convert dlm lock-mode to gfs lock-state */ 80/* convert dlm lock-mode to gfs lock-state */
81 81
82int16_t gdlm_make_lmstate(int16_t dlmmode) 82s16 gdlm_make_lmstate(s16 dlmmode)
83{ 83{
84 switch (dlmmode) { 84 switch (dlmmode) {
85 case DLM_LOCK_IV: 85 case DLM_LOCK_IV:
@@ -101,14 +101,14 @@ int16_t gdlm_make_lmstate(int16_t dlmmode)
101 101
102static void check_cur_state(struct gdlm_lock *lp, unsigned int cur_state) 102static void check_cur_state(struct gdlm_lock *lp, unsigned int cur_state)
103{ 103{
104 int16_t cur = make_mode(cur_state); 104 s16 cur = make_mode(cur_state);
105 if (lp->cur != DLM_LOCK_IV) 105 if (lp->cur != DLM_LOCK_IV)
106 gdlm_assert(lp->cur == cur, "%d, %d", lp->cur, cur); 106 gdlm_assert(lp->cur == cur, "%d, %d", lp->cur, cur);
107} 107}
108 108
109static inline unsigned int make_flags(struct gdlm_lock *lp, 109static inline unsigned int make_flags(struct gdlm_lock *lp,
110 unsigned int gfs_flags, 110 unsigned int gfs_flags,
111 int16_t cur, int16_t req) 111 s16 cur, s16 req)
112{ 112{
113 unsigned int lkf = 0; 113 unsigned int lkf = 0;
114 114
diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h
index 941063498532..c7b6e370258f 100644
--- a/fs/gfs2/locking/dlm/lock_dlm.h
+++ b/fs/gfs2/locking/dlm/lock_dlm.h
@@ -56,7 +56,7 @@ enum {
56}; 56};
57 57
58struct gdlm_ls { 58struct gdlm_ls {
59 uint32_t id; 59 u32 id;
60 int jid; 60 int jid;
61 int first; 61 int first;
62 int first_done; 62 int first_done;
@@ -77,7 +77,7 @@ struct gdlm_ls {
77 struct list_head delayed; 77 struct list_head delayed;
78 struct list_head submit; 78 struct list_head submit;
79 struct list_head all_locks; 79 struct list_head all_locks;
80 uint32_t all_locks_count; 80 u32 all_locks_count;
81 wait_queue_head_t wait_control; 81 wait_queue_head_t wait_control;
82 struct task_struct *thread1; 82 struct task_struct *thread1;
83 struct task_struct *thread2; 83 struct task_struct *thread2;
@@ -109,10 +109,10 @@ struct gdlm_lock {
109 char *lvb; 109 char *lvb;
110 struct dlm_lksb lksb; 110 struct dlm_lksb lksb;
111 111
112 int16_t cur; 112 s16 cur;
113 int16_t req; 113 s16 req;
114 int16_t prev_req; 114 s16 prev_req;
115 uint32_t lkf; /* dlm flags DLM_LKF_ */ 115 u32 lkf; /* dlm flags DLM_LKF_ */
116 unsigned long flags; /* lock_dlm flags LFL_ */ 116 unsigned long flags; /* lock_dlm flags LFL_ */
117 117
118 int bast_mode; /* protected by async_lock */ 118 int bast_mode; /* protected by async_lock */
@@ -158,7 +158,7 @@ void gdlm_release_threads(struct gdlm_ls *);
158 158
159/* lock.c */ 159/* lock.c */
160 160
161int16_t gdlm_make_lmstate(int16_t); 161s16 gdlm_make_lmstate(s16);
162void gdlm_queue_delayed(struct gdlm_lock *); 162void gdlm_queue_delayed(struct gdlm_lock *);
163void gdlm_submit_delayed(struct gdlm_ls *); 163void gdlm_submit_delayed(struct gdlm_ls *);
164int gdlm_release_all_locks(struct gdlm_ls *); 164int gdlm_release_all_locks(struct gdlm_ls *);
diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c
index a782246d666b..d4895ec242f6 100644
--- a/fs/gfs2/locking/dlm/thread.c
+++ b/fs/gfs2/locking/dlm/thread.c
@@ -48,7 +48,7 @@ static void process_complete(struct gdlm_lock *lp)
48{ 48{
49 struct gdlm_ls *ls = lp->ls; 49 struct gdlm_ls *ls = lp->ls;
50 struct lm_async_cb acb; 50 struct lm_async_cb acb;
51 int16_t prev_mode = lp->cur; 51 s16 prev_mode = lp->cur;
52 52
53 memset(&acb, 0, sizeof(acb)); 53 memset(&acb, 0, sizeof(acb));
54 54
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 45ea3ec6f776..571389012874 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -62,7 +62,7 @@ unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct,
62void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) 62void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags)
63{ 63{
64 struct list_head *head = &sdp->sd_ail1_list; 64 struct list_head *head = &sdp->sd_ail1_list;
65 uint64_t sync_gen; 65 u64 sync_gen;
66 struct list_head *first, *tmp; 66 struct list_head *first, *tmp;
67 struct gfs2_ail *first_ai, *ai; 67 struct gfs2_ail *first_ai, *ai;
68 68
@@ -205,10 +205,10 @@ void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks)
205 up_read(&sdp->sd_log_flush_lock); 205 up_read(&sdp->sd_log_flush_lock);
206} 206}
207 207
208static uint64_t log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) 208static u64 log_bmap(struct gfs2_sbd *sdp, unsigned int lbn)
209{ 209{
210 int new = 0; 210 int new = 0;
211 uint64_t dbn; 211 u64 dbn;
212 int error; 212 int error;
213 int bdy; 213 int bdy;
214 214
@@ -287,7 +287,7 @@ static inline void log_incr_head(struct gfs2_sbd *sdp)
287 287
288struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp) 288struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp)
289{ 289{
290 uint64_t blkno = log_bmap(sdp, sdp->sd_log_flush_head); 290 u64 blkno = log_bmap(sdp, sdp->sd_log_flush_head);
291 struct gfs2_log_buf *lb; 291 struct gfs2_log_buf *lb;
292 struct buffer_head *bh; 292 struct buffer_head *bh;
293 293
@@ -317,7 +317,7 @@ struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp)
317struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp, 317struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp,
318 struct buffer_head *real) 318 struct buffer_head *real)
319{ 319{
320 uint64_t blkno = log_bmap(sdp, sdp->sd_log_flush_head); 320 u64 blkno = log_bmap(sdp, sdp->sd_log_flush_head);
321 struct gfs2_log_buf *lb; 321 struct gfs2_log_buf *lb;
322 struct buffer_head *bh; 322 struct buffer_head *bh;
323 323
@@ -361,13 +361,13 @@ static void log_pull_tail(struct gfs2_sbd *sdp, unsigned int new_tail, int pull)
361 * Returns: the initialized log buffer descriptor 361 * Returns: the initialized log buffer descriptor
362 */ 362 */
363 363
364static void log_write_header(struct gfs2_sbd *sdp, uint32_t flags, int pull) 364static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull)
365{ 365{
366 uint64_t blkno = log_bmap(sdp, sdp->sd_log_flush_head); 366 u64 blkno = log_bmap(sdp, sdp->sd_log_flush_head);
367 struct buffer_head *bh; 367 struct buffer_head *bh;
368 struct gfs2_log_header *lh; 368 struct gfs2_log_header *lh;
369 unsigned int tail; 369 unsigned int tail;
370 uint32_t hash; 370 u32 hash;
371 371
372 /* printk(KERN_INFO "log write header start (flags=%08x, pull=%d)\n", flags, pull); */ 372 /* printk(KERN_INFO "log write header start (flags=%08x, pull=%d)\n", flags, pull); */
373 373
@@ -523,7 +523,7 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
523 reserved += sdp->sd_log_commited_buf; 523 reserved += sdp->sd_log_commited_buf;
524 if (sdp->sd_log_commited_revoke) 524 if (sdp->sd_log_commited_revoke)
525 reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, 525 reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke,
526 sizeof(uint64_t)); 526 sizeof(u64));
527 if (reserved) 527 if (reserved)
528 reserved++; 528 reserved++;
529 529
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index e2c2582c8f6e..456d6ad1049d 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -202,7 +202,7 @@ static int buf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
202 struct gfs2_glock *gl = ip->i_gl; 202 struct gfs2_glock *gl = ip->i_gl;
203 unsigned int blks = be32_to_cpu(ld->ld_data1); 203 unsigned int blks = be32_to_cpu(ld->ld_data1);
204 struct buffer_head *bh_log, *bh_ip; 204 struct buffer_head *bh_log, *bh_ip;
205 uint64_t blkno; 205 u64 blkno;
206 int error = 0; 206 int error = 0;
207 207
208 if (pass != 1 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_METADATA) 208 if (pass != 1 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_METADATA)
@@ -294,7 +294,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
294 ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD); 294 ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD);
295 ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_REVOKE); 295 ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_REVOKE);
296 ld->ld_length = cpu_to_be32(gfs2_struct2blk(sdp, sdp->sd_log_num_revoke, 296 ld->ld_length = cpu_to_be32(gfs2_struct2blk(sdp, sdp->sd_log_num_revoke,
297 sizeof(uint64_t))); 297 sizeof(u64)));
298 ld->ld_data1 = cpu_to_be32(sdp->sd_log_num_revoke); 298 ld->ld_data1 = cpu_to_be32(sdp->sd_log_num_revoke);
299 ld->ld_data2 = cpu_to_be32(0); 299 ld->ld_data2 = cpu_to_be32(0);
300 memset(ld->ld_reserved, 0, sizeof(ld->ld_reserved)); 300 memset(ld->ld_reserved, 0, sizeof(ld->ld_reserved));
@@ -305,7 +305,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
305 list_del_init(&rv->rv_le.le_list); 305 list_del_init(&rv->rv_le.le_list);
306 sdp->sd_log_num_revoke--; 306 sdp->sd_log_num_revoke--;
307 307
308 if (offset + sizeof(uint64_t) > sdp->sd_sb.sb_bsize) { 308 if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) {
309 set_buffer_dirty(bh); 309 set_buffer_dirty(bh);
310 ll_rw_block(WRITE, 1, &bh); 310 ll_rw_block(WRITE, 1, &bh);
311 311
@@ -320,7 +320,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
320 *(__be64 *)(bh->b_data + offset) = cpu_to_be64(rv->rv_blkno); 320 *(__be64 *)(bh->b_data + offset) = cpu_to_be64(rv->rv_blkno);
321 kfree(rv); 321 kfree(rv);
322 322
323 offset += sizeof(uint64_t); 323 offset += sizeof(u64);
324 } 324 }
325 gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); 325 gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke);
326 326
@@ -349,7 +349,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
349 unsigned int revokes = be32_to_cpu(ld->ld_data1); 349 unsigned int revokes = be32_to_cpu(ld->ld_data1);
350 struct buffer_head *bh; 350 struct buffer_head *bh;
351 unsigned int offset; 351 unsigned int offset;
352 uint64_t blkno; 352 u64 blkno;
353 int first = 1; 353 int first = 1;
354 int error; 354 int error;
355 355
@@ -366,7 +366,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
366 if (!first) 366 if (!first)
367 gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LB); 367 gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LB);
368 368
369 while (offset + sizeof(uint64_t) <= sdp->sd_sb.sb_bsize) { 369 while (offset + sizeof(u64) <= sdp->sd_sb.sb_bsize) {
370 blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset)); 370 blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset));
371 371
372 error = gfs2_revoke_add(sdp, blkno, start); 372 error = gfs2_revoke_add(sdp, blkno, start);
@@ -377,7 +377,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
377 377
378 if (!--revokes) 378 if (!--revokes)
379 break; 379 break;
380 offset += sizeof(uint64_t); 380 offset += sizeof(u64);
381 } 381 }
382 382
383 brelse(bh); 383 brelse(bh);
@@ -677,8 +677,8 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start,
677 struct gfs2_glock *gl = ip->i_gl; 677 struct gfs2_glock *gl = ip->i_gl;
678 unsigned int blks = be32_to_cpu(ld->ld_data1); 678 unsigned int blks = be32_to_cpu(ld->ld_data1);
679 struct buffer_head *bh_log, *bh_ip; 679 struct buffer_head *bh_log, *bh_ip;
680 uint64_t blkno; 680 u64 blkno;
681 uint64_t esc; 681 u64 esc;
682 int error = 0; 682 int error = 0;
683 683
684 if (pass != 1 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_JDATA) 684 if (pass != 1 || be32_to_cpu(ld->ld_type) != GFS2_LOG_DESC_JDATA)
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 3f6da00e2f59..5b10379c20eb 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -213,7 +213,7 @@ void gfs2_ail_empty_gl(struct gfs2_glock *gl)
213 struct list_head *head = &gl->gl_ail_list; 213 struct list_head *head = &gl->gl_ail_list;
214 struct gfs2_bufdata *bd; 214 struct gfs2_bufdata *bd;
215 struct buffer_head *bh; 215 struct buffer_head *bh;
216 uint64_t blkno; 216 u64 blkno;
217 int error; 217 int error;
218 218
219 blocks = atomic_read(&gl->gl_ail_count); 219 blocks = atomic_read(&gl->gl_ail_count);
@@ -303,7 +303,7 @@ void gfs2_meta_sync(struct gfs2_glock *gl, int flags)
303 */ 303 */
304 304
305static struct buffer_head *getbuf(struct gfs2_sbd *sdp, struct inode *aspace, 305static struct buffer_head *getbuf(struct gfs2_sbd *sdp, struct inode *aspace,
306 uint64_t blkno, int create) 306 u64 blkno, int create)
307{ 307{
308 struct page *page; 308 struct page *page;
309 struct buffer_head *bh; 309 struct buffer_head *bh;
@@ -366,7 +366,7 @@ static void meta_prep_new(struct buffer_head *bh)
366 * Returns: The buffer 366 * Returns: The buffer
367 */ 367 */
368 368
369struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, uint64_t blkno) 369struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno)
370{ 370{
371 struct buffer_head *bh; 371 struct buffer_head *bh;
372 bh = getbuf(gl->gl_sbd, gl->gl_aspace, blkno, CREATE); 372 bh = getbuf(gl->gl_sbd, gl->gl_aspace, blkno, CREATE);
@@ -384,7 +384,7 @@ struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, uint64_t blkno)
384 * Returns: errno 384 * Returns: errno
385 */ 385 */
386 386
387int gfs2_meta_read(struct gfs2_glock *gl, uint64_t blkno, int flags, 387int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
388 struct buffer_head **bhp) 388 struct buffer_head **bhp)
389{ 389{
390 int error; 390 int error;
@@ -549,7 +549,7 @@ void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
549 * 549 *
550 */ 550 */
551 551
552void gfs2_meta_wipe(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) 552void gfs2_meta_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen)
553{ 553{
554 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 554 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
555 struct inode *aspace = ip->i_gl->gl_aspace; 555 struct inode *aspace = ip->i_gl->gl_aspace;
@@ -573,7 +573,7 @@ void gfs2_meta_wipe(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen)
573 if (bd) { 573 if (bd) {
574 gfs2_log_lock(sdp); 574 gfs2_log_lock(sdp);
575 if (bd->bd_ail) { 575 if (bd->bd_ail) {
576 uint64_t blkno = bh->b_blocknr; 576 u64 blkno = bh->b_blocknr;
577 bd->bd_ail = NULL; 577 bd->bd_ail = NULL;
578 list_del(&bd->bd_ail_st_list); 578 list_del(&bd->bd_ail_st_list);
579 list_del(&bd->bd_ail_gl_list); 579 list_del(&bd->bd_ail_gl_list);
@@ -637,7 +637,7 @@ void gfs2_meta_cache_flush(struct gfs2_inode *ip)
637 * Returns: errno 637 * Returns: errno
638 */ 638 */
639 639
640int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, uint64_t num, 640int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, u64 num,
641 int new, struct buffer_head **bhp) 641 int new, struct buffer_head **bhp)
642{ 642{
643 struct buffer_head *bh, **bh_slot = ip->i_cache + height; 643 struct buffer_head *bh, **bh_slot = ip->i_cache + height;
@@ -711,12 +711,12 @@ int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, uint64_t num,
711 * 711 *
712 */ 712 */
713 713
714void gfs2_meta_ra(struct gfs2_glock *gl, uint64_t dblock, uint32_t extlen) 714void gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen)
715{ 715{
716 struct gfs2_sbd *sdp = gl->gl_sbd; 716 struct gfs2_sbd *sdp = gl->gl_sbd;
717 struct inode *aspace = gl->gl_aspace; 717 struct inode *aspace = gl->gl_aspace;
718 struct buffer_head *first_bh, *bh; 718 struct buffer_head *first_bh, *bh;
719 uint32_t max_ra = gfs2_tune_get(sdp, gt_max_readahead) >> 719 u32 max_ra = gfs2_tune_get(sdp, gt_max_readahead) >>
720 sdp->sd_sb.sb_bsize_shift; 720 sdp->sd_sb.sb_bsize_shift;
721 int error; 721 int error;
722 722
diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h
index 4ddc936aae16..9a9acc940292 100644
--- a/fs/gfs2/meta_io.h
+++ b/fs/gfs2/meta_io.h
@@ -44,8 +44,8 @@ void gfs2_ail_empty_gl(struct gfs2_glock *gl);
44void gfs2_meta_inval(struct gfs2_glock *gl); 44void gfs2_meta_inval(struct gfs2_glock *gl);
45void gfs2_meta_sync(struct gfs2_glock *gl, int flags); 45void gfs2_meta_sync(struct gfs2_glock *gl, int flags);
46 46
47struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, uint64_t blkno); 47struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno);
48int gfs2_meta_read(struct gfs2_glock *gl, uint64_t blkno, 48int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno,
49 int flags, struct buffer_head **bhp); 49 int flags, struct buffer_head **bhp);
50int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags); 50int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags);
51 51
@@ -55,10 +55,10 @@ void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh);
55void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, 55void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh,
56 struct gfs2_ail *ai); 56 struct gfs2_ail *ai);
57 57
58void gfs2_meta_wipe(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen); 58void gfs2_meta_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen);
59 59
60void gfs2_meta_cache_flush(struct gfs2_inode *ip); 60void gfs2_meta_cache_flush(struct gfs2_inode *ip);
61int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, uint64_t num, 61int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, u64 num,
62 int new, struct buffer_head **bhp); 62 int new, struct buffer_head **bhp);
63 63
64static inline int gfs2_meta_inode_buffer(struct gfs2_inode *ip, 64static inline int gfs2_meta_inode_buffer(struct gfs2_inode *ip,
@@ -67,7 +67,7 @@ static inline int gfs2_meta_inode_buffer(struct gfs2_inode *ip,
67 return gfs2_meta_indirect_buffer(ip, 0, ip->i_num.no_addr, 0, bhp); 67 return gfs2_meta_indirect_buffer(ip, 0, ip->i_num.no_addr, 0, bhp);
68} 68}
69 69
70void gfs2_meta_ra(struct gfs2_glock *gl, uint64_t dblock, uint32_t extlen); 70void gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen);
71void gfs2_meta_syncfs(struct gfs2_sbd *sdp); 71void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
72 72
73#endif /* __DIO_DOT_H__ */ 73#endif /* __DIO_DOT_H__ */
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 21ae9e4f0f6c..ae9c46e75392 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -66,7 +66,7 @@ int gfs2_get_block(struct inode *inode, sector_t lblock,
66 struct buffer_head *bh_result, int create) 66 struct buffer_head *bh_result, int create)
67{ 67{
68 int new = create; 68 int new = create;
69 uint64_t dblock; 69 u64 dblock;
70 int error; 70 int error;
71 int boundary; 71 int boundary;
72 72
@@ -100,7 +100,7 @@ static int get_block_noalloc(struct inode *inode, sector_t lblock,
100 struct buffer_head *bh_result, int create) 100 struct buffer_head *bh_result, int create)
101{ 101{
102 int new = 0; 102 int new = 0;
103 uint64_t dblock; 103 u64 dblock;
104 int error; 104 int error;
105 int boundary; 105 int boundary;
106 106
@@ -510,10 +510,10 @@ static int gfs2_commit_write(struct file *file, struct page *page,
510 gfs2_trans_add_bh(ip->i_gl, dibh, 1); 510 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
511 511
512 if (gfs2_is_stuffed(ip)) { 512 if (gfs2_is_stuffed(ip)) {
513 uint64_t file_size; 513 u64 file_size;
514 void *kaddr; 514 void *kaddr;
515 515
516 file_size = ((uint64_t)page->index << PAGE_CACHE_SHIFT) + to; 516 file_size = ((u64)page->index << PAGE_CACHE_SHIFT) + to;
517 517
518 kaddr = kmap_atomic(page, KM_USER0); 518 kaddr = kmap_atomic(page, KM_USER0);
519 memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from, 519 memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c
index c94cbc8b6ef6..cf826893dd5f 100644
--- a/fs/gfs2/ops_export.c
+++ b/fs/gfs2/ops_export.c
@@ -46,15 +46,15 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
46 46
47 switch (fh_type) { 47 switch (fh_type) {
48 case 10: 48 case 10:
49 parent.no_formal_ino = ((uint64_t)be32_to_cpu(fh[4])) << 32; 49 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
50 parent.no_formal_ino |= be32_to_cpu(fh[5]); 50 parent.no_formal_ino |= be32_to_cpu(fh[5]);
51 parent.no_addr = ((uint64_t)be32_to_cpu(fh[6])) << 32; 51 parent.no_addr = ((u64)be32_to_cpu(fh[6])) << 32;
52 parent.no_addr |= be32_to_cpu(fh[7]); 52 parent.no_addr |= be32_to_cpu(fh[7]);
53 fh_obj.imode = be32_to_cpu(fh[8]); 53 fh_obj.imode = be32_to_cpu(fh[8]);
54 case 4: 54 case 4:
55 this->no_formal_ino = ((uint64_t)be32_to_cpu(fh[0])) << 32; 55 this->no_formal_ino = ((u64)be32_to_cpu(fh[0])) << 32;
56 this->no_formal_ino |= be32_to_cpu(fh[1]); 56 this->no_formal_ino |= be32_to_cpu(fh[1]);
57 this->no_addr = ((uint64_t)be32_to_cpu(fh[2])) << 32; 57 this->no_addr = ((u64)be32_to_cpu(fh[2])) << 32;
58 this->no_addr |= be32_to_cpu(fh[3]); 58 this->no_addr |= be32_to_cpu(fh[3]);
59 break; 59 break;
60 default: 60 default:
@@ -118,7 +118,7 @@ struct get_name_filldir {
118}; 118};
119 119
120static int get_name_filldir(void *opaque, const char *name, unsigned int length, 120static int get_name_filldir(void *opaque, const char *name, unsigned int length,
121 uint64_t offset, struct gfs2_inum *inum, 121 u64 offset, struct gfs2_inum *inum,
122 unsigned int type) 122 unsigned int type)
123{ 123{
124 struct get_name_filldir *gnfd = (struct get_name_filldir *)opaque; 124 struct get_name_filldir *gnfd = (struct get_name_filldir *)opaque;
@@ -140,7 +140,7 @@ static int gfs2_get_name(struct dentry *parent, char *name,
140 struct gfs2_inode *dip, *ip; 140 struct gfs2_inode *dip, *ip;
141 struct get_name_filldir gnfd; 141 struct get_name_filldir gnfd;
142 struct gfs2_holder gh; 142 struct gfs2_holder gh;
143 uint64_t offset = 0; 143 u64 offset = 0;
144 int error; 144 int error;
145 145
146 if (!dir) 146 if (!dir)
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 53ce7816dc18..f5ddd496d3ec 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -47,7 +47,7 @@
47struct filldir_bad_entry { 47struct filldir_bad_entry {
48 char *fbe_name; 48 char *fbe_name;
49 unsigned int fbe_length; 49 unsigned int fbe_length;
50 uint64_t fbe_offset; 50 u64 fbe_offset;
51 struct gfs2_inum fbe_inum; 51 struct gfs2_inum fbe_inum;
52 unsigned int fbe_type; 52 unsigned int fbe_type;
53}; 53};
@@ -161,7 +161,7 @@ static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin)
161 */ 161 */
162 162
163static int filldir_reg_func(void *opaque, const char *name, unsigned int length, 163static int filldir_reg_func(void *opaque, const char *name, unsigned int length,
164 uint64_t offset, struct gfs2_inum *inum, 164 u64 offset, struct gfs2_inum *inum,
165 unsigned int type) 165 unsigned int type)
166{ 166{
167 struct filldir_reg *fdr = (struct filldir_reg *)opaque; 167 struct filldir_reg *fdr = (struct filldir_reg *)opaque;
@@ -200,7 +200,7 @@ static int readdir_reg(struct file *file, void *dirent, filldir_t filldir)
200 struct gfs2_inode *dip = GFS2_I(dir); 200 struct gfs2_inode *dip = GFS2_I(dir);
201 struct filldir_reg fdr; 201 struct filldir_reg fdr;
202 struct gfs2_holder d_gh; 202 struct gfs2_holder d_gh;
203 uint64_t offset = file->f_pos; 203 u64 offset = file->f_pos;
204 int error; 204 int error;
205 205
206 fdr.fdr_sbd = GFS2_SB(dir); 206 fdr.fdr_sbd = GFS2_SB(dir);
@@ -239,7 +239,7 @@ static int readdir_reg(struct file *file, void *dirent, filldir_t filldir)
239 */ 239 */
240 240
241static int filldir_bad_func(void *opaque, const char *name, unsigned int length, 241static int filldir_bad_func(void *opaque, const char *name, unsigned int length,
242 uint64_t offset, struct gfs2_inum *inum, 242 u64 offset, struct gfs2_inum *inum,
243 unsigned int type) 243 unsigned int type)
244{ 244{
245 struct filldir_bad *fdb = (struct filldir_bad *)opaque; 245 struct filldir_bad *fdb = (struct filldir_bad *)opaque;
@@ -293,7 +293,7 @@ static int readdir_bad(struct file *file, void *dirent, filldir_t filldir)
293 unsigned int entries, size; 293 unsigned int entries, size;
294 struct filldir_bad *fdb; 294 struct filldir_bad *fdb;
295 struct gfs2_holder d_gh; 295 struct gfs2_holder d_gh;
296 uint64_t offset = file->f_pos; 296 u64 offset = file->f_pos;
297 unsigned int x; 297 unsigned int x;
298 struct filldir_bad_entry *fbe; 298 struct filldir_bad_entry *fbe;
299 int error; 299 int error;
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c
index bd9b9957f707..c680f050e17f 100644
--- a/fs/gfs2/ops_inode.c
+++ b/fs/gfs2/ops_inode.c
@@ -172,7 +172,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
172 if (!dip->i_di.di_nlink) 172 if (!dip->i_di.di_nlink)
173 goto out_gunlock; 173 goto out_gunlock;
174 error = -EFBIG; 174 error = -EFBIG;
175 if (dip->i_di.di_entries == (uint32_t)-1) 175 if (dip->i_di.di_entries == (u32)-1)
176 goto out_gunlock; 176 goto out_gunlock;
177 error = -EPERM; 177 error = -EPERM;
178 if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) 178 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
@@ -181,7 +181,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
181 if (!ip->i_di.di_nlink) 181 if (!ip->i_di.di_nlink)
182 goto out_gunlock; 182 goto out_gunlock;
183 error = -EMLINK; 183 error = -EMLINK;
184 if (ip->i_di.di_nlink == (uint32_t)-1) 184 if (ip->i_di.di_nlink == (u32)-1)
185 goto out_gunlock; 185 goto out_gunlock;
186 186
187 alloc_required = error = gfs2_diradd_alloc_required(dir, &dentry->d_name); 187 alloc_required = error = gfs2_diradd_alloc_required(dir, &dentry->d_name);
@@ -509,7 +509,7 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode,
509 struct gfs2_holder ghs[2]; 509 struct gfs2_holder ghs[2];
510 struct inode *inode; 510 struct inode *inode;
511 struct buffer_head *dibh; 511 struct buffer_head *dibh;
512 uint32_t major = 0, minor = 0; 512 u32 major = 0, minor = 0;
513 int error; 513 int error;
514 514
515 switch (mode & S_IFMT) { 515 switch (mode & S_IFMT) {
@@ -670,12 +670,12 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
670 error = -EINVAL; 670 error = -EINVAL;
671 goto out_gunlock; 671 goto out_gunlock;
672 } 672 }
673 if (ndip->i_di.di_entries == (uint32_t)-1) { 673 if (ndip->i_di.di_entries == (u32)-1) {
674 error = -EFBIG; 674 error = -EFBIG;
675 goto out_gunlock; 675 goto out_gunlock;
676 } 676 }
677 if (S_ISDIR(ip->i_di.di_mode) && 677 if (S_ISDIR(ip->i_di.di_mode) &&
678 ndip->i_di.di_nlink == (uint32_t)-1) { 678 ndip->i_di.di_nlink == (u32)-1) {
679 error = -EMLINK; 679 error = -EMLINK;
680 goto out_gunlock; 680 goto out_gunlock;
681 } 681 }
@@ -911,7 +911,7 @@ static int setattr_chown(struct inode *inode, struct iattr *attr)
911 struct gfs2_inode *ip = GFS2_I(inode); 911 struct gfs2_inode *ip = GFS2_I(inode);
912 struct gfs2_sbd *sdp = GFS2_SB(inode); 912 struct gfs2_sbd *sdp = GFS2_SB(inode);
913 struct buffer_head *dibh; 913 struct buffer_head *dibh;
914 uint32_t ouid, ogid, nuid, ngid; 914 u32 ouid, ogid, nuid, ngid;
915 int error; 915 int error;
916 916
917 ouid = ip->i_di.di_uid; 917 ouid = ip->i_di.di_uid;
diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c
index 32ec8574ac8e..3b3463144126 100644
--- a/fs/gfs2/ops_vm.c
+++ b/fs/gfs2/ops_vm.c
@@ -62,7 +62,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, 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 unsigned long index = page->index; 64 unsigned long index = page->index;
65 uint64_t lblock = index << (PAGE_CACHE_SHIFT - 65 u64 lblock = index << (PAGE_CACHE_SHIFT -
66 sdp->sd_sb.sb_bsize_shift); 66 sdp->sd_sb.sb_bsize_shift);
67 unsigned int blocks = PAGE_CACHE_SIZE >> sdp->sd_sb.sb_bsize_shift; 67 unsigned int blocks = PAGE_CACHE_SIZE >> sdp->sd_sb.sb_bsize_shift;
68 struct gfs2_alloc *al; 68 struct gfs2_alloc *al;
@@ -101,7 +101,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page)
101 } 101 }
102 102
103 for (x = 0; x < blocks; ) { 103 for (x = 0; x < blocks; ) {
104 uint64_t dblock; 104 u64 dblock;
105 unsigned int extlen; 105 unsigned int extlen;
106 int new = 1; 106 int new = 1;
107 107
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 572b92eac367..f5830befc307 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -65,17 +65,17 @@
65#define QUOTA_USER 1 65#define QUOTA_USER 1
66#define QUOTA_GROUP 0 66#define QUOTA_GROUP 0
67 67
68static uint64_t qd2offset(struct gfs2_quota_data *qd) 68static u64 qd2offset(struct gfs2_quota_data *qd)
69{ 69{
70 uint64_t offset; 70 u64 offset;
71 71
72 offset = 2 * (uint64_t)qd->qd_id + !test_bit(QDF_USER, &qd->qd_flags); 72 offset = 2 * (u64)qd->qd_id + !test_bit(QDF_USER, &qd->qd_flags);
73 offset *= sizeof(struct gfs2_quota); 73 offset *= sizeof(struct gfs2_quota);
74 74
75 return offset; 75 return offset;
76} 76}
77 77
78static int qd_alloc(struct gfs2_sbd *sdp, int user, uint32_t id, 78static int qd_alloc(struct gfs2_sbd *sdp, int user, u32 id,
79 struct gfs2_quota_data **qdp) 79 struct gfs2_quota_data **qdp)
80{ 80{
81 struct gfs2_quota_data *qd; 81 struct gfs2_quota_data *qd;
@@ -91,7 +91,7 @@ static int qd_alloc(struct gfs2_sbd *sdp, int user, uint32_t id,
91 set_bit(QDF_USER, &qd->qd_flags); 91 set_bit(QDF_USER, &qd->qd_flags);
92 qd->qd_slot = -1; 92 qd->qd_slot = -1;
93 93
94 error = gfs2_glock_get(sdp, 2 * (uint64_t)id + !user, 94 error = gfs2_glock_get(sdp, 2 * (u64)id + !user,
95 &gfs2_quota_glops, CREATE, &qd->qd_gl); 95 &gfs2_quota_glops, CREATE, &qd->qd_gl);
96 if (error) 96 if (error)
97 goto fail; 97 goto fail;
@@ -110,7 +110,7 @@ fail:
110 return error; 110 return error;
111} 111}
112 112
113static int qd_get(struct gfs2_sbd *sdp, int user, uint32_t id, int create, 113static int qd_get(struct gfs2_sbd *sdp, int user, u32 id, int create,
114 struct gfs2_quota_data **qdp) 114 struct gfs2_quota_data **qdp)
115{ 115{
116 struct gfs2_quota_data *qd = NULL, *new_qd = NULL; 116 struct gfs2_quota_data *qd = NULL, *new_qd = NULL;
@@ -248,7 +248,7 @@ static int bh_get(struct gfs2_quota_data *qd)
248 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; 248 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
249 struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode); 249 struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode);
250 unsigned int block, offset; 250 unsigned int block, offset;
251 uint64_t dblock; 251 u64 dblock;
252 int new = 0; 252 int new = 0;
253 struct buffer_head *bh; 253 struct buffer_head *bh;
254 int error; 254 int error;
@@ -405,7 +405,7 @@ static void qd_unlock(struct gfs2_quota_data *qd)
405 qd_put(qd); 405 qd_put(qd);
406} 406}
407 407
408static int qdsb_get(struct gfs2_sbd *sdp, int user, uint32_t id, int create, 408static int qdsb_get(struct gfs2_sbd *sdp, int user, u32 id, int create,
409 struct gfs2_quota_data **qdp) 409 struct gfs2_quota_data **qdp)
410{ 410{
411 int error; 411 int error;
@@ -438,7 +438,7 @@ static void qdsb_put(struct gfs2_quota_data *qd)
438 qd_put(qd); 438 qd_put(qd);
439} 439}
440 440
441int gfs2_quota_hold(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) 441int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid)
442{ 442{
443 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 443 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
444 struct gfs2_alloc *al = &ip->i_alloc; 444 struct gfs2_alloc *al = &ip->i_alloc;
@@ -523,12 +523,12 @@ static int sort_qd(const void *a, const void *b)
523 return ret; 523 return ret;
524} 524}
525 525
526static void do_qc(struct gfs2_quota_data *qd, int64_t change) 526static void do_qc(struct gfs2_quota_data *qd, s64 change)
527{ 527{
528 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; 528 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
529 struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode); 529 struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode);
530 struct gfs2_quota_change *qc = qd->qd_bh_qc; 530 struct gfs2_quota_change *qc = qd->qd_bh_qc;
531 int64_t x; 531 s64 x;
532 532
533 mutex_lock(&sdp->sd_quota_mutex); 533 mutex_lock(&sdp->sd_quota_mutex);
534 gfs2_trans_add_bh(ip->i_gl, qd->qd_bh, 1); 534 gfs2_trans_add_bh(ip->i_gl, qd->qd_bh, 1);
@@ -571,7 +571,7 @@ static void do_qc(struct gfs2_quota_data *qd, int64_t change)
571 * in turn mostly borrowed from ext3 571 * in turn mostly borrowed from ext3
572 */ 572 */
573static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc, 573static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
574 int64_t change, struct gfs2_quota_data *qd) 574 s64 change, struct gfs2_quota_data *qd)
575{ 575{
576 struct inode *inode = &ip->i_inode; 576 struct inode *inode = &ip->i_inode;
577 struct address_space *mapping = inode->i_mapping; 577 struct address_space *mapping = inode->i_mapping;
@@ -811,7 +811,7 @@ fail:
811 return error; 811 return error;
812} 812}
813 813
814int gfs2_quota_lock(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) 814int gfs2_quota_lock(struct gfs2_inode *ip, u32 uid, u32 gid)
815{ 815{
816 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 816 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
817 struct gfs2_alloc *al = &ip->i_alloc; 817 struct gfs2_alloc *al = &ip->i_alloc;
@@ -848,7 +848,7 @@ static int need_sync(struct gfs2_quota_data *qd)
848{ 848{
849 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; 849 struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
850 struct gfs2_tune *gt = &sdp->sd_tune; 850 struct gfs2_tune *gt = &sdp->sd_tune;
851 int64_t value; 851 s64 value;
852 unsigned int num, den; 852 unsigned int num, den;
853 int do_sync = 1; 853 int do_sync = 1;
854 854
@@ -873,7 +873,7 @@ static int need_sync(struct gfs2_quota_data *qd)
873 value *= gfs2_jindex_size(sdp) * num; 873 value *= gfs2_jindex_size(sdp) * num;
874 do_div(value, den); 874 do_div(value, den);
875 value += (s64)be64_to_cpu(qd->qd_qb.qb_value); 875 value += (s64)be64_to_cpu(qd->qd_qb.qb_value);
876 if (value < (int64_t)be64_to_cpu(qd->qd_qb.qb_limit)) 876 if (value < (s64)be64_to_cpu(qd->qd_qb.qb_limit))
877 do_sync = 0; 877 do_sync = 0;
878 } 878 }
879 879
@@ -927,12 +927,12 @@ static int print_message(struct gfs2_quota_data *qd, char *type)
927 return 0; 927 return 0;
928} 928}
929 929
930int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) 930int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid)
931{ 931{
932 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 932 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
933 struct gfs2_alloc *al = &ip->i_alloc; 933 struct gfs2_alloc *al = &ip->i_alloc;
934 struct gfs2_quota_data *qd; 934 struct gfs2_quota_data *qd;
935 int64_t value; 935 s64 value;
936 unsigned int x; 936 unsigned int x;
937 int error = 0; 937 int error = 0;
938 938
@@ -954,12 +954,12 @@ int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid)
954 value += qd->qd_change; 954 value += qd->qd_change;
955 spin_unlock(&sdp->sd_quota_spin); 955 spin_unlock(&sdp->sd_quota_spin);
956 956
957 if (be64_to_cpu(qd->qd_qb.qb_limit) && (int64_t)be64_to_cpu(qd->qd_qb.qb_limit) < value) { 957 if (be64_to_cpu(qd->qd_qb.qb_limit) && (s64)be64_to_cpu(qd->qd_qb.qb_limit) < value) {
958 print_message(qd, "exceeded"); 958 print_message(qd, "exceeded");
959 error = -EDQUOT; 959 error = -EDQUOT;
960 break; 960 break;
961 } else if (be64_to_cpu(qd->qd_qb.qb_warn) && 961 } else if (be64_to_cpu(qd->qd_qb.qb_warn) &&
962 (int64_t)be64_to_cpu(qd->qd_qb.qb_warn) < value && 962 (s64)be64_to_cpu(qd->qd_qb.qb_warn) < value &&
963 time_after_eq(jiffies, qd->qd_last_warn + 963 time_after_eq(jiffies, qd->qd_last_warn +
964 gfs2_tune_get(sdp, 964 gfs2_tune_get(sdp,
965 gt_quota_warn_period) * HZ)) { 965 gt_quota_warn_period) * HZ)) {
@@ -971,8 +971,8 @@ int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid)
971 return error; 971 return error;
972} 972}
973 973
974void gfs2_quota_change(struct gfs2_inode *ip, int64_t change, 974void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
975 uint32_t uid, uint32_t gid) 975 u32 uid, u32 gid)
976{ 976{
977 struct gfs2_alloc *al = &ip->i_alloc; 977 struct gfs2_alloc *al = &ip->i_alloc;
978 struct gfs2_quota_data *qd; 978 struct gfs2_quota_data *qd;
@@ -1038,7 +1038,7 @@ int gfs2_quota_sync(struct gfs2_sbd *sdp)
1038 return error; 1038 return error;
1039} 1039}
1040 1040
1041int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id) 1041int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id)
1042{ 1042{
1043 struct gfs2_quota_data *qd; 1043 struct gfs2_quota_data *qd;
1044 struct gfs2_holder q_gh; 1044 struct gfs2_holder q_gh;
@@ -1058,7 +1058,7 @@ int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id)
1058} 1058}
1059 1059
1060#if 0 1060#if 0
1061int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, 1061int gfs2_quota_read(struct gfs2_sbd *sdp, int user, u32 id,
1062 struct gfs2_quota *q) 1062 struct gfs2_quota *q)
1063{ 1063{
1064 struct gfs2_quota_data *qd; 1064 struct gfs2_quota_data *qd;
@@ -1100,8 +1100,8 @@ int gfs2_quota_init(struct gfs2_sbd *sdp)
1100 unsigned int blocks = ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; 1100 unsigned int blocks = ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift;
1101 unsigned int x, slot = 0; 1101 unsigned int x, slot = 0;
1102 unsigned int found = 0; 1102 unsigned int found = 0;
1103 uint64_t dblock; 1103 u64 dblock;
1104 uint32_t extlen = 0; 1104 u32 extlen = 0;
1105 int error; 1105 int error;
1106 1106
1107 if (!ip->i_di.di_size || 1107 if (!ip->i_di.di_size ||
diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h
index 6702a56d49b5..d93c61c99365 100644
--- a/fs/gfs2/quota.h
+++ b/fs/gfs2/quota.h
@@ -10,20 +10,20 @@
10#ifndef __QUOTA_DOT_H__ 10#ifndef __QUOTA_DOT_H__
11#define __QUOTA_DOT_H__ 11#define __QUOTA_DOT_H__
12 12
13#define NO_QUOTA_CHANGE ((uint32_t)-1) 13#define NO_QUOTA_CHANGE ((u32)-1)
14 14
15int gfs2_quota_hold(struct gfs2_inode *ip, uint32_t uid, uint32_t gid); 15int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid);
16void gfs2_quota_unhold(struct gfs2_inode *ip); 16void gfs2_quota_unhold(struct gfs2_inode *ip);
17 17
18int gfs2_quota_lock(struct gfs2_inode *ip, uint32_t uid, uint32_t gid); 18int gfs2_quota_lock(struct gfs2_inode *ip, u32 uid, u32 gid);
19void gfs2_quota_unlock(struct gfs2_inode *ip); 19void gfs2_quota_unlock(struct gfs2_inode *ip);
20 20
21int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid); 21int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid);
22void gfs2_quota_change(struct gfs2_inode *ip, int64_t change, 22void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
23 uint32_t uid, uint32_t gid); 23 u32 uid, u32 gid);
24 24
25int gfs2_quota_sync(struct gfs2_sbd *sdp); 25int gfs2_quota_sync(struct gfs2_sbd *sdp);
26int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id); 26int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id);
27 27
28int gfs2_quota_init(struct gfs2_sbd *sdp); 28int gfs2_quota_init(struct gfs2_sbd *sdp);
29void gfs2_quota_scan(struct gfs2_sbd *sdp); 29void gfs2_quota_scan(struct gfs2_sbd *sdp);
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index acafe4b4d6f0..ab55191926c3 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -35,8 +35,8 @@ int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk,
35 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); 35 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
36 struct gfs2_glock *gl = ip->i_gl; 36 struct gfs2_glock *gl = ip->i_gl;
37 int new = 0; 37 int new = 0;
38 uint64_t dblock; 38 u64 dblock;
39 uint32_t extlen; 39 u32 extlen;
40 int error; 40 int error;
41 41
42 error = gfs2_extent_map(&ip->i_inode, blk, &new, &dblock, &extlen); 42 error = gfs2_extent_map(&ip->i_inode, blk, &new, &dblock, &extlen);
@@ -53,7 +53,7 @@ int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk,
53 return error; 53 return error;
54} 54}
55 55
56int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) 56int gfs2_revoke_add(struct gfs2_sbd *sdp, u64 blkno, unsigned int where)
57{ 57{
58 struct list_head *head = &sdp->sd_revoke_list; 58 struct list_head *head = &sdp->sd_revoke_list;
59 struct gfs2_revoke_replay *rr; 59 struct gfs2_revoke_replay *rr;
@@ -82,7 +82,7 @@ int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where)
82 return 1; 82 return 1;
83} 83}
84 84
85int gfs2_revoke_check(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) 85int gfs2_revoke_check(struct gfs2_sbd *sdp, u64 blkno, unsigned int where)
86{ 86{
87 struct gfs2_revoke_replay *rr; 87 struct gfs2_revoke_replay *rr;
88 int wrap, a, b, revoke; 88 int wrap, a, b, revoke;
@@ -137,7 +137,7 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk,
137{ 137{
138 struct buffer_head *bh; 138 struct buffer_head *bh;
139 struct gfs2_log_header lh; 139 struct gfs2_log_header lh;
140 uint32_t hash; 140 u32 hash;
141 int error; 141 int error;
142 142
143 error = gfs2_replay_read_block(jd, blk, &bh); 143 error = gfs2_replay_read_block(jd, blk, &bh);
@@ -249,7 +249,7 @@ static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
249int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head) 249int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
250{ 250{
251 struct gfs2_log_header lh_1, lh_m; 251 struct gfs2_log_header lh_1, lh_m;
252 uint32_t blk_1, blk_2, blk_m; 252 u32 blk_1, blk_2, blk_m;
253 int error; 253 int error;
254 254
255 blk_1 = 0; 255 blk_1 = 0;
@@ -370,9 +370,9 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
370 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); 370 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
371 unsigned int lblock; 371 unsigned int lblock;
372 int new = 0; 372 int new = 0;
373 uint64_t dblock; 373 u64 dblock;
374 struct gfs2_log_header *lh; 374 struct gfs2_log_header *lh;
375 uint32_t hash; 375 u32 hash;
376 struct buffer_head *bh; 376 struct buffer_head *bh;
377 int error; 377 int error;
378 int boundary; 378 int boundary;
diff --git a/fs/gfs2/recovery.h b/fs/gfs2/recovery.h
index bed1a7857f6e..1b35516b7591 100644
--- a/fs/gfs2/recovery.h
+++ b/fs/gfs2/recovery.h
@@ -19,8 +19,8 @@ static inline void gfs2_replay_incr_blk(struct gfs2_sbd *sdp, unsigned int *blk)
19int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, 19int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk,
20 struct buffer_head **bh); 20 struct buffer_head **bh);
21 21
22int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where); 22int gfs2_revoke_add(struct gfs2_sbd *sdp, u64 blkno, unsigned int where);
23int gfs2_revoke_check(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where); 23int gfs2_revoke_check(struct gfs2_sbd *sdp, u64 blkno, unsigned int where);
24void gfs2_revoke_clean(struct gfs2_sbd *sdp); 24void gfs2_revoke_clean(struct gfs2_sbd *sdp);
25 25
26int gfs2_find_jhead(struct gfs2_jdesc *jd, 26int gfs2_find_jhead(struct gfs2_jdesc *jd,
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 62d0a84df982..af49c8b82ffb 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -60,7 +60,7 @@ static const char valid_change[16] = {
60 */ 60 */
61 61
62static void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buffer, 62static void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buffer,
63 unsigned int buflen, uint32_t block, 63 unsigned int buflen, u32 block,
64 unsigned char new_state) 64 unsigned char new_state)
65{ 65{
66 unsigned char *byte, *end, cur_state; 66 unsigned char *byte, *end, cur_state;
@@ -90,7 +90,7 @@ static void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buffer,
90 */ 90 */
91 91
92static unsigned char gfs2_testbit(struct gfs2_rgrpd *rgd, unsigned char *buffer, 92static unsigned char gfs2_testbit(struct gfs2_rgrpd *rgd, unsigned char *buffer,
93 unsigned int buflen, uint32_t block) 93 unsigned int buflen, u32 block)
94{ 94{
95 unsigned char *byte, *end, cur_state; 95 unsigned char *byte, *end, cur_state;
96 unsigned int bit; 96 unsigned int bit;
@@ -122,12 +122,12 @@ static unsigned char gfs2_testbit(struct gfs2_rgrpd *rgd, unsigned char *buffer,
122 * Return: the block number (bitmap buffer scope) that was found 122 * Return: the block number (bitmap buffer scope) that was found
123 */ 123 */
124 124
125static uint32_t gfs2_bitfit(struct gfs2_rgrpd *rgd, unsigned char *buffer, 125static u32 gfs2_bitfit(struct gfs2_rgrpd *rgd, unsigned char *buffer,
126 unsigned int buflen, uint32_t goal, 126 unsigned int buflen, u32 goal,
127 unsigned char old_state) 127 unsigned char old_state)
128{ 128{
129 unsigned char *byte, *end, alloc; 129 unsigned char *byte, *end, alloc;
130 uint32_t blk = goal; 130 u32 blk = goal;
131 unsigned int bit; 131 unsigned int bit;
132 132
133 byte = buffer + (goal / GFS2_NBBY); 133 byte = buffer + (goal / GFS2_NBBY);
@@ -169,7 +169,7 @@ static uint32_t gfs2_bitfit(struct gfs2_rgrpd *rgd, unsigned char *buffer,
169 * Returns: The number of bits 169 * Returns: The number of bits
170 */ 170 */
171 171
172static uint32_t gfs2_bitcount(struct gfs2_rgrpd *rgd, unsigned char *buffer, 172static u32 gfs2_bitcount(struct gfs2_rgrpd *rgd, unsigned char *buffer,
173 unsigned int buflen, unsigned char state) 173 unsigned int buflen, unsigned char state)
174{ 174{
175 unsigned char *byte = buffer; 175 unsigned char *byte = buffer;
@@ -177,7 +177,7 @@ static uint32_t gfs2_bitcount(struct gfs2_rgrpd *rgd, unsigned char *buffer,
177 unsigned char state1 = state << 2; 177 unsigned char state1 = state << 2;
178 unsigned char state2 = state << 4; 178 unsigned char state2 = state << 4;
179 unsigned char state3 = state << 6; 179 unsigned char state3 = state << 6;
180 uint32_t count = 0; 180 u32 count = 0;
181 181
182 for (; byte < end; byte++) { 182 for (; byte < end; byte++) {
183 if (((*byte) & 0x03) == state) 183 if (((*byte) & 0x03) == state)
@@ -204,11 +204,11 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd)
204{ 204{
205 struct gfs2_sbd *sdp = rgd->rd_sbd; 205 struct gfs2_sbd *sdp = rgd->rd_sbd;
206 struct gfs2_bitmap *bi = NULL; 206 struct gfs2_bitmap *bi = NULL;
207 uint32_t length = rgd->rd_ri.ri_length; 207 u32 length = rgd->rd_ri.ri_length;
208 uint32_t count[4], tmp; 208 u32 count[4], tmp;
209 int buf, x; 209 int buf, x;
210 210
211 memset(count, 0, 4 * sizeof(uint32_t)); 211 memset(count, 0, 4 * sizeof(u32));
212 212
213 /* Count # blocks in each of 4 possible allocation states */ 213 /* Count # blocks in each of 4 possible allocation states */
214 for (buf = 0; buf < length; buf++) { 214 for (buf = 0; buf < length; buf++) {
@@ -253,10 +253,10 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd)
253 253
254} 254}
255 255
256static inline int rgrp_contains_block(struct gfs2_rindex *ri, uint64_t block) 256static inline int rgrp_contains_block(struct gfs2_rindex *ri, u64 block)
257{ 257{
258 uint64_t first = ri->ri_data0; 258 u64 first = ri->ri_data0;
259 uint64_t last = first + ri->ri_data; 259 u64 last = first + ri->ri_data;
260 return !!(first <= block && block < last); 260 return !!(first <= block && block < last);
261} 261}
262 262
@@ -268,7 +268,7 @@ static inline int rgrp_contains_block(struct gfs2_rindex *ri, uint64_t block)
268 * Returns: The resource group, or NULL if not found 268 * Returns: The resource group, or NULL if not found
269 */ 269 */
270 270
271struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, uint64_t blk) 271struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk)
272{ 272{
273 struct gfs2_rgrpd *rgd; 273 struct gfs2_rgrpd *rgd;
274 274
@@ -367,8 +367,8 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd)
367{ 367{
368 struct gfs2_sbd *sdp = rgd->rd_sbd; 368 struct gfs2_sbd *sdp = rgd->rd_sbd;
369 struct gfs2_bitmap *bi; 369 struct gfs2_bitmap *bi;
370 uint32_t length = rgd->rd_ri.ri_length; /* # blocks in hdr & bitmap */ 370 u32 length = rgd->rd_ri.ri_length; /* # blocks in hdr & bitmap */
371 uint32_t bytes_left, bytes; 371 u32 bytes_left, bytes;
372 int x; 372 int x;
373 373
374 if (!length) 374 if (!length)
@@ -444,7 +444,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip)
444 struct gfs2_rgrpd *rgd; 444 struct gfs2_rgrpd *rgd;
445 char buf[sizeof(struct gfs2_rindex)]; 445 char buf[sizeof(struct gfs2_rindex)];
446 struct file_ra_state ra_state; 446 struct file_ra_state ra_state;
447 uint64_t junk = ip->i_di.di_size; 447 u64 junk = ip->i_di.di_size;
448 int error; 448 int error;
449 449
450 if (do_div(junk, sizeof(struct gfs2_rindex))) { 450 if (do_div(junk, sizeof(struct gfs2_rindex))) {
@@ -741,7 +741,7 @@ static int try_rgrp_fit(struct gfs2_rgrpd *rgd, struct gfs2_alloc *al)
741 */ 741 */
742 742
743static struct gfs2_rgrpd *recent_rgrp_first(struct gfs2_sbd *sdp, 743static struct gfs2_rgrpd *recent_rgrp_first(struct gfs2_sbd *sdp,
744 uint64_t rglast) 744 u64 rglast)
745{ 745{
746 struct gfs2_rgrpd *rgd = NULL; 746 struct gfs2_rgrpd *rgd = NULL;
747 747
@@ -1037,10 +1037,10 @@ void gfs2_inplace_release(struct gfs2_inode *ip)
1037 * Returns: The block type (GFS2_BLKST_*) 1037 * Returns: The block type (GFS2_BLKST_*)
1038 */ 1038 */
1039 1039
1040unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block) 1040unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block)
1041{ 1041{
1042 struct gfs2_bitmap *bi = NULL; 1042 struct gfs2_bitmap *bi = NULL;
1043 uint32_t length, rgrp_block, buf_block; 1043 u32 length, rgrp_block, buf_block;
1044 unsigned int buf; 1044 unsigned int buf;
1045 unsigned char type; 1045 unsigned char type;
1046 1046
@@ -1083,12 +1083,12 @@ unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block)
1083 * Returns: the block number allocated 1083 * Returns: the block number allocated
1084 */ 1084 */
1085 1085
1086static uint32_t rgblk_search(struct gfs2_rgrpd *rgd, uint32_t goal, 1086static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
1087 unsigned char old_state, unsigned char new_state) 1087 unsigned char old_state, unsigned char new_state)
1088{ 1088{
1089 struct gfs2_bitmap *bi = NULL; 1089 struct gfs2_bitmap *bi = NULL;
1090 uint32_t length = rgd->rd_ri.ri_length; 1090 u32 length = rgd->rd_ri.ri_length;
1091 uint32_t blk = 0; 1091 u32 blk = 0;
1092 unsigned int buf, x; 1092 unsigned int buf, x;
1093 1093
1094 /* Find bitmap block that contains bits for goal block */ 1094 /* Find bitmap block that contains bits for goal block */
@@ -1148,12 +1148,12 @@ static uint32_t rgblk_search(struct gfs2_rgrpd *rgd, uint32_t goal,
1148 * Returns: Resource group containing the block(s) 1148 * Returns: Resource group containing the block(s)
1149 */ 1149 */
1150 1150
1151static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, uint64_t bstart, 1151static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, u64 bstart,
1152 uint32_t blen, unsigned char new_state) 1152 u32 blen, unsigned char new_state)
1153{ 1153{
1154 struct gfs2_rgrpd *rgd; 1154 struct gfs2_rgrpd *rgd;
1155 struct gfs2_bitmap *bi = NULL; 1155 struct gfs2_bitmap *bi = NULL;
1156 uint32_t length, rgrp_blk, buf_blk; 1156 u32 length, rgrp_blk, buf_blk;
1157 unsigned int buf; 1157 unsigned int buf;
1158 1158
1159 rgd = gfs2_blk2rgrpd(sdp, bstart); 1159 rgd = gfs2_blk2rgrpd(sdp, bstart);
@@ -1206,8 +1206,8 @@ u64 gfs2_alloc_data(struct gfs2_inode *ip)
1206 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1206 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1207 struct gfs2_alloc *al = &ip->i_alloc; 1207 struct gfs2_alloc *al = &ip->i_alloc;
1208 struct gfs2_rgrpd *rgd = al->al_rgd; 1208 struct gfs2_rgrpd *rgd = al->al_rgd;
1209 uint32_t goal, blk; 1209 u32 goal, blk;
1210 uint64_t block; 1210 u64 block;
1211 1211
1212 if (rgrp_contains_block(&rgd->rd_ri, ip->i_di.di_goal_data)) 1212 if (rgrp_contains_block(&rgd->rd_ri, ip->i_di.di_goal_data))
1213 goal = ip->i_di.di_goal_data - rgd->rd_ri.ri_data0; 1213 goal = ip->i_di.di_goal_data - rgd->rd_ri.ri_data0;
@@ -1250,8 +1250,8 @@ u64 gfs2_alloc_meta(struct gfs2_inode *ip)
1250 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1250 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1251 struct gfs2_alloc *al = &ip->i_alloc; 1251 struct gfs2_alloc *al = &ip->i_alloc;
1252 struct gfs2_rgrpd *rgd = al->al_rgd; 1252 struct gfs2_rgrpd *rgd = al->al_rgd;
1253 uint32_t goal, blk; 1253 u32 goal, blk;
1254 uint64_t block; 1254 u64 block;
1255 1255
1256 if (rgrp_contains_block(&rgd->rd_ri, ip->i_di.di_goal_meta)) 1256 if (rgrp_contains_block(&rgd->rd_ri, ip->i_di.di_goal_meta))
1257 goal = ip->i_di.di_goal_meta - rgd->rd_ri.ri_data0; 1257 goal = ip->i_di.di_goal_meta - rgd->rd_ri.ri_data0;
@@ -1332,7 +1332,7 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)
1332 * 1332 *
1333 */ 1333 */
1334 1334
1335void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) 1335void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen)
1336{ 1336{
1337 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1337 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1338 struct gfs2_rgrpd *rgd; 1338 struct gfs2_rgrpd *rgd;
@@ -1349,7 +1349,7 @@ void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen)
1349 gfs2_trans_add_rg(rgd); 1349 gfs2_trans_add_rg(rgd);
1350 1350
1351 gfs2_statfs_change(sdp, 0, +blen, 0); 1351 gfs2_statfs_change(sdp, 0, +blen, 0);
1352 gfs2_quota_change(ip, -(int64_t)blen, 1352 gfs2_quota_change(ip, -(s64)blen,
1353 ip->i_di.di_uid, ip->i_di.di_gid); 1353 ip->i_di.di_uid, ip->i_di.di_gid);
1354} 1354}
1355 1355
@@ -1361,7 +1361,7 @@ void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen)
1361 * 1361 *
1362 */ 1362 */
1363 1363
1364void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) 1364void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen)
1365{ 1365{
1366 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 1366 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1367 struct gfs2_rgrpd *rgd; 1367 struct gfs2_rgrpd *rgd;
@@ -1378,7 +1378,7 @@ void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen)
1378 gfs2_trans_add_rg(rgd); 1378 gfs2_trans_add_rg(rgd);
1379 1379
1380 gfs2_statfs_change(sdp, 0, +blen, 0); 1380 gfs2_statfs_change(sdp, 0, +blen, 0);
1381 gfs2_quota_change(ip, -(int64_t)blen, ip->i_di.di_uid, ip->i_di.di_gid); 1381 gfs2_quota_change(ip, -(s64)blen, ip->i_di.di_uid, ip->i_di.di_gid);
1382 gfs2_meta_wipe(ip, bstart, blen); 1382 gfs2_meta_wipe(ip, bstart, blen);
1383} 1383}
1384 1384
@@ -1397,7 +1397,7 @@ void gfs2_unlink_di(struct inode *inode)
1397 gfs2_trans_add_rg(rgd); 1397 gfs2_trans_add_rg(rgd);
1398} 1398}
1399 1399
1400static void gfs2_free_uninit_di(struct gfs2_rgrpd *rgd, uint64_t blkno) 1400static void gfs2_free_uninit_di(struct gfs2_rgrpd *rgd, u64 blkno)
1401{ 1401{
1402 struct gfs2_sbd *sdp = rgd->rd_sbd; 1402 struct gfs2_sbd *sdp = rgd->rd_sbd;
1403 struct gfs2_rgrpd *tmp_rgd; 1403 struct gfs2_rgrpd *tmp_rgd;
@@ -1440,7 +1440,7 @@ void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip)
1440 */ 1440 */
1441 1441
1442void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, 1442void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
1443 uint64_t block) 1443 u64 block)
1444{ 1444{
1445 struct gfs2_rgrpd *rgd; 1445 struct gfs2_rgrpd *rgd;
1446 struct gfs2_rgrpd **tmp; 1446 struct gfs2_rgrpd **tmp;
diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h
index f94761bf3460..3d6ae37e85df 100644
--- a/fs/gfs2/rgrp.h
+++ b/fs/gfs2/rgrp.h
@@ -12,7 +12,7 @@
12 12
13void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd); 13void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd);
14 14
15struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, uint64_t blk); 15struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk);
16struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp); 16struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp);
17struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd); 17struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd);
18 18
@@ -35,14 +35,14 @@ gfs2_inplace_reserve_i((ip), __FILE__, __LINE__)
35 35
36void gfs2_inplace_release(struct gfs2_inode *ip); 36void gfs2_inplace_release(struct gfs2_inode *ip);
37 37
38unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block); 38unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block);
39 39
40u64 gfs2_alloc_data(struct gfs2_inode *ip); 40u64 gfs2_alloc_data(struct gfs2_inode *ip);
41u64 gfs2_alloc_meta(struct gfs2_inode *ip); 41u64 gfs2_alloc_meta(struct gfs2_inode *ip);
42u64 gfs2_alloc_di(struct gfs2_inode *ip, u64 *generation); 42u64 gfs2_alloc_di(struct gfs2_inode *ip, u64 *generation);
43 43
44void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen); 44void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen);
45void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen); 45void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen);
46void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip); 46void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip);
47void gfs2_unlink_di(struct inode *inode); 47void gfs2_unlink_di(struct inode *inode);
48 48
@@ -54,7 +54,7 @@ struct gfs2_rgrp_list {
54}; 54};
55 55
56void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, 56void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
57 uint64_t block); 57 u64 block);
58void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state, 58void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state,
59 int flags); 59 int flags);
60void gfs2_rlist_free(struct gfs2_rgrp_list *rlist); 60void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 520266c2044b..f1d07d987c7b 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -33,11 +33,11 @@
33#include "trans.h" 33#include "trans.h"
34#include "util.h" 34#include "util.h"
35 35
36static const uint32_t gfs2_old_fs_formats[] = { 36static const u32 gfs2_old_fs_formats[] = {
37 0 37 0
38}; 38};
39 39
40static const uint32_t gfs2_old_multihost_formats[] = { 40static const u32 gfs2_old_multihost_formats[] = {
41 0 41 0
42}; 42};
43 43
@@ -225,8 +225,8 @@ static struct page *gfs2_read_super(struct super_block *sb, sector_t sector)
225 225
226int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) 226int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent)
227{ 227{
228 uint32_t hash_blocks, ind_blocks, leaf_blocks; 228 u32 hash_blocks, ind_blocks, leaf_blocks;
229 uint32_t tmp_blocks; 229 u32 tmp_blocks;
230 unsigned int x; 230 unsigned int x;
231 int error; 231 int error;
232 struct page *page; 232 struct page *page;
@@ -251,20 +251,20 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent)
251 GFS2_BASIC_BLOCK_SHIFT; 251 GFS2_BASIC_BLOCK_SHIFT;
252 sdp->sd_fsb2bb = 1 << sdp->sd_fsb2bb_shift; 252 sdp->sd_fsb2bb = 1 << sdp->sd_fsb2bb_shift;
253 sdp->sd_diptrs = (sdp->sd_sb.sb_bsize - 253 sdp->sd_diptrs = (sdp->sd_sb.sb_bsize -
254 sizeof(struct gfs2_dinode)) / sizeof(uint64_t); 254 sizeof(struct gfs2_dinode)) / sizeof(u64);
255 sdp->sd_inptrs = (sdp->sd_sb.sb_bsize - 255 sdp->sd_inptrs = (sdp->sd_sb.sb_bsize -
256 sizeof(struct gfs2_meta_header)) / sizeof(uint64_t); 256 sizeof(struct gfs2_meta_header)) / sizeof(u64);
257 sdp->sd_jbsize = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header); 257 sdp->sd_jbsize = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header);
258 sdp->sd_hash_bsize = sdp->sd_sb.sb_bsize / 2; 258 sdp->sd_hash_bsize = sdp->sd_sb.sb_bsize / 2;
259 sdp->sd_hash_bsize_shift = sdp->sd_sb.sb_bsize_shift - 1; 259 sdp->sd_hash_bsize_shift = sdp->sd_sb.sb_bsize_shift - 1;
260 sdp->sd_hash_ptrs = sdp->sd_hash_bsize / sizeof(uint64_t); 260 sdp->sd_hash_ptrs = sdp->sd_hash_bsize / sizeof(u64);
261 sdp->sd_qc_per_block = (sdp->sd_sb.sb_bsize - 261 sdp->sd_qc_per_block = (sdp->sd_sb.sb_bsize -
262 sizeof(struct gfs2_meta_header)) / 262 sizeof(struct gfs2_meta_header)) /
263 sizeof(struct gfs2_quota_change); 263 sizeof(struct gfs2_quota_change);
264 264
265 /* Compute maximum reservation required to add a entry to a directory */ 265 /* Compute maximum reservation required to add a entry to a directory */
266 266
267 hash_blocks = DIV_ROUND_UP(sizeof(uint64_t) * (1 << GFS2_DIR_MAX_DEPTH), 267 hash_blocks = DIV_ROUND_UP(sizeof(u64) * (1 << GFS2_DIR_MAX_DEPTH),
268 sdp->sd_jbsize); 268 sdp->sd_jbsize);
269 269
270 ind_blocks = 0; 270 ind_blocks = 0;
@@ -281,8 +281,8 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent)
281 sizeof(struct gfs2_dinode); 281 sizeof(struct gfs2_dinode);
282 sdp->sd_heightsize[1] = sdp->sd_sb.sb_bsize * sdp->sd_diptrs; 282 sdp->sd_heightsize[1] = sdp->sd_sb.sb_bsize * sdp->sd_diptrs;
283 for (x = 2;; x++) { 283 for (x = 2;; x++) {
284 uint64_t space, d; 284 u64 space, d;
285 uint32_t m; 285 u32 m;
286 286
287 space = sdp->sd_heightsize[x - 1] * sdp->sd_inptrs; 287 space = sdp->sd_heightsize[x - 1] * sdp->sd_inptrs;
288 d = space; 288 d = space;
@@ -299,8 +299,8 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent)
299 sizeof(struct gfs2_dinode); 299 sizeof(struct gfs2_dinode);
300 sdp->sd_jheightsize[1] = sdp->sd_jbsize * sdp->sd_diptrs; 300 sdp->sd_jheightsize[1] = sdp->sd_jbsize * sdp->sd_diptrs;
301 for (x = 2;; x++) { 301 for (x = 2;; x++) {
302 uint64_t space, d; 302 u64 space, d;
303 uint32_t m; 303 u32 m;
304 304
305 space = sdp->sd_jheightsize[x - 1] * sdp->sd_inptrs; 305 space = sdp->sd_jheightsize[x - 1] * sdp->sd_inptrs;
306 d = space; 306 d = space;
@@ -630,8 +630,8 @@ out:
630 return 0; 630 return 0;
631} 631}
632 632
633void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, 633void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
634 int64_t dinodes) 634 s64 dinodes)
635{ 635{
636 struct gfs2_inode *l_ip = GFS2_I(sdp->sd_sc_inode); 636 struct gfs2_inode *l_ip = GFS2_I(sdp->sd_sc_inode);
637 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; 637 struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local;
diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h
index 4a6ce9582743..b073300a93e8 100644
--- a/fs/gfs2/super.h
+++ b/fs/gfs2/super.h
@@ -40,7 +40,7 @@ int gfs2_make_fs_ro(struct gfs2_sbd *sdp);
40 40
41int gfs2_statfs_init(struct gfs2_sbd *sdp); 41int gfs2_statfs_init(struct gfs2_sbd *sdp);
42void gfs2_statfs_change(struct gfs2_sbd *sdp, 42void gfs2_statfs_change(struct gfs2_sbd *sdp,
43 int64_t total, int64_t free, int64_t dinodes); 43 s64 total, s64 free, s64 dinodes);
44int gfs2_statfs_sync(struct gfs2_sbd *sdp); 44int gfs2_statfs_sync(struct gfs2_sbd *sdp);
45int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); 45int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc);
46int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); 46int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc);
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 79199738c389..8aefda22f98e 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -138,7 +138,7 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf,
138static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, 138static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf,
139 size_t len) 139 size_t len)
140{ 140{
141 uint32_t id; 141 u32 id;
142 142
143 if (!capable(CAP_SYS_ADMIN)) 143 if (!capable(CAP_SYS_ADMIN))
144 return -EACCES; 144 return -EACCES;
@@ -152,7 +152,7 @@ static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf,
152static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, 152static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf,
153 size_t len) 153 size_t len)
154{ 154{
155 uint32_t id; 155 u32 id;
156 156
157 if (!capable(CAP_SYS_ADMIN)) 157 if (!capable(CAP_SYS_ADMIN))
158 return -EACCES; 158 return -EACCES;
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 8e18e634cbed..acf840160d5f 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -46,7 +46,7 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
46 tr->tr_reserved += 6 + blocks; 46 tr->tr_reserved += 6 + blocks;
47 if (revokes) 47 if (revokes)
48 tr->tr_reserved += gfs2_struct2blk(sdp, revokes, 48 tr->tr_reserved += gfs2_struct2blk(sdp, revokes,
49 sizeof(uint64_t)); 49 sizeof(u64));
50 INIT_LIST_HEAD(&tr->tr_list_buf); 50 INIT_LIST_HEAD(&tr->tr_list_buf);
51 51
52 gfs2_holder_init(sdp->sd_trans_gl, LM_ST_SHARED, 0, &tr->tr_t_gh); 52 gfs2_holder_init(sdp->sd_trans_gl, LM_ST_SHARED, 0, &tr->tr_t_gh);
@@ -142,7 +142,7 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
142 lops_add(sdp, &bd->bd_le); 142 lops_add(sdp, &bd->bd_le);
143} 143}
144 144
145void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, uint64_t blkno) 145void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, u64 blkno)
146{ 146{
147 struct gfs2_revoke *rv = kmalloc(sizeof(struct gfs2_revoke), 147 struct gfs2_revoke *rv = kmalloc(sizeof(struct gfs2_revoke),
148 GFP_NOFS | __GFP_NOFAIL); 148 GFP_NOFS | __GFP_NOFAIL);
@@ -151,7 +151,7 @@ void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, uint64_t blkno)
151 lops_add(sdp, &rv->rv_le); 151 lops_add(sdp, &rv->rv_le);
152} 152}
153 153
154void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, uint64_t blkno) 154void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno)
155{ 155{
156 struct gfs2_revoke *rv; 156 struct gfs2_revoke *rv;
157 int found = 0; 157 int found = 0;
diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h
index 9e3ce84f6102..6550d3d18263 100644
--- a/fs/gfs2/trans.h
+++ b/fs/gfs2/trans.h
@@ -27,8 +27,8 @@ void gfs2_trans_end(struct gfs2_sbd *sdp);
27 27
28void gfs2_trans_add_gl(struct gfs2_glock *gl); 28void gfs2_trans_add_gl(struct gfs2_glock *gl);
29void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta); 29void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta);
30void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, uint64_t blkno); 30void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, u64 blkno);
31void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, uint64_t blkno); 31void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno);
32void gfs2_trans_add_rg(struct gfs2_rgrpd *rgd); 32void gfs2_trans_add_rg(struct gfs2_rgrpd *rgd);
33 33
34#endif /* __TRANS_DOT_H__ */ 34#endif /* __TRANS_DOT_H__ */
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c
index 2852431764c9..d72eb8addc7a 100644
--- a/fs/gfs2/util.c
+++ b/fs/gfs2/util.c
@@ -171,7 +171,7 @@ int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
171 */ 171 */
172 172
173int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, 173int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
174 uint16_t type, uint16_t t, const char *function, 174 u16 type, u16 t, const char *function,
175 char *file, unsigned int line) 175 char *file, unsigned int line)
176{ 176{
177 int me; 177 int me;
diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h
index 60b370365eea..204fdb81e34d 100644
--- a/fs/gfs2/util.h
+++ b/fs/gfs2/util.h
@@ -82,7 +82,7 @@ static inline int gfs2_meta_check_i(struct gfs2_sbd *sdp,
82 char *file, unsigned int line) 82 char *file, unsigned int line)
83{ 83{
84 struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; 84 struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data;
85 uint32_t magic = mh->mh_magic; 85 u32 magic = mh->mh_magic;
86 magic = be32_to_cpu(magic); 86 magic = be32_to_cpu(magic);
87 if (unlikely(magic != GFS2_MAGIC)) 87 if (unlikely(magic != GFS2_MAGIC))
88 return gfs2_meta_check_ii(sdp, bh, "magic number", function, 88 return gfs2_meta_check_ii(sdp, bh, "magic number", function,
@@ -95,19 +95,19 @@ gfs2_meta_check_i((sdp), (bh), __FUNCTION__, __FILE__, __LINE__)
95 95
96 96
97int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, 97int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh,
98 uint16_t type, uint16_t t, 98 u16 type, u16 t,
99 const char *function, 99 const char *function,
100 char *file, unsigned int line); 100 char *file, unsigned int line);
101 101
102static inline int gfs2_metatype_check_i(struct gfs2_sbd *sdp, 102static inline int gfs2_metatype_check_i(struct gfs2_sbd *sdp,
103 struct buffer_head *bh, 103 struct buffer_head *bh,
104 uint16_t type, 104 u16 type,
105 const char *function, 105 const char *function,
106 char *file, unsigned int line) 106 char *file, unsigned int line)
107{ 107{
108 struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; 108 struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data;
109 uint32_t magic = mh->mh_magic; 109 u32 magic = mh->mh_magic;
110 uint16_t t = be32_to_cpu(mh->mh_type); 110 u16 t = be32_to_cpu(mh->mh_type);
111 magic = be32_to_cpu(magic); 111 magic = be32_to_cpu(magic);
112 if (unlikely(magic != GFS2_MAGIC)) 112 if (unlikely(magic != GFS2_MAGIC))
113 return gfs2_meta_check_ii(sdp, bh, "magic number", function, 113 return gfs2_meta_check_ii(sdp, bh, "magic number", function,
@@ -121,8 +121,8 @@ static inline int gfs2_metatype_check_i(struct gfs2_sbd *sdp,
121#define gfs2_metatype_check(sdp, bh, type) \ 121#define gfs2_metatype_check(sdp, bh, type) \
122gfs2_metatype_check_i((sdp), (bh), (type), __FUNCTION__, __FILE__, __LINE__) 122gfs2_metatype_check_i((sdp), (bh), (type), __FUNCTION__, __FILE__, __LINE__)
123 123
124static inline void gfs2_metatype_set(struct buffer_head *bh, uint16_t type, 124static inline void gfs2_metatype_set(struct buffer_head *bh, u16 type,
125 uint16_t format) 125 u16 format)
126{ 126{
127 struct gfs2_meta_header *mh; 127 struct gfs2_meta_header *mh;
128 mh = (struct gfs2_meta_header *)bh->b_data; 128 mh = (struct gfs2_meta_header *)bh->b_data;