From b3b94faa5fe5968827ba0640ee9fba4b3e7f736e Mon Sep 17 00:00:00 2001 From: David Teigland Date: Mon, 16 Jan 2006 16:50:04 +0000 Subject: [GFS2] The core of GFS2 This patch contains all the core files for GFS2. Signed-off-by: David Teigland Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 fs/gfs2/bmap.h (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h new file mode 100644 index 00000000000000..de16e44f049f63 --- /dev/null +++ b/fs/gfs2/bmap.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. + * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU General Public License v.2. + */ + +#ifndef __BMAP_DOT_H__ +#define __BMAP_DOT_H__ + +typedef int (*gfs2_unstuffer_t) (struct gfs2_inode * ip, + struct buffer_head * dibh, uint64_t block, + void *private); +int gfs2_unstuffer_sync(struct gfs2_inode *ip, struct buffer_head *dibh, + uint64_t block, void *private); +int gfs2_unstuff_dinode(struct gfs2_inode *ip, gfs2_unstuffer_t unstuffer, + void *private); + +int gfs2_block_map(struct gfs2_inode *ip, + uint64_t lblock, int *new, + uint64_t *dblock, uint32_t *extlen); + +typedef int (*gfs2_truncator_t) (struct gfs2_inode * ip, uint64_t size); +int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size, + gfs2_truncator_t truncator); +int gfs2_truncatei_resume(struct gfs2_inode *ip); +int gfs2_file_dealloc(struct gfs2_inode *ip); + +void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, + unsigned int *data_blocks, + unsigned int *ind_blocks); +int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, + unsigned int len, int *alloc_required); + +int gfs2_get_file_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub); + +#endif /* __BMAP_DOT_H__ */ -- cgit 1.2.3-korg From 666a2c534cc6238932296a95c9e9c06ca3b73d97 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 18 Jan 2006 10:29:04 +0000 Subject: [GFS2] Remove unused code from various files Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 81 +-------------------------------------------------------- fs/gfs2/bmap.h | 2 -- fs/gfs2/dir.c | 51 ------------------------------------ fs/gfs2/dir.h | 2 -- fs/gfs2/eattr.c | 57 ---------------------------------------- fs/gfs2/eattr.h | 2 -- fs/gfs2/util.c | 30 --------------------- fs/gfs2/util.h | 8 ------ 8 files changed, 1 insertion(+), 232 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 4b4e295b3bf569..bece3620f1c04a 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -999,7 +999,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size, } /** - * gfs2_truncatei - make a file a give size + * gfs2_truncatei - make a file a given size * @ip: the inode * @size: the size to make the file * @truncator: function to truncate the last partial block @@ -1125,82 +1125,3 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, return 0; } -/** - * do_gfm - Copy out the dinode/indirect blocks of a file - * @ip: the file - * @dibh: the dinode buffer - * @bh: the indirect buffer we're looking at - * @top: the first pointer in the block - * @bottom: one more than the last pointer in the block - * @height: the height the block is at - * @data: a pointer to a struct gfs2_user_buffer structure - * - * If this is a journaled file, copy out the data too. - * - * Returns: errno - */ - -static int do_gfm(struct gfs2_inode *ip, struct buffer_head *dibh, - struct buffer_head *bh, uint64_t *top, uint64_t *bottom, - unsigned int height, void *data) -{ - struct gfs2_user_buffer *ub = (struct gfs2_user_buffer *)data; - int error; - - error = gfs2_add_bh_to_ub(ub, bh); - if (error) - return error; - - if (!S_ISDIR(ip->i_di.di_mode) || - height + 1 != ip->i_di.di_height) - return 0; - - for (; top < bottom; top++) - if (*top) { - struct buffer_head *data_bh; - - error = gfs2_meta_read(ip->i_gl, be64_to_cpu(*top), - DIO_START | DIO_WAIT, - &data_bh); - if (error) - return error; - - error = gfs2_add_bh_to_ub(ub, data_bh); - - brelse(data_bh); - - if (error) - return error; - } - - return 0; -} - -/** - * gfs2_get_file_meta - return all the metadata for a file - * @ip: the file - * @ub: the structure representing the meta - * - * Returns: errno - */ - -int gfs2_get_file_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub) -{ - int error; - - if (gfs2_is_stuffed(ip)) { - struct buffer_head *dibh; - error = gfs2_meta_inode_buffer(ip, &dibh); - if (!error) { - error = gfs2_add_bh_to_ub(ub, dibh); - brelse(dibh); - } - } else { - struct metapath mp; - find_metapath(ip, 0, &mp); - error = recursive_scan(ip, NULL, &mp, 0, 0, 1, do_gfm, ub); - } - - return error; -} - diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index de16e44f049f63..25ea32905c67d4 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -34,6 +34,4 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, unsigned int len, int *alloc_required); -int gfs2_get_file_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub); - #endif /* __BMAP_DOT_H__ */ diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 6b1dc3dc3a2d01..f6304e55dbc179 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -2104,54 +2104,3 @@ int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename, return error; } -/** - * do_gdm - copy out one leaf (or list of leaves) - * @dip: the directory - * @index: the hash table offset in the directory - * @len: the number of pointers to this leaf - * @leaf_no: the leaf number - * @data: a pointer to a struct gfs2_user_buffer structure - * - * Returns: errno - */ - -static int do_gdm(struct gfs2_inode *dip, uint32_t index, uint32_t len, - uint64_t leaf_no, void *data) -{ - struct gfs2_user_buffer *ub = (struct gfs2_user_buffer *)data; - struct gfs2_leaf leaf; - struct buffer_head *bh; - uint64_t blk; - int error = 0; - - for (blk = leaf_no; blk; blk = leaf.lf_next) { - error = get_leaf(dip, blk, &bh); - if (error) - break; - - gfs2_leaf_in(&leaf, bh->b_data); - - error = gfs2_add_bh_to_ub(ub, bh); - - brelse(bh); - - if (error) - break; - } - - return error; -} - -/** - * gfs2_get_dir_meta - return all the leaf blocks of a directory - * @dip: the directory - * @ub: the structure representing the meta - * - * Returns: errno - */ - -int gfs2_get_dir_meta(struct gfs2_inode *dip, struct gfs2_user_buffer *ub) -{ - return foreach_leaf(dip, do_gdm, ub); -} - diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h index 79f77aab4264e4..ff6d1c597ee94d 100644 --- a/fs/gfs2/dir.h +++ b/fs/gfs2/dir.h @@ -46,6 +46,4 @@ int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip); int gfs2_diradd_alloc_required(struct gfs2_inode *dip, struct qstr *filename, int *alloc_required); -int gfs2_get_dir_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub); - #endif /* __DIR_DOT_H__ */ diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 63a5cf1e24729c..dec55dcb9dbc9b 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -1561,60 +1561,3 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip) return error; } -/** - * gfs2_get_eattr_meta - return all the eattr blocks of a file - * @dip: the directory - * @ub: the structure representing the user buffer to copy to - * - * Returns: errno - */ - -int gfs2_get_eattr_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub) -{ - struct buffer_head *bh; - int error; - - error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, - DIO_START | DIO_WAIT, &bh); - if (error) - return error; - - gfs2_add_bh_to_ub(ub, bh); - - if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) { - struct buffer_head *eabh; - uint64_t *eablk, *end; - - if (gfs2_metatype_check(ip->i_sbd, bh, GFS2_METATYPE_IN)) { - error = -EIO; - goto out; - } - - eablk = (uint64_t *)(bh->b_data + - sizeof(struct gfs2_meta_header)); - end = eablk + ip->i_sbd->sd_inptrs; - - for (; eablk < end; eablk++) { - uint64_t bn; - - if (!*eablk) - break; - bn = be64_to_cpu(*eablk); - - error = gfs2_meta_read(ip->i_gl, bn, - DIO_START | DIO_WAIT, &eabh); - if (error) - break; - gfs2_add_bh_to_ub(ub, eabh); - brelse(eabh); - if (error) - break; - } - } - - out: - brelse(bh); - - return error; -} - diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index a6403929575959..e5a42abf68a352 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -74,8 +74,6 @@ int gfs2_ea_remove(struct gfs2_inode *ip, struct gfs2_ea_request *er); int gfs2_ea_dealloc(struct gfs2_inode *ip); -int gfs2_get_eattr_meta(struct gfs2_inode *ip, struct gfs2_user_buffer *ub); - /* Exported to acl.c */ int gfs2_ea_find(struct gfs2_inode *ip, diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 74e2c62f237022..ad49153c33d141 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -221,36 +221,6 @@ int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh, return rv; } -/** - * gfs2_add_bh_to_ub - copy a buffer up to user space - * @ub: the structure representing where to copy - * @bh: the buffer - * - * Returns: errno - */ - -int gfs2_add_bh_to_ub(struct gfs2_user_buffer *ub, struct buffer_head *bh) -{ - uint64_t blkno = bh->b_blocknr; - - if (ub->ub_count + sizeof(uint64_t) + bh->b_size > ub->ub_size) - return -ENOMEM; - - if (copy_to_user(ub->ub_data + ub->ub_count, - &blkno, - sizeof(uint64_t))) - return -EFAULT; - ub->ub_count += sizeof(uint64_t); - - if (copy_to_user(ub->ub_data + ub->ub_count, - bh->b_data, - bh->b_size)) - return -EFAULT; - ub->ub_count += bh->b_size; - - return 0; -} - void gfs2_icbit_munge(struct gfs2_sbd *sdp, unsigned char **bitmap, unsigned int bit, int new_value) { diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 21466fe9bf4300..8d6eba3bdf0a73 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h @@ -152,14 +152,6 @@ extern kmem_cache_t *gfs2_glock_cachep; extern kmem_cache_t *gfs2_inode_cachep; extern kmem_cache_t *gfs2_bufdata_cachep; -struct gfs2_user_buffer { - char __user *ub_data; - unsigned int ub_size; - unsigned int ub_count; -}; - -int gfs2_add_bh_to_ub(struct gfs2_user_buffer *ub, struct buffer_head *bh); - static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt, unsigned int *p) { -- cgit 1.2.3-korg From aa6a85a971065b013a71a399c3fc4312e2dd81eb Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 24 Jan 2006 10:37:06 +0000 Subject: [GFS2] Remove pointless argument relating to truncate For some reason a function pointer was being passed through the truncate code which only ever took one value. This removes the function pointer and replaces it with a single call to the function in question. Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 15 ++++++--------- fs/gfs2/bmap.h | 3 +-- fs/gfs2/ops_inode.c | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 967cbc68195a56..ff4a9175b4e1c1 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -841,8 +841,7 @@ static int truncator_journaled(struct gfs2_inode *ip, uint64_t size) return 0; } -static int trunc_start(struct gfs2_inode *ip, uint64_t size, - gfs2_truncator_t truncator) +static int trunc_start(struct gfs2_inode *ip, uint64_t size) { struct gfs2_sbd *sdp = ip->i_sbd; struct buffer_head *dibh; @@ -873,7 +872,7 @@ static int trunc_start(struct gfs2_inode *ip, uint64_t size, if (do_div(junk, sdp->sd_jbsize)) error = truncator_journaled(ip, size); } else if (size & (uint64_t)(sdp->sd_sb.sb_bsize - 1)) - error = truncator(ip, size); + error = gfs2_truncator_page(ip, size); if (!error) { ip->i_di.di_size = size; @@ -980,12 +979,11 @@ static int trunc_end(struct gfs2_inode *ip) * Returns: errno */ -static int do_shrink(struct gfs2_inode *ip, uint64_t size, - gfs2_truncator_t truncator) +static int do_shrink(struct gfs2_inode *ip, uint64_t size) { int error; - error = trunc_start(ip, size, truncator); + error = trunc_start(ip, size); if (error < 0) return error; if (error > 0) @@ -1009,8 +1007,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size, * Returns: errno */ -int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size, - gfs2_truncator_t truncator) +int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size) { int error; @@ -1020,7 +1017,7 @@ int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size, if (size > ip->i_di.di_size) error = do_grow(ip, size); else - error = do_shrink(ip, size, truncator); + error = do_shrink(ip, size); return error; } diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index 25ea32905c67d4..b83b5924828f7a 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -23,8 +23,7 @@ int gfs2_block_map(struct gfs2_inode *ip, uint64_t *dblock, uint32_t *extlen); typedef int (*gfs2_truncator_t) (struct gfs2_inode * ip, uint64_t size); -int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size, - gfs2_truncator_t truncator); +int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size); int gfs2_truncatei_resume(struct gfs2_inode *ip); int gfs2_file_dealloc(struct gfs2_inode *ip); diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 89417a6cb72369..6fff30ef8b7023 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -994,7 +994,7 @@ static int setattr_size(struct inode *inode, struct iattr *attr) return error; } - error = gfs2_truncatei(ip, attr->ia_size, gfs2_truncator_page); + error = gfs2_truncatei(ip, attr->ia_size); if (error) return error; -- cgit 1.2.3-korg From fd2ee6bb1ef02dfe1f1e1f5b44322e0854596e9a Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 30 Jan 2006 13:36:53 +0000 Subject: [GFS2] Remove unused prototype Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.h | 1 - 1 file changed, 1 deletion(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index b83b5924828f7a..ee9ec8d7515c44 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -22,7 +22,6 @@ int gfs2_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, uint64_t *dblock, uint32_t *extlen); -typedef int (*gfs2_truncator_t) (struct gfs2_inode * ip, uint64_t size); int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size); int gfs2_truncatei_resume(struct gfs2_inode *ip); int gfs2_file_dealloc(struct gfs2_inode *ip); -- cgit 1.2.3-korg From 08bc2dbc7327e89b9d5b9c8ef9401d1df2622fca Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Fri, 28 Apr 2006 10:59:12 -0400 Subject: [GFS2] [-mm patch] fs/gfs2/: possible cleanups This patch contains the following possible cleanups: - make needlessly global code static - #if 0 unused functions - remove the following global function that was both unused and unimplemented: - super.c: gfs2_do_upgrade() Signed-off-by: Adrian Bunk Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 3 ++- fs/gfs2/bmap.h | 2 -- fs/gfs2/dir.c | 8 ++++---- fs/gfs2/eaops.c | 2 +- fs/gfs2/eaops.h | 1 - fs/gfs2/eattr.c | 3 +++ fs/gfs2/eattr.h | 2 -- fs/gfs2/glock.c | 25 ++++++++++++++++--------- fs/gfs2/glock.h | 12 ------------ fs/gfs2/lm.c | 2 ++ fs/gfs2/lm.h | 1 - fs/gfs2/locking/dlm/lock.c | 10 +++++----- fs/gfs2/locking/dlm/lock_dlm.h | 4 ---- fs/gfs2/locking/dlm/main.c | 4 ++-- fs/gfs2/locking/nolock/main.c | 8 ++++---- fs/gfs2/lvb.c | 2 ++ fs/gfs2/lvb.h | 1 - fs/gfs2/ondisk.c | 38 ++++++++++++++++++++++++++++++++++---- fs/gfs2/quota.c | 2 ++ fs/gfs2/quota.h | 2 -- fs/gfs2/super.c | 8 ++------ fs/gfs2/super.h | 2 -- include/linux/gfs2_ondisk.h | 14 -------------- 23 files changed, 79 insertions(+), 77 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 68bc3be09c98eb..f570d8caef6893 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -59,7 +59,7 @@ struct strip_mine { * * Returns: errno */ - +#if 0 int gfs2_unstuffer_sync(struct gfs2_inode *ip, struct buffer_head *dibh, uint64_t block, void *private) { @@ -77,6 +77,7 @@ int gfs2_unstuffer_sync(struct gfs2_inode *ip, struct buffer_head *dibh, return error; } +#endif /* 0 */ /** * gfs2_unstuff_dinode - Unstuff a dinode when the data has grown too big diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index ee9ec8d7515c44..23fb6589d5e305 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -13,8 +13,6 @@ typedef int (*gfs2_unstuffer_t) (struct gfs2_inode * ip, struct buffer_head * dibh, uint64_t block, void *private); -int gfs2_unstuffer_sync(struct gfs2_inode *ip, struct buffer_head *dibh, - uint64_t block, void *private); int gfs2_unstuff_dinode(struct gfs2_inode *ip, gfs2_unstuffer_t unstuffer, void *private); diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index ffc1beff6703e6..0404783f39b385 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -669,10 +669,10 @@ static void dirent_del(struct gfs2_inode *dip, struct buffer_head *bh, * Takes a dent from which to grab space as an argument. Returns the * newly created dent. */ -struct gfs2_dirent *gfs2_init_dirent(struct inode *inode, - struct gfs2_dirent *dent, - const struct qstr *name, - struct buffer_head *bh) +static struct gfs2_dirent *gfs2_init_dirent(struct inode *inode, + struct gfs2_dirent *dent, + const struct qstr *name, + struct buffer_head *bh) { struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_dirent *ndent; diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 4b9f6cff7a3487..1b376eceb6af52 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c @@ -167,7 +167,7 @@ static int system_eo_remove(struct gfs2_inode *ip, struct gfs2_ea_request *er) return gfs2_ea_remove_i(ip, er); } -struct gfs2_eattr_operations gfs2_user_eaops = { +static struct gfs2_eattr_operations gfs2_user_eaops = { .eo_get = user_eo_get, .eo_set = user_eo_set, .eo_remove = user_eo_remove, diff --git a/fs/gfs2/eaops.h b/fs/gfs2/eaops.h index f83c497eddcad4..30ec6a09bfd0ff 100644 --- a/fs/gfs2/eaops.h +++ b/fs/gfs2/eaops.h @@ -21,7 +21,6 @@ struct gfs2_eattr_operations { unsigned int gfs2_ea_name2type(const char *name, char **truncated_name); -extern struct gfs2_eattr_operations gfs2_user_eaops; extern struct gfs2_eattr_operations gfs2_system_eaops; extern struct gfs2_eattr_operations *gfs2_ea_ops[]; diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 8219d471f06c6e..d3316cab2be46b 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -358,6 +358,7 @@ static int ea_remove_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh, return error; } +#if 0 static int gfs2_ea_repack_i(struct gfs2_inode *ip) { @@ -382,6 +383,8 @@ int gfs2_ea_repack(struct gfs2_inode *ip) return error; } +#endif /* 0 */ + struct ea_list { struct gfs2_ea_request *ei_er; unsigned int ei_size; diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index 2b4152b1fcbef9..ffd56686225ba9 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -61,8 +61,6 @@ struct gfs2_ea_location { struct gfs2_ea_header *el_prev; }; -int gfs2_ea_repack(struct gfs2_inode *ip); - int gfs2_ea_get_i(struct gfs2_inode *ip, struct gfs2_ea_request *er); int gfs2_ea_set_i(struct gfs2_inode *ip, struct gfs2_ea_request *er); int gfs2_ea_remove_i(struct gfs2_inode *ip, struct gfs2_ea_request *er); diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f82ecc0cc8fbbe..0a5a0e87b0a6ba 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -47,6 +47,8 @@ struct greedy { typedef void (*glock_examiner) (struct gfs2_glock * gl); +static int gfs2_dump_lockstate(struct gfs2_sbd *sdp); + /** * relaxed_state_ok - is a requested lock compatible with the current lock mode? * @actual: the current state of the lock @@ -228,8 +230,8 @@ static struct gfs2_glock *search_bucket(struct gfs2_gl_hash_bucket *bucket, * Returns: NULL, or the struct gfs2_glock with the requested number */ -struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp, - struct lm_lockname *name) +static struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp, + struct lm_lockname *name) { struct gfs2_gl_hash_bucket *bucket = &sdp->sd_gl_hash[gl_hash(name)]; struct gfs2_glock *gl; @@ -421,8 +423,9 @@ void gfs2_holder_uninit(struct gfs2_holder *gh) * Returns: the holder structure, NULL on ENOMEM */ -struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, unsigned int state, - int flags, gfp_t gfp_flags) +static struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, + unsigned int state, + int flags, gfp_t gfp_flags) { struct gfs2_holder *gh; @@ -442,7 +445,7 @@ struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, unsigned int state, * */ -void gfs2_holder_put(struct gfs2_holder *gh) +static void gfs2_holder_put(struct gfs2_holder *gh) { gfs2_holder_uninit(gh); kfree(gh); @@ -674,7 +677,7 @@ void gfs2_glmutex_lock(struct gfs2_glock *gl) * Returns: 1 if the glock is acquired */ -int gfs2_glmutex_trylock(struct gfs2_glock *gl) +static int gfs2_glmutex_trylock(struct gfs2_glock *gl) { int acquired = 1; @@ -1301,7 +1304,8 @@ void gfs2_glock_dq(struct gfs2_holder *gh) * */ -void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags) +static void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, + int flags) { struct gfs2_glock_operations *glops = gl->gl_ops; @@ -1329,7 +1333,7 @@ void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags) * @gl: the glock * */ - +#if 0 void gfs2_glock_force_drop(struct gfs2_glock *gl) { struct gfs2_holder gh; @@ -1345,6 +1349,7 @@ void gfs2_glock_force_drop(struct gfs2_glock *gl) wait_for_completion(&gh.gh_wait); gfs2_holder_uninit(&gh); } +#endif /* 0 */ static void greedy_work(void *data) { @@ -1697,6 +1702,7 @@ void gfs2_lvb_unhold(struct gfs2_glock *gl) gfs2_glock_put(gl); } +#if 0 void gfs2_lvb_sync(struct gfs2_glock *gl) { gfs2_glmutex_lock(gl); @@ -1707,6 +1713,7 @@ void gfs2_lvb_sync(struct gfs2_glock *gl) gfs2_glmutex_unlock(gl); } +#endif /* 0 */ static void blocking_cb(struct gfs2_sbd *sdp, struct lm_lockname *name, unsigned int state) @@ -2307,7 +2314,7 @@ static int dump_glock(struct gfs2_glock *gl) * */ -int gfs2_dump_lockstate(struct gfs2_sbd *sdp) +static int gfs2_dump_lockstate(struct gfs2_sbd *sdp) { struct gfs2_gl_hash_bucket *bucket; struct gfs2_glock *gl; diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 6f9c88ed538309..a36b26585fb83e 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -73,8 +73,6 @@ static inline int gfs2_glock_is_blocking(struct gfs2_glock *gl) return ret; } -struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp, - struct lm_lockname *name); int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number, struct gfs2_glock_operations *glops, int create, struct gfs2_glock **glp); @@ -85,15 +83,11 @@ void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags, void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder *gh); void gfs2_holder_uninit(struct gfs2_holder *gh); -struct gfs2_holder *gfs2_holder_get(struct gfs2_glock *gl, unsigned int state, - int flags, gfp_t gfp_flags); -void gfs2_holder_put(struct gfs2_holder *gh); void gfs2_glock_xmote_th(struct gfs2_glock *gl, unsigned int state, int flags); void gfs2_glock_drop_th(struct gfs2_glock *gl); void gfs2_glmutex_lock(struct gfs2_glock *gl); -int gfs2_glmutex_trylock(struct gfs2_glock *gl); void gfs2_glmutex_unlock(struct gfs2_glock *gl); int gfs2_glock_nq(struct gfs2_holder *gh); @@ -101,9 +95,6 @@ int gfs2_glock_poll(struct gfs2_holder *gh); int gfs2_glock_wait(struct gfs2_holder *gh); void gfs2_glock_dq(struct gfs2_holder *gh); -void gfs2_glock_prefetch(struct gfs2_glock *gl, unsigned int state, int flags); -void gfs2_glock_force_drop(struct gfs2_glock *gl); - int gfs2_glock_be_greedy(struct gfs2_glock *gl, unsigned int time); void gfs2_glock_dq_uninit(struct gfs2_holder *gh); @@ -148,7 +139,6 @@ static inline int gfs2_glock_nq_init(struct gfs2_glock *gl, int gfs2_lvb_hold(struct gfs2_glock *gl); void gfs2_lvb_unhold(struct gfs2_glock *gl); -void gfs2_lvb_sync(struct gfs2_glock *gl); void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data); @@ -161,6 +151,4 @@ void gfs2_reclaim_glock(struct gfs2_sbd *sdp); void gfs2_scand_internal(struct gfs2_sbd *sdp); void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait); -int gfs2_dump_lockstate(struct gfs2_sbd *sdp); - #endif /* __GLOCK_DOT_H__ */ diff --git a/fs/gfs2/lm.c b/fs/gfs2/lm.c index 5b3c56d2df2fdc..06a785e9b58229 100644 --- a/fs/gfs2/lm.c +++ b/fs/gfs2/lm.c @@ -188,11 +188,13 @@ void gfs2_lm_unhold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb) sdp->sd_lockstruct.ls_ops->lm_unhold_lvb(lock, lvb); } +#if 0 void gfs2_lm_sync_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb) { if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) sdp->sd_lockstruct.ls_ops->lm_sync_lvb(lock, lvb); } +#endif /* 0 */ int gfs2_lm_plock_get(struct gfs2_sbd *sdp, struct lm_lockname *name, struct file *file, struct file_lock *fl) diff --git a/fs/gfs2/lm.h b/fs/gfs2/lm.h index ec812424fdec8d..4ee5c34434bc6b 100644 --- a/fs/gfs2/lm.h +++ b/fs/gfs2/lm.h @@ -26,7 +26,6 @@ unsigned int gfs2_lm_unlock(struct gfs2_sbd *sdp, lm_lock_t *lock, void gfs2_lm_cancel(struct gfs2_sbd *sdp, lm_lock_t *lock); int gfs2_lm_hold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char **lvbp); void gfs2_lm_unhold_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb); -void gfs2_lm_sync_lvb(struct gfs2_sbd *sdp, lm_lock_t *lock, char *lvb); int gfs2_lm_plock_get(struct gfs2_sbd *sdp, struct lm_lockname *name, struct file *file, struct file_lock *fl); diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c index a309b799dff1f2..3b0dfd7ae26e64 100644 --- a/fs/gfs2/locking/dlm/lock.c +++ b/fs/gfs2/locking/dlm/lock.c @@ -158,8 +158,8 @@ static inline void make_strname(struct lm_lockname *lockname, str->namelen = GDLM_STRNAME_BYTES; } -int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name, - struct gdlm_lock **lpp) +static int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name, + struct gdlm_lock **lpp) { struct gdlm_lock *lp; @@ -276,7 +276,7 @@ unsigned int gdlm_do_lock(struct gdlm_lock *lp) return LM_OUT_ASYNC; } -unsigned int gdlm_do_unlock(struct gdlm_lock *lp) +static unsigned int gdlm_do_unlock(struct gdlm_lock *lp) { struct gdlm_ls *ls = lp->ls; unsigned int lkf = 0; @@ -378,7 +378,7 @@ void gdlm_cancel(lm_lock_t *lock) clear_bit(LFL_DLM_CANCEL, &lp->flags); } -int gdlm_add_lvb(struct gdlm_lock *lp) +static int gdlm_add_lvb(struct gdlm_lock *lp) { char *lvb; @@ -391,7 +391,7 @@ int gdlm_add_lvb(struct gdlm_lock *lp) return 0; } -void gdlm_del_lvb(struct gdlm_lock *lp) +static void gdlm_del_lvb(struct gdlm_lock *lp) { kfree(lp->lvb); lp->lvb = NULL; diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h index e6c1e4786fec05..530c2f542584da 100644 --- a/fs/gfs2/locking/dlm/lock_dlm.h +++ b/fs/gfs2/locking/dlm/lock_dlm.h @@ -162,12 +162,8 @@ int16_t gdlm_make_lmstate(int16_t); void gdlm_queue_delayed(struct gdlm_lock *); void gdlm_submit_delayed(struct gdlm_ls *); int gdlm_release_all_locks(struct gdlm_ls *); -int gdlm_create_lp(struct gdlm_ls *, struct lm_lockname *, struct gdlm_lock **); void gdlm_delete_lp(struct gdlm_lock *); -int gdlm_add_lvb(struct gdlm_lock *); -void gdlm_del_lvb(struct gdlm_lock *); unsigned int gdlm_do_lock(struct gdlm_lock *); -unsigned int gdlm_do_unlock(struct gdlm_lock *); int gdlm_get_lock(lm_lockspace_t *, struct lm_lockname *, lm_lock_t **); void gdlm_put_lock(lm_lock_t *); diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c index 3c9adf18fd9c31..89728c91665fe9 100644 --- a/fs/gfs2/locking/dlm/main.c +++ b/fs/gfs2/locking/dlm/main.c @@ -16,7 +16,7 @@ extern int gdlm_drop_period; extern struct lm_lockops gdlm_ops; -int __init init_lock_dlm(void) +static int __init init_lock_dlm(void) { int error; @@ -48,7 +48,7 @@ int __init init_lock_dlm(void) return 0; } -void __exit exit_lock_dlm(void) +static void __exit exit_lock_dlm(void) { gdlm_plock_exit(); gdlm_sysfs_exit(); diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c index ecd37371eba5fd..97ffac5cdefbe5 100644 --- a/fs/gfs2/locking/nolock/main.c +++ b/fs/gfs2/locking/nolock/main.c @@ -21,7 +21,7 @@ struct nolock_lockspace { unsigned int nl_lvb_size; }; -struct lm_lockops nolock_ops; +static struct lm_lockops nolock_ops; static int nolock_mount(char *table_name, char *host_data, lm_callback_t cb, lm_fsdata_t *fsdata, @@ -208,7 +208,7 @@ static void nolock_recovery_done(lm_lockspace_t *lockspace, unsigned int jid, { } -struct lm_lockops nolock_ops = { +static struct lm_lockops nolock_ops = { .lm_proto_name = "lock_nolock", .lm_mount = nolock_mount, .lm_others_may_mount = nolock_others_may_mount, @@ -229,7 +229,7 @@ struct lm_lockops nolock_ops = { .lm_owner = THIS_MODULE, }; -int __init init_nolock(void) +static int __init init_nolock(void) { int error; @@ -245,7 +245,7 @@ int __init init_nolock(void) return 0; } -void __exit exit_nolock(void) +static void __exit exit_nolock(void) { gfs_unregister_lockproto(&nolock_ops); } diff --git a/fs/gfs2/lvb.c b/fs/gfs2/lvb.c index 63b815dad8e7a6..9d72872c6f7306 100644 --- a/fs/gfs2/lvb.c +++ b/fs/gfs2/lvb.c @@ -43,6 +43,7 @@ void gfs2_quota_lvb_out(struct gfs2_quota_lvb *qb, char *lvb) str->qb_value = cpu_to_be64(qb->qb_value); } +#if 0 void gfs2_quota_lvb_print(struct gfs2_quota_lvb *qb) { pv(qb, qb_magic, "%u"); @@ -50,4 +51,5 @@ void gfs2_quota_lvb_print(struct gfs2_quota_lvb *qb) pv(qb, qb_warn, "%llu"); pv(qb, qb_value, "%lld"); } +#endif /* 0 */ diff --git a/fs/gfs2/lvb.h b/fs/gfs2/lvb.h index 1b9eb69b95345b..3c4c17405e9acd 100644 --- a/fs/gfs2/lvb.h +++ b/fs/gfs2/lvb.h @@ -14,7 +14,6 @@ void gfs2_quota_lvb_in(struct gfs2_quota_lvb *qb, char *lvb); void gfs2_quota_lvb_out(struct gfs2_quota_lvb *qb, char *lvb); -void gfs2_quota_lvb_print(struct gfs2_quota_lvb *qb); #endif /* __LVB_DOT_H__ */ diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index acfc944ce13ea2..b11e659bdd9e8e 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c @@ -28,7 +28,7 @@ * @count: the number of bytes * */ - +#if 0 static void print_array(char *title, char *buf, int count) { int x; @@ -42,6 +42,7 @@ static void print_array(char *title, char *buf, int count) if (x % 16) printk("\n"); } +#endif /* 0 */ /* * gfs2_xxx_in - read in an xxx struct @@ -72,7 +73,7 @@ void gfs2_inum_out(const struct gfs2_inum *no, char *buf) str->no_addr = cpu_to_be64(no->no_addr); } -void gfs2_inum_print(struct gfs2_inum *no) +static void gfs2_inum_print(struct gfs2_inum *no) { pv(no, no_formal_ino, "%llu"); pv(no, no_addr, "%llu"); @@ -96,7 +97,7 @@ static void gfs2_meta_header_out(struct gfs2_meta_header *mh, char *buf) str->mh_format = cpu_to_be32(mh->mh_format); } -void gfs2_meta_header_print(struct gfs2_meta_header *mh) +static void gfs2_meta_header_print(struct gfs2_meta_header *mh) { pv(mh, mh_magic, "0x%.8X"); pv(mh, mh_type, "%u"); @@ -121,6 +122,7 @@ void gfs2_sb_in(struct gfs2_sb *sb, char *buf) memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN); } +#if 0 void gfs2_sb_print(struct gfs2_sb *sb) { gfs2_meta_header_print(&sb->sb_header); @@ -136,6 +138,7 @@ void gfs2_sb_print(struct gfs2_sb *sb) pv(sb, sb_lockproto, "%s"); pv(sb, sb_locktable, "%s"); } +#endif /* 0 */ void gfs2_rindex_in(struct gfs2_rindex *ri, char *buf) { @@ -149,6 +152,7 @@ void gfs2_rindex_in(struct gfs2_rindex *ri, char *buf) } +#if 0 void gfs2_rindex_out(struct gfs2_rindex *ri, char *buf) { struct gfs2_rindex *str = (struct gfs2_rindex *)buf; @@ -163,6 +167,8 @@ void gfs2_rindex_out(struct gfs2_rindex *ri, char *buf) memset(str->ri_reserved, 0, sizeof(str->ri_reserved)); } +#endif /* 0 */ + void gfs2_rindex_print(struct gfs2_rindex *ri) { pv(ri, ri_addr, "%llu"); @@ -196,6 +202,7 @@ void gfs2_rgrp_out(struct gfs2_rgrp *rg, char *buf) memset(&str->rg_reserved, 0, sizeof(str->rg_reserved)); } +#if 0 void gfs2_rgrp_print(struct gfs2_rgrp *rg) { gfs2_meta_header_print(&rg->rg_header); @@ -205,6 +212,7 @@ void gfs2_rgrp_print(struct gfs2_rgrp *rg) pa(rg, rg_reserved, 36); } +#endif /* 0 */ void gfs2_quota_in(struct gfs2_quota *qu, char *buf) { @@ -215,6 +223,8 @@ void gfs2_quota_in(struct gfs2_quota *qu, char *buf) qu->qu_value = be64_to_cpu(str->qu_value); } +#if 0 + void gfs2_quota_out(struct gfs2_quota *qu, char *buf) { struct gfs2_quota *str = (struct gfs2_quota *)buf; @@ -231,6 +241,8 @@ void gfs2_quota_print(struct gfs2_quota *qu) pv(qu, qu_value, "%lld"); } +#endif /* 0 */ + void gfs2_dinode_in(struct gfs2_dinode *di, char *buf) { struct gfs2_dinode *str = (struct gfs2_dinode *)buf; @@ -327,6 +339,8 @@ void gfs2_dinode_print(struct gfs2_dinode *di) pv(di, di_eattr, "%llu"); } +#if 0 + void gfs2_dirent_print(struct gfs2_dirent *de, char *name) { char buf[GFS2_FNAMESIZE + 1]; @@ -394,6 +408,8 @@ void gfs2_ea_header_print(struct gfs2_ea_header *ea, char *name) printk(KERN_INFO " name = %s\n", buf); } +#endif /* 0 */ + void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf) { struct gfs2_log_header *str = (struct gfs2_log_header *)buf; @@ -406,6 +422,8 @@ void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf) lh->lh_hash = be32_to_cpu(str->lh_hash); } +#if 0 + void gfs2_log_header_print(struct gfs2_log_header *lh) { gfs2_meta_header_print(&lh->lh_header); @@ -427,6 +445,8 @@ void gfs2_log_descriptor_print(struct gfs2_log_descriptor *ld) pa(ld, ld_reserved, 32); } +#endif /* 0 */ + void gfs2_inum_range_in(struct gfs2_inum_range *ir, char *buf) { struct gfs2_inum_range *str = (struct gfs2_inum_range *)buf; @@ -443,11 +463,13 @@ void gfs2_inum_range_out(struct gfs2_inum_range *ir, char *buf) str->ir_length = cpu_to_be64(ir->ir_length); } +#if 0 void gfs2_inum_range_print(struct gfs2_inum_range *ir) { pv(ir, ir_start, "%llu"); pv(ir, ir_length, "%llu"); } +#endif /* 0 */ void gfs2_statfs_change_in(struct gfs2_statfs_change *sc, char *buf) { @@ -467,12 +489,14 @@ void gfs2_statfs_change_out(struct gfs2_statfs_change *sc, char *buf) str->sc_dinodes = cpu_to_be64(sc->sc_dinodes); } +#if 0 void gfs2_statfs_change_print(struct gfs2_statfs_change *sc) { pv(sc, sc_total, "%lld"); pv(sc, sc_free, "%lld"); pv(sc, sc_dinodes, "%lld"); } +#endif /* 0 */ void gfs2_unlinked_tag_in(struct gfs2_unlinked_tag *ut, char *buf) { @@ -491,12 +515,16 @@ void gfs2_unlinked_tag_out(struct gfs2_unlinked_tag *ut, char *buf) str->__pad = 0; } +#if 0 + void gfs2_unlinked_tag_print(struct gfs2_unlinked_tag *ut) { gfs2_inum_print(&ut->ut_inum); pv(ut, ut_flags, "%u"); } +#endif /* 0 */ + void gfs2_quota_change_in(struct gfs2_quota_change *qc, char *buf) { struct gfs2_quota_change *str = (struct gfs2_quota_change *)buf; @@ -506,6 +534,8 @@ void gfs2_quota_change_in(struct gfs2_quota_change *qc, char *buf) qc->qc_id = be32_to_cpu(str->qc_id); } +#if 0 + void gfs2_quota_change_print(struct gfs2_quota_change *qc) { pv(qc, qc_change, "%lld"); @@ -513,5 +543,5 @@ void gfs2_quota_change_print(struct gfs2_quota_change *qc) pv(qc, qc_id, "%u"); } - +#endif /* 0 */ diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 90e32a3dc50d18..942c4c8b9f568e 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1086,6 +1086,7 @@ int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id) return error; } +#if 0 int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, struct gfs2_quota *q) { @@ -1121,6 +1122,7 @@ int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, return error; } +#endif /* 0 */ int gfs2_quota_init(struct gfs2_sbd *sdp) { diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h index 005529f6895dfa..1baeeb23d23228 100644 --- a/fs/gfs2/quota.h +++ b/fs/gfs2/quota.h @@ -24,8 +24,6 @@ void gfs2_quota_change(struct gfs2_inode *ip, int64_t change, int gfs2_quota_sync(struct gfs2_sbd *sdp); int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id); -int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, - struct gfs2_quota *q); int gfs2_quota_init(struct gfs2_sbd *sdp); void gfs2_quota_scan(struct gfs2_sbd *sdp); diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index f0dbd2d7aadc03..75a8def8d0bc93 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -264,11 +264,6 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) return 0; } -int gfs2_do_upgrade(struct gfs2_sbd *sdp, struct gfs2_glock *sb_gl) -{ - return 0; -} - /** * gfs2_jindex_hold - Grab a lock on the jindex * @sdp: The GFS2 superblock @@ -837,7 +832,8 @@ struct lfcc { * Returns: errno */ -int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, struct gfs2_holder *t_gh) +static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, + struct gfs2_holder *t_gh) { struct gfs2_inode *ip; struct gfs2_holder ji_gh; diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index 6abb7b5c88284d..175afdde43bb42 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -14,7 +14,6 @@ void gfs2_tune_init(struct gfs2_tune *gt); int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent); int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent); -int gfs2_do_upgrade(struct gfs2_sbd *sdp, struct gfs2_glock *gl_sb); static inline unsigned int gfs2_jindex_size(struct gfs2_sbd *sdp) { @@ -46,7 +45,6 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp); int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); -int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, struct gfs2_holder *t_gh); int gfs2_freeze_fs(struct gfs2_sbd *sdp); void gfs2_unfreeze_fs(struct gfs2_sbd *sdp); diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 3ab40917383f2a..4356e386464399 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h @@ -450,22 +450,8 @@ extern void gfs2_quota_change_in(struct gfs2_quota_change *qc, char *buf); /* Printing functions */ -extern void gfs2_inum_print(struct gfs2_inum *no); -extern void gfs2_meta_header_print(struct gfs2_meta_header *mh); -extern void gfs2_sb_print(struct gfs2_sb *sb); extern void gfs2_rindex_print(struct gfs2_rindex *ri); -extern void gfs2_rgrp_print(struct gfs2_rgrp *rg); -extern void gfs2_quota_print(struct gfs2_quota *qu); extern void gfs2_dinode_print(struct gfs2_dinode *di); -extern void gfs2_dirent_print(struct gfs2_dirent *de, char *name); -extern void gfs2_leaf_print(struct gfs2_leaf *lf); -extern void gfs2_ea_header_print(struct gfs2_ea_header *ea, char *name); -extern void gfs2_log_header_print(struct gfs2_log_header *lh); -extern void gfs2_log_descriptor_print(struct gfs2_log_descriptor *ld); -extern void gfs2_inum_range_print(struct gfs2_inum_range *ir); -extern void gfs2_statfs_change_print(struct gfs2_statfs_change *sc); -extern void gfs2_unlinked_tag_print(struct gfs2_unlinked_tag *ut); -extern void gfs2_quota_change_print(struct gfs2_quota_change *qc); #endif /* __KERNEL__ */ -- cgit 1.2.3-korg From fd88de569b802c4a04aaa6ee74667775f4aed8c6 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Fri, 5 May 2006 16:59:11 -0400 Subject: [GFS2] Readpages support This adds readpages support (and also corrects a small bug in the readpage error path at the same time). Hopefully this will improve performance by allowing GFS to submit larger lumps of I/O at a time. In order to simplify the setting of BH_Boundary, it currently gets set when we hit the end of a indirect pointer block. There is always a boundary at this point with the current allocation code. It doesn't get all the boundaries right though, so there is still room for improvement in this. See comments in fs/gfs2/ops_address.c for further information about readpages with GFS2. Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 170 ++++++++++++++++++++++++++++++++------------------ fs/gfs2/bmap.h | 5 +- fs/gfs2/dir.c | 8 +-- fs/gfs2/glock.c | 2 +- fs/gfs2/inode.c | 5 +- fs/gfs2/log.c | 4 +- fs/gfs2/ops_address.c | 145 +++++++++++++++++++++++++++++++++--------- fs/gfs2/ops_super.c | 3 - fs/gfs2/ops_vm.c | 8 +-- fs/gfs2/quota.c | 5 +- fs/gfs2/recovery.c | 8 +-- fs/gfs2/rgrp.c | 15 ++--- fs/gfs2/unlinked.c | 5 +- 13 files changed, 254 insertions(+), 129 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index cfe1a428c6681d..474b9a16f0f547 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -314,13 +314,17 @@ static void find_metapath(struct gfs2_inode *ip, uint64_t block, * metadata tree. */ -static inline uint64_t *metapointer(struct buffer_head *bh, - unsigned int height, struct metapath *mp) +static inline u64 *metapointer(struct buffer_head *bh, int *boundary, + unsigned int height, const struct metapath *mp) { unsigned int head_size = (height > 0) ? sizeof(struct gfs2_meta_header) : sizeof(struct gfs2_dinode); - - return ((uint64_t *)(bh->b_data + head_size)) + mp->mp_list[height]; + u64 *ptr; + *boundary = 0; + ptr = ((u64 *)(bh->b_data + head_size)) + mp->mp_list[height]; + if (ptr + 1 == (u64*)(bh->b_data + bh->b_size)) + *boundary = 1; + return ptr; } /** @@ -339,24 +343,24 @@ static inline uint64_t *metapointer(struct buffer_head *bh, * */ -static void lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, - unsigned int height, struct metapath *mp, int create, - int *new, uint64_t *block) +static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, + unsigned int height, struct metapath *mp, int create, + int *new, uint64_t *block) { - uint64_t *ptr = metapointer(bh, height, mp); + int boundary; + uint64_t *ptr = metapointer(bh, &boundary, height, mp); if (*ptr) { *block = be64_to_cpu(*ptr); - return; + return boundary; } *block = 0; if (!create) - return; + return 0; - if (height == ip->i_di.di_height - 1 && - !gfs2_is_dir(ip)) + if (height == ip->i_di.di_height - 1 && !gfs2_is_dir(ip)) *block = gfs2_alloc_data(ip); else *block = gfs2_alloc_meta(ip); @@ -367,15 +371,16 @@ static void lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, ip->i_di.di_blocks++; *new = 1; + return 0; } /** - * gfs2_block_map - Map a block from an inode to a disk block - * @ip: The GFS2 inode + * gfs2_block_pointers - Map a block from an inode to a disk block + * @inode: The inode * @lblock: The logical block number * @new: Value/Result argument (1 = may create/did create new blocks) - * @dblock: the disk block number of the start of an extent - * @extlen: the size of the extent + * @boundary: gets set if we've hit a block boundary + * @mp: metapath to use * * Find the block number on the current device which corresponds to an * inode's block. If the block had to be created, "new" will be set. @@ -383,12 +388,14 @@ static void lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, * Returns: errno */ -int gfs2_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, - uint64_t *dblock, uint32_t *extlen) +static struct buffer_head *gfs2_block_pointers(struct inode *inode, u64 lblock, + int *new, u64 *dblock, + int *boundary, + struct metapath *mp) { + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; struct buffer_head *bh; - struct metapath mp; int create = *new; unsigned int bsize; unsigned int height; @@ -398,13 +405,6 @@ int gfs2_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, *new = 0; *dblock = 0; - if (extlen) - *extlen = 0; - - if (create) - down_write(&ip->i_rw_mutex); - else - down_read(&ip->i_rw_mutex); if (gfs2_assert_warn(sdp, !gfs2_is_stuffed(ip))) goto out; @@ -421,7 +421,7 @@ int gfs2_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, goto out; } - find_metapath(ip, lblock, &mp); + find_metapath(ip, lblock, mp); end_of_metadata = ip->i_di.di_height - 1; error = gfs2_meta_inode_buffer(ip, &bh); @@ -429,7 +429,7 @@ int gfs2_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, goto out; for (x = 0; x < end_of_metadata; x++) { - lookup_block(ip, bh, x, &mp, create, new, dblock); + lookup_block(ip, bh, x, mp, create, new, dblock); brelse(bh); if (!*dblock) goto out; @@ -439,49 +439,95 @@ int gfs2_block_map(struct gfs2_inode *ip, uint64_t lblock, int *new, goto out; } - lookup_block(ip, bh, end_of_metadata, &mp, create, new, dblock); - - if (extlen && *dblock) { - *extlen = 1; - - if (!*new) { - uint64_t tmp_dblock; - int tmp_new; - unsigned int nptrs; - - nptrs = (end_of_metadata) ? sdp->sd_inptrs : - sdp->sd_diptrs; - - while (++mp.mp_list[end_of_metadata] < nptrs) { - lookup_block(ip, bh, end_of_metadata, &mp, - 0, &tmp_new, &tmp_dblock); - - if (*dblock + *extlen != tmp_dblock) - break; - - (*extlen)++; - } - } - } - - brelse(bh); - + *boundary = lookup_block(ip, bh, end_of_metadata, mp, create, new, dblock); if (*new) { - error = gfs2_meta_inode_buffer(ip, &bh); + struct buffer_head *dibh; + error = gfs2_meta_inode_buffer(ip, &dibh); if (!error) { - gfs2_trans_add_bh(ip->i_gl, bh, 1); - gfs2_dinode_out(&ip->i_di, bh->b_data); - brelse(bh); + gfs2_trans_add_bh(ip->i_gl, dibh, 1); + gfs2_dinode_out(&ip->i_di, dibh->b_data); + brelse(dibh); } } + return bh; +out: + return ERR_PTR(error); +} - out: + +static inline void bmap_lock(struct inode *inode, int create) +{ + struct gfs2_inode *ip = inode->u.generic_ip; + if (create) + down_write(&ip->i_rw_mutex); + else + down_read(&ip->i_rw_mutex); +} + +static inline void bmap_unlock(struct inode *inode, int create) +{ + struct gfs2_inode *ip = inode->u.generic_ip; if (create) up_write(&ip->i_rw_mutex); else up_read(&ip->i_rw_mutex); +} - return error; +int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary) +{ + struct metapath mp; + struct buffer_head *bh; + int create = *new; + + bmap_lock(inode, create); + bh = gfs2_block_pointers(inode, lblock, new, dblock, boundary, &mp); + bmap_unlock(inode, create); + if (!bh) + return 0; + if (IS_ERR(bh)) + return PTR_ERR(bh); + brelse(bh); + return 0; +} + +int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen) +{ + struct gfs2_inode *ip = inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; + struct metapath mp; + struct buffer_head *bh; + int boundary; + int create = *new; + + BUG_ON(!extlen); + BUG_ON(!dblock); + BUG_ON(!new); + + bmap_lock(inode, create); + bh = gfs2_block_pointers(inode, lblock, new, dblock, &boundary, &mp); + *extlen = 1; + + if (bh && !IS_ERR(bh) && *dblock && !*new) { + u64 tmp_dblock; + int tmp_new; + unsigned int nptrs; + unsigned end_of_metadata = ip->i_di.di_height - 1; + + nptrs = (end_of_metadata) ? sdp->sd_inptrs : sdp->sd_diptrs; + while (++mp.mp_list[end_of_metadata] < nptrs) { + lookup_block(ip, bh, end_of_metadata, &mp, 0, &tmp_new, &tmp_dblock); + if (*dblock + *extlen != tmp_dblock) + break; + (*extlen)++; + } + } + bmap_unlock(inode, create); + if (!bh) + return 0; + if (IS_ERR(bh)) + return PTR_ERR(bh); + brelse(bh); + return 0; } /** @@ -1053,7 +1099,7 @@ int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, } for (; lblock < lblock_stop; lblock += extlen) { - error = gfs2_block_map(ip, lblock, &new, &dblock, &extlen); + error = gfs2_extent_map(ip->i_vnode, lblock, &new, &dblock, &extlen); if (error) return error; diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index 23fb6589d5e305..bc46c114912017 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -16,9 +16,8 @@ typedef int (*gfs2_unstuffer_t) (struct gfs2_inode * ip, int gfs2_unstuff_dinode(struct gfs2_inode *ip, gfs2_unstuffer_t unstuffer, void *private); -int gfs2_block_map(struct gfs2_inode *ip, - uint64_t lblock, int *new, - uint64_t *dblock, uint32_t *extlen); +int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary); +int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size); int gfs2_truncatei_resume(struct gfs2_inode *ip); diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 0404783f39b385..7f8b27e4091684 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -197,8 +197,8 @@ static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf, if (!extlen) { new = 1; - error = gfs2_block_map(ip, lblock, &new, &dblock, - &extlen); + error = gfs2_extent_map(ip->i_vnode, lblock, &new, + &dblock, &extlen); if (error) goto fail; error = -EIO; @@ -314,8 +314,8 @@ static int gfs2_dir_read_data(struct gfs2_inode *ip, char *buf, if (!extlen) { new = 0; - error = gfs2_block_map(ip, lblock, &new, &dblock, - &extlen); + error = gfs2_extent_map(ip->i_vnode, lblock, &new, + &dblock, &extlen); if (error) goto fail; } diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 4fb8066dc745cc..9d4ae094fa2d7b 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -2125,7 +2125,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait) mutex_lock(&sdp->sd_invalidate_inodes_mutex); invalidate_inodes(sdp->sd_vfs); mutex_unlock(&sdp->sd_invalidate_inodes_mutex); - yield(); + msleep(10); } } diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9084d6037a0cd2..0817f6ede18886 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1606,9 +1606,8 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) curtime = get_seconds(); if (curtime - ip->i_di.di_atime >= quantum) { gfs2_glock_dq(gh); - gfs2_holder_reinit(LM_ST_EXCLUSIVE, - gh->gh_flags & ~LM_FLAG_ANY, - gh); + gfs2_holder_reinit(LM_ST_EXCLUSIVE, gh->gh_flags & ~LM_FLAG_ANY, + gh); error = gfs2_glock_nq(gh); if (error) return error; diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 134fc57e21d329..02d31e35f0cab8 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -211,9 +211,9 @@ static uint64_t log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) int new = 0; uint64_t dbn; int error; + int bdy; - error = gfs2_block_map(sdp->sd_jdesc->jd_inode->u.generic_ip, - lbn, &new, &dbn, NULL); + error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, &new, &dbn, &bdy); gfs2_assert_withdraw(sdp, !error && dbn); return dbn; diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index afcc12a00a3c05..d89179b316fe82 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -47,12 +48,12 @@ int gfs2_get_block(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create) { - struct gfs2_inode *ip = inode->u.generic_ip; int new = create; uint64_t dblock; int error; + int boundary; - error = gfs2_block_map(ip, lblock, &new, &dblock, NULL); + error = gfs2_block_map(inode, lblock, &new, &dblock, &boundary); if (error) return error; @@ -62,6 +63,8 @@ int gfs2_get_block(struct inode *inode, sector_t lblock, map_bh(bh_result, inode->i_sb, dblock); if (new) set_buffer_new(bh_result); + if (boundary) + set_buffer_boundary(bh_result); return 0; } @@ -83,8 +86,9 @@ static int get_block_noalloc(struct inode *inode, sector_t lblock, int new = 0; uint64_t dblock; int error; + int boundary; - error = gfs2_block_map(ip, lblock, &new, &dblock, NULL); + error = gfs2_block_map(inode, lblock, &new, &dblock, &boundary); if (error) return error; @@ -92,6 +96,8 @@ static int get_block_noalloc(struct inode *inode, sector_t lblock, map_bh(bh_result, inode->i_sb, dblock); else if (gfs2_assert_withdraw(ip->i_sbd, !create)) error = -EIO; + if (boundary) + set_buffer_boundary(bh_result); return error; } @@ -151,6 +157,19 @@ out_ignore: return 0; } +static int zero_readpage(struct page *page) +{ + void *kaddr; + + kaddr = kmap_atomic(page, KM_USER0); + memset(kaddr, 0, PAGE_CACHE_SIZE); + kunmap_atomic(page, KM_USER0); + + SetPageUptodate(page); + + return 0; +} + /** * stuffed_readpage - Fill in a Linux page with stuffed file data * @ip: the inode @@ -165,17 +184,18 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) void *kaddr; int error; + /* Only the first page of a stuffed file might contain data */ + if (unlikely(page->index)) + return zero_readpage(page); + error = gfs2_meta_inode_buffer(ip, &dibh); if (error) return error; kaddr = kmap_atomic(page, KM_USER0); - memcpy((char *)kaddr, - dibh->b_data + sizeof(struct gfs2_dinode), + memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), ip->i_di.di_size); - memset((char *)kaddr + ip->i_di.di_size, - 0, - PAGE_CACHE_SIZE - ip->i_di.di_size); + memset(kaddr + ip->i_di.di_size, 0, PAGE_CACHE_SIZE - ip->i_di.di_size); kunmap_atomic(page, KM_USER0); brelse(dibh); @@ -185,19 +205,6 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page) return 0; } -static int zero_readpage(struct page *page) -{ - void *kaddr; - - kaddr = kmap_atomic(page, KM_USER0); - memset(kaddr, 0, PAGE_CACHE_SIZE); - kunmap_atomic(page, KM_USER0); - - SetPageUptodate(page); - unlock_page(page); - - return 0; -} /** * gfs2_readpage - readpage with locking @@ -215,19 +222,16 @@ static int gfs2_readpage(struct file *file, struct page *page) struct gfs2_holder gh; int error; - if (file != &gfs2_internal_file_sentinal) { + if (likely(file != &gfs2_internal_file_sentinal)) { gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME|GL_AOP, &gh); error = gfs2_glock_nq_m_atime(1, &gh); - if (error) + if (unlikely(error)) goto out_unlock; } if (gfs2_is_stuffed(ip)) { - if (!page->index) { - error = stuffed_readpage(ip, page); - unlock_page(page); - } else - error = zero_readpage(page); + error = stuffed_readpage(ip, page); + unlock_page(page); } else error = mpage_readpage(page, gfs2_get_block); @@ -242,6 +246,90 @@ out: return error; out_unlock: unlock_page(page); + if (file != &gfs2_internal_file_sentinal) + gfs2_holder_uninit(&gh); + goto out; +} + +#define list_to_page(head) (list_entry((head)->prev, struct page, lru)) + +/** + * gfs2_readpages - Read a bunch of pages at once + * + * Some notes: + * 1. This is only for readahead, so we can simply ignore any things + * which are slightly inconvenient (such as locking conflicts between + * the page lock and the glock) and return having done no I/O. Its + * obviously not something we'd want to do on too regular a basis. + * Any I/O we ignore at this time will be done via readpage later. + * 2. We have to handle stuffed files here too. + * 3. mpage_readpages() does most of the heavy lifting in the common case. + * 4. gfs2_get_block() is relied upon to set BH_Boundary in the right places. + * 5. We use LM_FLAG_TRY_1CB here, effectively we then have lock-ahead as + * well as read-ahead. + */ +static int gfs2_readpages(struct file *file, struct address_space *mapping, + struct list_head *pages, unsigned nr_pages) +{ + struct inode *inode = mapping->host; + struct gfs2_inode *ip = inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; + struct gfs2_holder gh; + unsigned page_idx; + int ret; + + if (likely(file != &gfs2_internal_file_sentinal)) { + gfs2_holder_init(ip->i_gl, LM_ST_SHARED, + LM_FLAG_TRY_1CB|GL_ATIME|GL_AOP, &gh); + ret = gfs2_glock_nq_m_atime(1, &gh); + if (ret == GLR_TRYFAILED) + goto out_noerror; + if (unlikely(ret)) + goto out_unlock; + } + + if (gfs2_is_stuffed(ip)) { + struct pagevec lru_pvec; + pagevec_init(&lru_pvec, 0); + for (page_idx = 0; page_idx < nr_pages; page_idx++) { + struct page *page = list_to_page(pages); + list_del(&page->lru); + if (!add_to_page_cache(page, mapping, + page->index, GFP_KERNEL)) { + ret = stuffed_readpage(ip, page); + unlock_page(page); + if (!pagevec_add(&lru_pvec, page)) + __pagevec_lru_add(&lru_pvec); + } + page_cache_release(page); + } + pagevec_lru_add(&lru_pvec); + ret = 0; + } else { + /* What we really want to do .... */ + ret = mpage_readpages(mapping, pages, nr_pages, gfs2_get_block); + } + + if (likely(file != &gfs2_internal_file_sentinal)) { + gfs2_glock_dq_m(1, &gh); + gfs2_holder_uninit(&gh); + } +out: + if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) + ret = -EIO; + return ret; +out_noerror: + ret = 0; +out_unlock: + /* unlock all pages, we can't do any I/O right now */ + for (page_idx = 0; page_idx < nr_pages; page_idx++) { + struct page *page = list_to_page(pages); + list_del(&page->lru); + unlock_page(page); + page_cache_release(page); + } + if (likely(file != &gfs2_internal_file_sentinal)) + gfs2_holder_uninit(&gh); goto out; } @@ -572,6 +660,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, struct address_space_operations gfs2_file_aops = { .writepage = gfs2_writepage, .readpage = gfs2_readpage, + .readpages = gfs2_readpages, .sync_page = block_sync_page, .prepare_write = gfs2_prepare_write, .commit_write = gfs2_commit_write, diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 60bf2563c7b4a4..5910c7b5c846c4 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c @@ -92,7 +92,6 @@ static void gfs2_put_super(struct super_block *sb) if (error) gfs2_io_error(sdp); } - /* At this point, we're through modifying the disk */ /* Release stuff */ @@ -125,12 +124,10 @@ static void gfs2_put_super(struct super_block *sb) gfs2_jindex_free(sdp); /* Take apart glock structures and buffer lists */ gfs2_gl_hash_clear(sdp, WAIT); - /* Unmount the locking protocol */ gfs2_lm_unmount(sdp); /* At this point, we're through participating in the lockspace */ - gfs2_sys_fs_del(sdp); vfree(sdp); sb->s_fs_info = NULL; diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index dbc57071e7bb4c..d67248cae9b9ad 100644 --- a/fs/gfs2/ops_vm.c +++ b/fs/gfs2/ops_vm.c @@ -90,8 +90,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) if (error) goto out_gunlock_q; - gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, - &data_blocks, &ind_blocks); + gfs2_write_calc_reserv(ip, PAGE_CACHE_SIZE, &data_blocks, &ind_blocks); al->al_requested = data_blocks + ind_blocks; @@ -99,8 +98,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) if (error) goto out_gunlock_q; - error = gfs2_trans_begin(sdp, - al->al_rgd->rd_ri.ri_length + + error = gfs2_trans_begin(sdp, al->al_rgd->rd_ri.ri_length + ind_blocks + RES_DINODE + RES_STATFS + RES_QUOTA, 0); if (error) @@ -117,7 +115,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) unsigned int extlen; int new = 1; - error = gfs2_block_map(ip, lblock, &new, &dblock, &extlen); + error = gfs2_extent_map(ip->i_vnode, lblock, &new, &dblock, &extlen); if (error) goto out_trans; diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 942c4c8b9f568e..d49ff43b3a862b 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -255,6 +255,7 @@ static int bh_get(struct gfs2_quota_data *qd) int new = 0; struct buffer_head *bh; int error; + int boundary; mutex_lock(&sdp->sd_quota_mutex); @@ -266,7 +267,7 @@ static int bh_get(struct gfs2_quota_data *qd) block = qd->qd_slot / sdp->sd_qc_per_block; offset = qd->qd_slot % sdp->sd_qc_per_block;; - error = gfs2_block_map(ip, block, &new, &dblock, NULL); + error = gfs2_block_map(ip->i_vnode, block, &new, &dblock, &boundary); if (error) goto fail; error = gfs2_meta_read(ip->i_gl, dblock, DIO_START | DIO_WAIT, &bh); @@ -1162,7 +1163,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) if (!extlen) { int new = 0; - error = gfs2_block_map(ip, x, &new, &dblock, &extlen); + error = gfs2_extent_map(ip->i_vnode, x, &new, &dblock, &extlen); if (error) goto fail; } diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index d916817fb6e3c2..87adebea3bc39b 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -40,8 +40,7 @@ int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, uint32_t extlen; int error; - error = gfs2_block_map(ip, blk, &new, &dblock, - &extlen); + error = gfs2_extent_map(ip->i_vnode, blk, &new, &dblock, &extlen); if (error) return error; if (!dblock) { @@ -378,10 +377,11 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) uint32_t hash; struct buffer_head *bh; int error; - + int boundary; + lblock = head->lh_blkno; gfs2_replay_incr_blk(sdp, &lblock); - error = gfs2_block_map(ip, lblock, &new, &dblock, NULL); + error = gfs2_block_map(ip->i_vnode, lblock, &new, &dblock, &boundary); if (error) return error; if (!dblock) { diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 4ae55969439693..15c326ce13d110 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -956,8 +956,7 @@ static uint32_t rgblk_search(struct gfs2_rgrpd *rgd, uint32_t goal, search in the first part of our first-searched bit block. */ for (x = 0; x <= length; x++) { if (bi->bi_clone) - blk = gfs2_bitfit(rgd, - bi->bi_clone + bi->bi_offset, + blk = gfs2_bitfit(rgd, bi->bi_clone + bi->bi_offset, bi->bi_len, goal, old_state); else blk = gfs2_bitfit(rgd, @@ -976,12 +975,10 @@ static uint32_t rgblk_search(struct gfs2_rgrpd *rgd, uint32_t goal, blk = 0; gfs2_trans_add_bh(rgd->rd_gl, bi->bi_bh, 1); - gfs2_setbit(rgd, - bi->bi_bh->b_data + bi->bi_offset, + gfs2_setbit(rgd, bi->bi_bh->b_data + bi->bi_offset, bi->bi_len, blk, new_state); if (bi->bi_clone) - gfs2_setbit(rgd, - bi->bi_clone + bi->bi_offset, + gfs2_setbit(rgd, bi->bi_clone + bi->bi_offset, bi->bi_len, blk, new_state); return bi->bi_start * GFS2_NBBY + blk; @@ -1064,8 +1061,7 @@ uint64_t gfs2_alloc_data(struct gfs2_inode *ip) else goal = rgd->rd_last_alloc_data; - blk = rgblk_search(rgd, goal, - GFS2_BLKST_FREE, GFS2_BLKST_USED); + blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED); rgd->rd_last_alloc_data = blk; block = rgd->rd_ri.ri_data0 + blk; @@ -1109,8 +1105,7 @@ uint64_t gfs2_alloc_meta(struct gfs2_inode *ip) else goal = rgd->rd_last_alloc_meta; - blk = rgblk_search(rgd, goal, - GFS2_BLKST_FREE, GFS2_BLKST_USED); + blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED); rgd->rd_last_alloc_meta = blk; block = rgd->rd_ri.ri_data0 + blk; diff --git a/fs/gfs2/unlinked.c b/fs/gfs2/unlinked.c index 24b91c23bc2dc6..0d2314a5252c51 100644 --- a/fs/gfs2/unlinked.c +++ b/fs/gfs2/unlinked.c @@ -35,11 +35,12 @@ static int munge_ondisk(struct gfs2_sbd *sdp, unsigned int slot, int new = 0; struct buffer_head *bh; int error; + int boundary; block = slot / sdp->sd_ut_per_block; offset = slot % sdp->sd_ut_per_block; - error = gfs2_block_map(ip, block, &new, &dblock, NULL); + error = gfs2_block_map(ip->i_vnode, block, &new, &dblock, &boundary); if (error) return error; error = gfs2_meta_read(ip->i_gl, dblock, DIO_START | DIO_WAIT, &bh); @@ -354,7 +355,7 @@ int gfs2_unlinked_init(struct gfs2_sbd *sdp) if (!extlen) { int new = 0; - error = gfs2_block_map(ip, x, &new, &dblock, &extlen); + error = gfs2_extent_map(ip->i_vnode, x, &new, &dblock, &extlen); if (error) goto fail; } -- cgit 1.2.3-korg From 3a8a9a1034813aa99f5ae3150f652d490c5ff10d Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Thu, 18 May 2006 15:09:15 -0400 Subject: [GFS2] Update copyright date to 2006 Signed-off-by: Steven Whitehouse --- fs/gfs2/acl.c | 2 +- fs/gfs2/acl.h | 2 +- fs/gfs2/bmap.c | 2 +- fs/gfs2/bmap.h | 2 +- fs/gfs2/daemon.c | 2 +- fs/gfs2/daemon.h | 2 +- fs/gfs2/dir.c | 2 +- fs/gfs2/dir.h | 2 +- fs/gfs2/eaops.c | 2 +- fs/gfs2/eaops.h | 2 +- fs/gfs2/eattr.c | 2 +- fs/gfs2/eattr.h | 2 +- fs/gfs2/format.h | 2 +- fs/gfs2/gfs2.h | 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/glock.h | 2 +- fs/gfs2/glops.c | 2 +- fs/gfs2/glops.h | 2 +- fs/gfs2/incore.h | 2 +- fs/gfs2/inode.c | 2 +- fs/gfs2/inode.h | 2 +- fs/gfs2/lm.c | 2 +- fs/gfs2/lm.h | 2 +- fs/gfs2/lm_interface.h | 2 +- fs/gfs2/locking.c | 2 +- fs/gfs2/log.c | 2 +- fs/gfs2/log.h | 2 +- fs/gfs2/lops.c | 2 +- fs/gfs2/lops.h | 2 +- fs/gfs2/lvb.c | 2 +- fs/gfs2/lvb.h | 2 +- fs/gfs2/main.c | 2 +- fs/gfs2/meta_io.c | 2 +- fs/gfs2/meta_io.h | 2 +- fs/gfs2/mount.c | 2 +- fs/gfs2/mount.h | 2 +- fs/gfs2/ondisk.c | 2 +- fs/gfs2/ops_address.c | 2 +- fs/gfs2/ops_address.h | 2 +- fs/gfs2/ops_dentry.c | 2 +- fs/gfs2/ops_dentry.h | 2 +- fs/gfs2/ops_export.c | 2 +- fs/gfs2/ops_export.h | 2 +- fs/gfs2/ops_file.c | 2 +- fs/gfs2/ops_file.h | 2 +- fs/gfs2/ops_fstype.c | 2 +- fs/gfs2/ops_fstype.h | 2 +- fs/gfs2/ops_inode.c | 2 +- fs/gfs2/ops_inode.h | 2 +- fs/gfs2/ops_super.c | 2 +- fs/gfs2/ops_super.h | 2 +- fs/gfs2/ops_vm.c | 2 +- fs/gfs2/ops_vm.h | 2 +- fs/gfs2/page.c | 2 +- fs/gfs2/page.h | 2 +- fs/gfs2/quota.c | 2 +- fs/gfs2/quota.h | 2 +- fs/gfs2/recovery.c | 2 +- fs/gfs2/recovery.h | 2 +- fs/gfs2/rgrp.c | 2 +- fs/gfs2/rgrp.h | 2 +- fs/gfs2/super.c | 2 +- fs/gfs2/super.h | 2 +- fs/gfs2/sys.c | 2 +- fs/gfs2/sys.h | 2 +- fs/gfs2/trans.c | 2 +- fs/gfs2/trans.h | 2 +- fs/gfs2/unlinked.c | 2 +- fs/gfs2/unlinked.h | 2 +- fs/gfs2/util.c | 2 +- fs/gfs2/util.h | 2 +- 71 files changed, 71 insertions(+), 71 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index d822256c7a53bd..343dbe3e87bbf0 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/acl.h b/fs/gfs2/acl.h index a174b4f6bcc299..067105786eaa82 100644 --- a/fs/gfs2/acl.h +++ b/fs/gfs2/acl.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 32b1d66e68e16e..41abd3f4fc737e 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index bc46c114912017..06ccb2d808ad94 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index aa4d13002bb45b..9e7b9f296786dd 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/daemon.h b/fs/gfs2/daemon.h index a27fdeda5fbb69..aa68e7a1b0b764 100644 --- a/fs/gfs2/daemon.h +++ b/fs/gfs2/daemon.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 7f8b27e4091684..6918a58261e29b 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h index d209f1fcb8ac84..173403095eb221 100644 --- a/fs/gfs2/dir.h +++ b/fs/gfs2/dir.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index e5e2565ac29230..85c1dbace88b88 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/eaops.h b/fs/gfs2/eaops.h index 30ec6a09bfd0ff..3dece17e31166d 100644 --- a/fs/gfs2/eaops.h +++ b/fs/gfs2/eaops.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 3930304bc511ea..f5169a42a91989 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index ffd56686225ba9..19fb1dc4ddc42d 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/format.h b/fs/gfs2/format.h index c7bf32ce3eca28..239f0c3553fc47 100644 --- a/fs/gfs2/format.h +++ b/fs/gfs2/format.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/gfs2.h b/fs/gfs2/gfs2.h index 57175f70e2bd5a..6edbd551a4c041 100644 --- a/fs/gfs2/gfs2.h +++ b/fs/gfs2/gfs2.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 2029df4b349f90..c041590315384d 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index a36b26585fb83e..9df09c7eeb9522 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 5e8ec6a618242b..e262f22f744e0a 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/glops.h b/fs/gfs2/glops.h index 94f2d264aa6428..5c1e9491024f89 100644 --- a/fs/gfs2/glops.h +++ b/fs/gfs2/glops.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 84dd2f579e62ea..fc4a983e3c8936 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index d218cbf98aa73e..27fbcd9b12f0b5 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 13bc4eacac6b0e..5ef21317b2f6d0 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lm.c b/fs/gfs2/lm.c index 600b2bc48ba9e8..f45c0ffd1c3564 100644 --- a/fs/gfs2/lm.c +++ b/fs/gfs2/lm.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lm.h b/fs/gfs2/lm.h index 4ee5c34434bc6b..e821101d19c0a3 100644 --- a/fs/gfs2/lm.h +++ b/fs/gfs2/lm.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lm_interface.h b/fs/gfs2/lm_interface.h index 378432f17f272e..9d34bf3df1036e 100644 --- a/fs/gfs2/lm_interface.h +++ b/fs/gfs2/lm_interface.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/locking.c b/fs/gfs2/locking.c index 6a78aacb26af90..183192836e986b 100644 --- a/fs/gfs2/locking.c +++ b/fs/gfs2/locking.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 0e5e9cf9dd466c..2a8b4b71dd1fa1 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 84a3e902e84876..8cfd0f1d29f835 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 22a4f038e3b9eb..e4c75a74df5bc5 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h index 0c78d222d6f242..8a1029d3d389a3 100644 --- a/fs/gfs2/lops.h +++ b/fs/gfs2/lops.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lvb.c b/fs/gfs2/lvb.c index a56b23e0a3f111..e88e9cce14e76d 100644 --- a/fs/gfs2/lvb.c +++ b/fs/gfs2/lvb.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/lvb.h b/fs/gfs2/lvb.h index 3c4c17405e9acd..1b1a8b75219a4c 100644 --- a/fs/gfs2/lvb.h +++ b/fs/gfs2/lvb.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index b0a4582e78db0c..9ce56b5c78039a 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 92c1a3f823d8a3..b9895bbd5feb5a 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index d72144d5d72799..23c6a596fd9e5b 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c index 7e001356824e14..0d4b230785af78 100644 --- a/fs/gfs2/mount.c +++ b/fs/gfs2/mount.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/mount.h b/fs/gfs2/mount.h index bc8331cd7b2c4b..2eb14722144f04 100644 --- a/fs/gfs2/mount.h +++ b/fs/gfs2/mount.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index 90d398d2d0478a..b3bc21a6ba07e8 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 6d2fc107bbd31c..16d3ebd320926c 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_address.h b/fs/gfs2/ops_address.h index f201a059fd91a5..b88adddaffb2e9 100644 --- a/fs/gfs2/ops_address.h +++ b/fs/gfs2/ops_address.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_dentry.c b/fs/gfs2/ops_dentry.c index 6cbff891063eff..fef415e2068ee0 100644 --- a/fs/gfs2/ops_dentry.c +++ b/fs/gfs2/ops_dentry.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_dentry.h b/fs/gfs2/ops_dentry.h index 94e3ee1701655a..1b6e75c0a4a725 100644 --- a/fs/gfs2/ops_dentry.h +++ b/fs/gfs2/ops_dentry.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c index a90397f2819697..a376ead7d0cdd1 100644 --- a/fs/gfs2/ops_export.c +++ b/fs/gfs2/ops_export.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_export.h b/fs/gfs2/ops_export.h index 2f342f3d8755b7..88d58e57f51876 100644 --- a/fs/gfs2/ops_export.h +++ b/fs/gfs2/ops_export.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 00522fc927cdd7..1e8f602c1e507e 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_file.h b/fs/gfs2/ops_file.h index 192577b411f0ad..a2edce38f5cb51 100644 --- a/fs/gfs2/ops_file.h +++ b/fs/gfs2/ops_file.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 5899ac33451c46..a459820455091b 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_fstype.h b/fs/gfs2/ops_fstype.h index c6452874483d96..622f5760d6b289 100644 --- a/fs/gfs2/ops_fstype.h +++ b/fs/gfs2/ops_fstype.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index c8aeaafec50f67..0c06f92368f2d2 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_inode.h b/fs/gfs2/ops_inode.h index 5fafd87c8d7b37..930aaae913771a 100644 --- a/fs/gfs2/ops_inode.h +++ b/fs/gfs2/ops_inode.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 3661b2f25b8fb0..6fa7b8649f140f 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_super.h b/fs/gfs2/ops_super.h index a41d208dc55805..a15ccc27611317 100644 --- a/fs/gfs2/ops_super.h +++ b/fs/gfs2/ops_super.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index 23161be5db1f94..263c1fb7bbafeb 100644 --- a/fs/gfs2/ops_vm.c +++ b/fs/gfs2/ops_vm.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/ops_vm.h b/fs/gfs2/ops_vm.h index 54e3a8769cbbc3..077cffcd4085c5 100644 --- a/fs/gfs2/ops_vm.h +++ b/fs/gfs2/ops_vm.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/page.c b/fs/gfs2/page.c index bc80247060f403..cd93644c7d7052 100644 --- a/fs/gfs2/page.c +++ b/fs/gfs2/page.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/page.h b/fs/gfs2/page.h index 346e296420c629..2c853a90ac04fe 100644 --- a/fs/gfs2/page.h +++ b/fs/gfs2/page.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index adfb8062f5de14..f752b01846905f 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h index 1baeeb23d23228..af05492f96447d 100644 --- a/fs/gfs2/quota.h +++ b/fs/gfs2/quota.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 527544b68a6f9e..c504ac1b831d05 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/recovery.h b/fs/gfs2/recovery.h index 248481189300ce..ac0f1d6ce45647 100644 --- a/fs/gfs2/recovery.h +++ b/fs/gfs2/recovery.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 1b1a2aee8f6ba5..c1c6fa9c0e4b1a 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index 4c44a191b1c110..d2db3719cc0f17 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 788dbea45c8706..a943a505bc5ab6 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index 175afdde43bb42..df2495230402e6 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index bbfa9e16abc33a..d32a2c54daee45 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/sys.h b/fs/gfs2/sys.h index 62c8ed89ab9c64..c46a700e801e7d 100644 --- a/fs/gfs2/sys.h +++ b/fs/gfs2/sys.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index a4c414c593517d..05e0b72d56ff09 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h index 6b5e9e8bf56192..60ef163dd9bb94 100644 --- a/fs/gfs2/trans.h +++ b/fs/gfs2/trans.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/unlinked.c b/fs/gfs2/unlinked.c index 9ed0a6b8fc639e..b92d730020553a 100644 --- a/fs/gfs2/unlinked.c +++ b/fs/gfs2/unlinked.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/unlinked.h b/fs/gfs2/unlinked.h index 51e77f88d74f1e..159cf5ffe47e4e 100644 --- a/fs/gfs2/unlinked.h +++ b/fs/gfs2/unlinked.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 7c3806c674064c..0b37d6bcc36e37 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 4532dbab0a2c91..8216d28bd816eb 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h @@ -1,6 +1,6 @@ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. + * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions -- cgit 1.2.3-korg From f25ef0c1b4e032b2641857ac4cff3315c6eb90e3 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 26 Jul 2006 10:51:20 -0400 Subject: [GFS2] Tidy gfs2_unstuffer_page Tidy up gfs2_unstuffer_page by: a) Moving it into bmap.c b) Making it static c) Calling it directly from gfs2_unstuff_dinode d) Updating all callers of gfs2_unstuff_dinode due to one less required argument. It doesn't change the behaviour at all. Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++---- fs/gfs2/bmap.h | 7 +----- fs/gfs2/dir.c | 2 +- fs/gfs2/ops_address.c | 3 +-- fs/gfs2/ops_vm.c | 2 +- fs/gfs2/page.c | 60 --------------------------------------------- fs/gfs2/page.h | 2 -- 7 files changed, 66 insertions(+), 77 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 98fa07c2b710ee..72b19c5d7807f6 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -47,6 +47,65 @@ struct strip_mine { unsigned int sm_height; }; +/** + * gfs2_unstuffer_page - unstuff a stuffed inode into a block cached by a page + * @ip: the inode + * @dibh: the dinode buffer + * @block: the block number that was allocated + * @private: any locked page held by the caller process + * + * Returns: errno + */ + +static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, + uint64_t block, struct page *page) +{ + struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); + struct inode *inode = &ip->i_inode; + struct buffer_head *bh; + int release = 0; + + if (!page || page->index) { + page = grab_cache_page(inode->i_mapping, 0); + if (!page) + return -ENOMEM; + release = 1; + } + + if (!PageUptodate(page)) { + void *kaddr = kmap(page); + + memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), + ip->i_di.di_size); + memset(kaddr + ip->i_di.di_size, 0, + PAGE_CACHE_SIZE - ip->i_di.di_size); + kunmap(page); + + SetPageUptodate(page); + } + + if (!page_has_buffers(page)) + create_empty_buffers(page, 1 << inode->i_blkbits, + (1 << BH_Uptodate)); + + bh = page_buffers(page); + + if (!buffer_mapped(bh)) + map_bh(bh, inode->i_sb, block); + + set_buffer_uptodate(bh); + if ((sdp->sd_args.ar_data == GFS2_DATA_ORDERED) || gfs2_is_jdata(ip)) + gfs2_trans_add_bh(ip->i_gl, bh, 0); + mark_buffer_dirty(bh); + + if (release) { + unlock_page(page); + page_cache_release(page); + } + + return 0; +} + /** * gfs2_unstuff_dinode - Unstuff a dinode when the data has grown too big * @ip: The GFS2 inode to unstuff @@ -59,8 +118,7 @@ struct strip_mine { * Returns: errno */ -int gfs2_unstuff_dinode(struct gfs2_inode *ip, gfs2_unstuffer_t unstuffer, - void *private) +int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) { struct buffer_head *bh, *dibh; uint64_t block = 0; @@ -90,7 +148,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, gfs2_unstuffer_t unstuffer, } else { block = gfs2_alloc_data(ip); - error = unstuffer(ip, dibh, block, private); + error = gfs2_unstuffer_page(ip, dibh, block, page); if (error) goto out_brelse; } @@ -786,8 +844,7 @@ static int do_grow(struct gfs2_inode *ip, uint64_t size) if (size > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode)) { if (gfs2_is_stuffed(ip)) { - error = gfs2_unstuff_dinode(ip, gfs2_unstuffer_page, - NULL); + error = gfs2_unstuff_dinode(ip, NULL); if (error) goto out_end_trans; } diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index 06ccb2d808ad94..1a265412f7eef7 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -10,12 +10,7 @@ #ifndef __BMAP_DOT_H__ #define __BMAP_DOT_H__ -typedef int (*gfs2_unstuffer_t) (struct gfs2_inode * ip, - struct buffer_head * dibh, uint64_t block, - void *private); -int gfs2_unstuff_dinode(struct gfs2_inode *ip, gfs2_unstuffer_t unstuffer, - void *private); - +int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page); int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary); int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index f62223b9e53d04..563b99e419b6bd 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -173,7 +173,7 @@ static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf, return -EINVAL; if (gfs2_is_stuffed(ip)) { - error = gfs2_unstuff_dinode(ip, NULL, NULL); + error = gfs2_unstuff_dinode(ip, NULL); if (error) return error; } diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index d33f6aa7973117..93e00a8af8cf27 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -395,8 +395,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page, if (gfs2_is_stuffed(ip)) { if (end > sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode)) { - error = gfs2_unstuff_dinode(ip, gfs2_unstuffer_page, - page); + error = gfs2_unstuff_dinode(ip, page); if (error == 0) goto prepare_write; } else if (!PageUptodate(page)) diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index 08709f19ea9804..910722d4c483e8 100644 --- a/fs/gfs2/ops_vm.c +++ b/fs/gfs2/ops_vm.c @@ -104,7 +104,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) goto out_ipres; if (gfs2_is_stuffed(ip)) { - error = gfs2_unstuff_dinode(ip, gfs2_unstuffer_page, NULL); + error = gfs2_unstuff_dinode(ip, NULL); if (error) goto out_trans; } diff --git a/fs/gfs2/page.c b/fs/gfs2/page.c index b93caf294b9f49..0d6befed1ae54c 100644 --- a/fs/gfs2/page.c +++ b/fs/gfs2/page.c @@ -113,66 +113,6 @@ void gfs2_page_sync(struct gfs2_glock *gl, int flags) } -/** - * gfs2_unstuffer_page - unstuff a stuffed inode into a block cached by a page - * @ip: the inode - * @dibh: the dinode buffer - * @block: the block number that was allocated - * @private: any locked page held by the caller process - * - * Returns: errno - */ - -int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, - uint64_t block, void *private) -{ - struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - struct inode *inode = &ip->i_inode; - struct page *page = (struct page *)private; - struct buffer_head *bh; - int release = 0; - - if (!page || page->index) { - page = grab_cache_page(inode->i_mapping, 0); - if (!page) - return -ENOMEM; - release = 1; - } - - if (!PageUptodate(page)) { - void *kaddr = kmap(page); - - memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), - ip->i_di.di_size); - memset(kaddr + ip->i_di.di_size, 0, - PAGE_CACHE_SIZE - ip->i_di.di_size); - kunmap(page); - - SetPageUptodate(page); - } - - if (!page_has_buffers(page)) - create_empty_buffers(page, 1 << inode->i_blkbits, - (1 << BH_Uptodate)); - - bh = page_buffers(page); - - if (!buffer_mapped(bh)) - map_bh(bh, inode->i_sb, block); - - set_buffer_uptodate(bh); - if ((sdp->sd_args.ar_data == GFS2_DATA_ORDERED) || gfs2_is_jdata(ip)) - gfs2_trans_add_bh(ip->i_gl, bh, 0); - mark_buffer_dirty(bh); - - if (release) { - unlock_page(page); - page_cache_release(page); - } - - return 0; -} - /** * gfs2_block_truncate_page - Deal with zeroing out data for truncate * diff --git a/fs/gfs2/page.h b/fs/gfs2/page.h index 2c853a90ac04fe..67a4f4b79aa6c5 100644 --- a/fs/gfs2/page.h +++ b/fs/gfs2/page.h @@ -14,8 +14,6 @@ void gfs2_pte_inval(struct gfs2_glock *gl); void gfs2_page_inval(struct gfs2_glock *gl); void gfs2_page_sync(struct gfs2_glock *gl, int flags); -int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, - uint64_t block, void *private); int gfs2_block_truncate_page(struct address_space *mapping); void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, unsigned int from, unsigned int to); -- cgit 1.2.3-korg From e9fc2aa091ab8fa46e60d4c9d06a89305c441652 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Fri, 1 Sep 2006 11:05:15 -0400 Subject: [GFS2] Update copyright, tidy up incore.h As per comments from Jan Engelhardt this updates the copyright message to say "version" in full rather than "v.2". Also incore.h has been updated to remove forward structure declarations which are not required. The gfs2_quota_lvb structure has now had endianess annotations added to it. Also quota.c has been updated so that we now store the lvb data locally in endian independant format to avoid needing a structure in host endianess too. As a result the endianess conversions are done as required at various points and thus the conversion routines in lvb.[ch] are no longer required. I've moved the one remaining constant in lvb.h thats used into lm.h and removed the unused lvb.[ch]. I have not changed the HIF_ constants. That is left to a later patch which I hope will unify the gh_flags and gh_iflags fields of the struct gfs2_holder. Cc: Jan Engelhardt Signed-off-by: Steven Whitehouse --- fs/gfs2/Makefile | 2 +- fs/gfs2/acl.c | 2 +- fs/gfs2/acl.h | 2 +- fs/gfs2/bmap.c | 2 +- fs/gfs2/bmap.h | 2 +- fs/gfs2/daemon.c | 2 +- fs/gfs2/daemon.h | 2 +- fs/gfs2/dir.c | 2 +- fs/gfs2/dir.h | 2 +- fs/gfs2/eaops.c | 2 +- fs/gfs2/eaops.h | 2 +- fs/gfs2/eattr.c | 2 +- fs/gfs2/eattr.h | 2 +- fs/gfs2/format.h | 2 +- fs/gfs2/gfs2.h | 2 +- fs/gfs2/glock.c | 2 +- fs/gfs2/glock.h | 2 +- fs/gfs2/glops.c | 2 +- fs/gfs2/glops.h | 2 +- fs/gfs2/incore.h | 28 +++++++--------------- fs/gfs2/inode.c | 2 +- fs/gfs2/inode.h | 2 +- fs/gfs2/lm.c | 3 +-- fs/gfs2/lm.h | 4 +++- fs/gfs2/lm_interface.h | 2 +- fs/gfs2/locking.c | 2 +- fs/gfs2/locking/dlm/lock.c | 2 +- fs/gfs2/locking/dlm/lock_dlm.h | 2 +- fs/gfs2/locking/dlm/main.c | 2 +- fs/gfs2/locking/dlm/mount.c | 2 +- fs/gfs2/locking/dlm/plock.c | 2 +- fs/gfs2/locking/dlm/sysfs.c | 2 +- fs/gfs2/locking/dlm/thread.c | 2 +- fs/gfs2/locking/nolock/main.c | 2 +- fs/gfs2/log.c | 2 +- fs/gfs2/log.h | 2 +- fs/gfs2/lops.c | 2 +- fs/gfs2/lops.h | 2 +- fs/gfs2/lvb.c | 45 ----------------------------------- fs/gfs2/lvb.h | 19 --------------- fs/gfs2/main.c | 2 +- fs/gfs2/meta_io.c | 2 +- fs/gfs2/meta_io.h | 2 +- fs/gfs2/mount.c | 2 +- fs/gfs2/mount.h | 2 +- fs/gfs2/ondisk.c | 2 +- fs/gfs2/ops_address.c | 2 +- fs/gfs2/ops_address.h | 2 +- fs/gfs2/ops_dentry.c | 2 +- fs/gfs2/ops_dentry.h | 2 +- fs/gfs2/ops_export.c | 2 +- fs/gfs2/ops_export.h | 2 +- fs/gfs2/ops_file.c | 2 +- fs/gfs2/ops_file.h | 2 +- fs/gfs2/ops_fstype.c | 2 +- fs/gfs2/ops_fstype.h | 2 +- fs/gfs2/ops_inode.c | 2 +- fs/gfs2/ops_inode.h | 2 +- fs/gfs2/ops_super.c | 2 +- fs/gfs2/ops_super.h | 2 +- fs/gfs2/ops_vm.c | 2 +- fs/gfs2/ops_vm.h | 2 +- fs/gfs2/quota.c | 54 +++++++++++++++++++++--------------------- fs/gfs2/quota.h | 2 +- fs/gfs2/recovery.c | 2 +- fs/gfs2/recovery.h | 2 +- fs/gfs2/rgrp.c | 2 +- fs/gfs2/rgrp.h | 2 +- fs/gfs2/super.c | 2 +- fs/gfs2/super.h | 2 +- fs/gfs2/sys.c | 2 +- fs/gfs2/sys.h | 2 +- fs/gfs2/trans.c | 2 +- fs/gfs2/trans.h | 2 +- fs/gfs2/util.c | 2 +- fs/gfs2/util.h | 2 +- 76 files changed, 109 insertions(+), 184 deletions(-) delete mode 100644 fs/gfs2/lvb.c delete mode 100644 fs/gfs2/lvb.h (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/Makefile b/fs/gfs2/Makefile index b92852b6662933..e3f1ada643ac11 100644 --- a/fs/gfs2/Makefile +++ b/fs/gfs2/Makefile @@ -1,6 +1,6 @@ obj-$(CONFIG_GFS2_FS) += gfs2.o gfs2-y := acl.o bmap.o daemon.o dir.o eaops.o eattr.o glock.o \ - glops.o inode.o lm.o log.o lops.o locking.o lvb.o main.o meta_io.o \ + glops.o inode.o lm.o log.o lops.o locking.o main.o meta_io.o \ mount.o ondisk.o ops_address.o ops_dentry.o ops_export.o ops_file.o \ ops_fstype.o ops_inode.o ops_super.o ops_vm.o quota.o \ recovery.o rgrp.o super.o sys.o trans.o util.o diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 399317841501eb..60c98c0314a180 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/acl.h b/fs/gfs2/acl.h index 067105786eaa82..5856ba764680db 100644 --- a/fs/gfs2/acl.h +++ b/fs/gfs2/acl.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __ACL_DOT_H__ diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index d20d41e1c0285b..913c0e5490e990 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index 1a265412f7eef7..ab0157c5ed0e5a 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __BMAP_DOT_H__ diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index 1453605c8f32d8..a2a07c41845d41 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/daemon.h b/fs/gfs2/daemon.h index aa93eb6f668e33..801007120fb266 100644 --- a/fs/gfs2/daemon.h +++ b/fs/gfs2/daemon.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __DAEMON_DOT_H__ diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 76a23c172eebd6..7b8a38eaa41a08 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ /* diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h index 173403095eb221..366a5571648f61 100644 --- a/fs/gfs2/dir.h +++ b/fs/gfs2/dir.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __DIR_DOT_H__ diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 3ace242f2b1684..3b8749c22731db 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/eaops.h b/fs/gfs2/eaops.h index 3dece17e31166d..1c27700ee8b868 100644 --- a/fs/gfs2/eaops.h +++ b/fs/gfs2/eaops.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __EAOPS_DOT_H__ diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 96736932260f2e..9081822ce80cbe 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index ae199692e51db9..7b0291f99fd9fa 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __EATTR_DOT_H__ diff --git a/fs/gfs2/format.h b/fs/gfs2/format.h index 239f0c3553fc47..9acbf457ee58f5 100644 --- a/fs/gfs2/format.h +++ b/fs/gfs2/format.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __FORMAT_DOT_H__ diff --git a/fs/gfs2/gfs2.h b/fs/gfs2/gfs2.h index 6edbd551a4c041..3bb11c0f8b56a1 100644 --- a/fs/gfs2/gfs2.h +++ b/fs/gfs2/gfs2.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __GFS2_DOT_H__ diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index b8ccb27906e81c..989f4f78f9be74 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 75fad634ced236..07a8d02a234d20 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __GLOCK_DOT_H__ diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 1a30fa9bec7abc..8e1d8ee68e2ec2 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/glops.h b/fs/gfs2/glops.h index 9409f0a7b47f55..ba943e4736658b 100644 --- a/fs/gfs2/glops.h +++ b/fs/gfs2/glops.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __GLOPS_DOT_H__ diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 362c2422d50696..06f5ec6ebf7faf 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __INCORE_DOT_H__ @@ -22,24 +22,12 @@ struct gfs2_log_operations; struct gfs2_log_element; -struct gfs2_bitmap; -struct gfs2_rgrpd; -struct gfs2_bufdata; -struct gfs2_glock_operations; struct gfs2_holder; struct gfs2_glock; -struct gfs2_alloc; -struct gfs2_inode; -struct gfs2_file; -struct gfs2_revoke; -struct gfs2_revoke_replay; struct gfs2_quota_data; -struct gfs2_log_buf; struct gfs2_trans; struct gfs2_ail; struct gfs2_jdesc; -struct gfs2_args; -struct gfs2_tune; struct gfs2_gl_hash_bucket; struct gfs2_sbd; @@ -215,8 +203,8 @@ struct gfs2_glock { struct gfs2_alloc { /* Quota stuff */ - struct gfs2_quota_data *al_qd[4]; - struct gfs2_holder al_qd_ghs[4]; + struct gfs2_quota_data *al_qd[2*MAXQUOTAS]; + struct gfs2_holder al_qd_ghs[2*MAXQUOTAS]; unsigned int al_qd_num; u32 al_requested; /* Filled in by caller of gfs2_inplace_reserve() */ @@ -305,11 +293,11 @@ enum { }; struct gfs2_quota_lvb { - uint32_t qb_magic; - uint32_t __pad; - uint64_t qb_limit; /* Hard limit of # blocks to alloc */ - uint64_t qb_warn; /* Warn user when alloc is above this # */ - int64_t qb_value; /* Current # blocks allocated */ + __be32 qb_magic; + u32 __pad; + __be64 qb_limit; /* Hard limit of # blocks to alloc */ + __be64 qb_warn; /* Warn user when alloc is above this # */ + __be64 qb_value; /* Current # blocks allocated */ }; struct gfs2_quota_data { diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9fb340984b2945..decb0cf8569122 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 8bb8b559bceab7..32015d89f24999 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __INODE_DOT_H__ diff --git a/fs/gfs2/lm.c b/fs/gfs2/lm.c index f45c0ffd1c3564..1a9e75da19d1ce 100644 --- a/fs/gfs2/lm.c +++ b/fs/gfs2/lm.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include @@ -22,7 +22,6 @@ #include "lm.h" #include "super.h" #include "util.h" -#include "lvb.h" /** * gfs2_lm_mount - mount a locking protocol diff --git a/fs/gfs2/lm.h b/fs/gfs2/lm.h index e821101d19c0a3..15839aaa4ca6f3 100644 --- a/fs/gfs2/lm.h +++ b/fs/gfs2/lm.h @@ -4,12 +4,14 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __LM_DOT_H__ #define __LM_DOT_H__ +#define GFS2_MIN_LVB_SIZE 32 + int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent); void gfs2_lm_others_may_mount(struct gfs2_sbd *sdp); void gfs2_lm_unmount(struct gfs2_sbd *sdp); diff --git a/fs/gfs2/lm_interface.h b/fs/gfs2/lm_interface.h index 1da95a55f768f3..e1e89d92a8dbb5 100644 --- a/fs/gfs2/lm_interface.h +++ b/fs/gfs2/lm_interface.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __LM_INTERFACE_DOT_H__ diff --git a/fs/gfs2/locking.c b/fs/gfs2/locking.c index ded1ef6c81e7c6..11c4068105ccb7 100644 --- a/fs/gfs2/locking.c +++ b/fs/gfs2/locking.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c index f769eac1a34ac7..2d81d90db0970d 100644 --- a/fs/gfs2/locking/dlm/lock.c +++ b/fs/gfs2/locking/dlm/lock.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include "lock_dlm.h" diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h index 530c2f542584da..941063498532ba 100644 --- a/fs/gfs2/locking/dlm/lock_dlm.h +++ b/fs/gfs2/locking/dlm/lock_dlm.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef LOCK_DLM_DOT_H diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c index 870a1cd99f5781..2194b1d5b5ec71 100644 --- a/fs/gfs2/locking/dlm/main.c +++ b/fs/gfs2/locking/dlm/main.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/locking/dlm/mount.c b/fs/gfs2/locking/dlm/mount.c index 3caeafc02a1b6d..f279385774b7ee 100644 --- a/fs/gfs2/locking/dlm/mount.c +++ b/fs/gfs2/locking/dlm/mount.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include "lock_dlm.h" diff --git a/fs/gfs2/locking/dlm/plock.c b/fs/gfs2/locking/dlm/plock.c index 1acb2519f4391d..263636b390febf 100644 --- a/fs/gfs2/locking/dlm/plock.c +++ b/fs/gfs2/locking/dlm/plock.c @@ -3,7 +3,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/locking/dlm/sysfs.c b/fs/gfs2/locking/dlm/sysfs.c index 0d8bd0806dba9e..82bef017f944c6 100644 --- a/fs/gfs2/locking/dlm/sysfs.c +++ b/fs/gfs2/locking/dlm/sysfs.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c index 489235b2edba17..0b4be102e1705d 100644 --- a/fs/gfs2/locking/dlm/thread.c +++ b/fs/gfs2/locking/dlm/thread.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include "lock_dlm.h" diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c index 748aa5d3364151..95a29914730aec 100644 --- a/fs/gfs2/locking/nolock/main.c +++ b/fs/gfs2/locking/nolock/main.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index af728cb3b3278e..45ea3ec6f776e3 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 8cfd0f1d29f835..80764e388bb2cb 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __LOG_DOT_H__ diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 0ec38b3990977b..e2c2582c8f6e04 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h index 8a1029d3d389a3..2e3365c2b1019f 100644 --- a/fs/gfs2/lops.h +++ b/fs/gfs2/lops.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __LOPS_DOT_H__ diff --git a/fs/gfs2/lvb.c b/fs/gfs2/lvb.c deleted file mode 100644 index e88e9cce14e76d..00000000000000 --- a/fs/gfs2/lvb.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. - */ - -#include -#include -#include -#include -#include -#include - -#include "gfs2.h" -#include "lm_interface.h" -#include "incore.h" -#include "lvb.h" - -#define pv(struct, member, fmt) printk(KERN_INFO " "#member" = "fmt"\n", \ - struct->member); - -void gfs2_quota_lvb_in(struct gfs2_quota_lvb *qb, char *lvb) -{ - struct gfs2_quota_lvb *str = (struct gfs2_quota_lvb *)lvb; - - qb->qb_magic = be32_to_cpu(str->qb_magic); - qb->qb_limit = be64_to_cpu(str->qb_limit); - qb->qb_warn = be64_to_cpu(str->qb_warn); - qb->qb_value = be64_to_cpu(str->qb_value); -} - -void gfs2_quota_lvb_out(struct gfs2_quota_lvb *qb, char *lvb) -{ - struct gfs2_quota_lvb *str = (struct gfs2_quota_lvb *)lvb; - - str->qb_magic = cpu_to_be32(qb->qb_magic); - str->qb_limit = cpu_to_be64(qb->qb_limit); - str->qb_warn = cpu_to_be64(qb->qb_warn); - str->qb_value = cpu_to_be64(qb->qb_value); -} - - diff --git a/fs/gfs2/lvb.h b/fs/gfs2/lvb.h deleted file mode 100644 index 1b1a8b75219a4c..00000000000000 --- a/fs/gfs2/lvb.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. - * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. - * - * This copyrighted material is made available to anyone wishing to use, - * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. - */ - -#ifndef __LVB_DOT_H__ -#define __LVB_DOT_H__ - -#define GFS2_MIN_LVB_SIZE 32 - -void gfs2_quota_lvb_in(struct gfs2_quota_lvb *qb, char *lvb); -void gfs2_quota_lvb_out(struct gfs2_quota_lvb *qb, char *lvb); - -#endif /* __LVB_DOT_H__ */ - diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index dccc4f6f503ff8..b46f400705a2be 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 502864b241963e..03850b64c072cf 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index 951814e8627255..4ddc936aae16d1 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __DIO_DOT_H__ diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c index 0d4b230785af78..b66027827aaa26 100644 --- a/fs/gfs2/mount.c +++ b/fs/gfs2/mount.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/mount.h b/fs/gfs2/mount.h index 2eb14722144f04..8a21897b63e58c 100644 --- a/fs/gfs2/mount.h +++ b/fs/gfs2/mount.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __MOUNT_DOT_H__ diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index 39c7f0345fc6cd..03881f9870f733 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 0de7a952363385..21ae9e4f0f6c00 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_address.h b/fs/gfs2/ops_address.h index dfc3dda6de1111..6c07aa2bd98a72 100644 --- a/fs/gfs2/ops_address.h +++ b/fs/gfs2/ops_address.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_ADDRESS_DOT_H__ diff --git a/fs/gfs2/ops_dentry.c b/fs/gfs2/ops_dentry.c index fd55979ec42810..a1ba1ec8eef45d 100644 --- a/fs/gfs2/ops_dentry.c +++ b/fs/gfs2/ops_dentry.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_dentry.h b/fs/gfs2/ops_dentry.h index 1b6e75c0a4a725..e7b05e5c62ec51 100644 --- a/fs/gfs2/ops_dentry.h +++ b/fs/gfs2/ops_dentry.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_DENTRY_DOT_H__ diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c index 6354f4799e680a..c94cbc8b6ef60a 100644 --- a/fs/gfs2/ops_export.c +++ b/fs/gfs2/ops_export.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_export.h b/fs/gfs2/ops_export.h index 09fc077657d170..d52c2d93010c6f 100644 --- a/fs/gfs2/ops_export.h +++ b/fs/gfs2/ops_export.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_EXPORT_DOT_H__ diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 145a29fa4ea48a..07a0c861ac4127 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_file.h b/fs/gfs2/ops_file.h index 46302b51393773..064e52c306654b 100644 --- a/fs/gfs2/ops_file.h +++ b/fs/gfs2/ops_file.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_FILE_DOT_H__ diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index e5a91ead250cac..46f910e29bf082 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_fstype.h b/fs/gfs2/ops_fstype.h index 622f5760d6b289..b85ecce3ca6bea 100644 --- a/fs/gfs2/ops_fstype.h +++ b/fs/gfs2/ops_fstype.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_FSTYPE_DOT_H__ diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 8fb7c5c9a7c3ee..1786a485acc54c 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_inode.h b/fs/gfs2/ops_inode.h index 930aaae913771a..6f4b54783d29bd 100644 --- a/fs/gfs2/ops_inode.h +++ b/fs/gfs2/ops_inode.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_INODE_DOT_H__ diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 18ed18c729e81e..6ced71240379d2 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_super.h b/fs/gfs2/ops_super.h index a15ccc27611317..cbc4f73e9a926b 100644 --- a/fs/gfs2/ops_super.h +++ b/fs/gfs2/ops_super.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_SUPER_DOT_H__ diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index 875a769444a1b6..451f48d62e588b 100644 --- a/fs/gfs2/ops_vm.c +++ b/fs/gfs2/ops_vm.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/ops_vm.h b/fs/gfs2/ops_vm.h index 077cffcd4085c5..d5ba4b9c50fdf4 100644 --- a/fs/gfs2/ops_vm.h +++ b/fs/gfs2/ops_vm.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __OPS_VM_DOT_H__ diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 3ca65c37c3547a..be87983a20a9f3 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ /* @@ -52,7 +52,6 @@ #include "glock.h" #include "glops.h" #include "log.h" -#include "lvb.h" #include "meta_io.h" #include "quota.h" #include "rgrp.h" @@ -586,7 +585,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc, struct page *page; void *kaddr; __be64 *ptr; - u64 value; + s64 value; int err = -EIO; page = grab_cache_page(mapping, index); @@ -627,7 +626,8 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc, kaddr = kmap_atomic(page, KM_USER0); ptr = (__be64 *)(kaddr + offset); - value = *ptr = cpu_to_be64(be64_to_cpu(*ptr) + change); + value = (s64)be64_to_cpu(*ptr) + change; + *ptr = cpu_to_be64(value); flush_dcache_page(page); kunmap_atomic(kaddr, KM_USER0); err = 0; @@ -761,6 +761,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, char buf[sizeof(struct gfs2_quota)]; struct file_ra_state ra_state; int error; + struct gfs2_quota_lvb *qlvb; file_ra_state_init(&ra_state, sdp->sd_quota_inode->i_mapping); restart: @@ -768,9 +769,9 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, if (error) return error; - gfs2_quota_lvb_in(&qd->qd_qb, qd->qd_gl->gl_lvb); + qd->qd_qb = *(struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb; - if (force_refresh || qd->qd_qb.qb_magic != GFS2_MAGIC) { + if (force_refresh || qd->qd_qb.qb_magic != cpu_to_be32(GFS2_MAGIC)) { loff_t pos; gfs2_glock_dq_uninit(q_gh); error = gfs2_glock_nq_init(qd->qd_gl, @@ -779,9 +780,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, if (error) return error; - error = gfs2_glock_nq_init(ip->i_gl, - LM_ST_SHARED, 0, - &i_gh); + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh); if (error) goto fail; @@ -794,15 +793,15 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, gfs2_glock_dq_uninit(&i_gh); + gfs2_quota_in(&q, buf); - - memset(&qd->qd_qb, 0, sizeof(struct gfs2_quota_lvb)); - qd->qd_qb.qb_magic = GFS2_MAGIC; - qd->qd_qb.qb_limit = q.qu_limit; - qd->qd_qb.qb_warn = q.qu_warn; - qd->qd_qb.qb_value = q.qu_value; - - gfs2_quota_lvb_out(&qd->qd_qb, qd->qd_gl->gl_lvb); + qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb; + qlvb->qb_magic = cpu_to_be32(GFS2_MAGIC); + qlvb->__pad = 0; + qlvb->qb_limit = cpu_to_be64(q.qu_limit); + qlvb->qb_warn = cpu_to_be64(q.qu_warn); + qlvb->qb_value = cpu_to_be64(q.qu_value); + qd->qd_qb = *qlvb; if (gfs2_glock_is_blocking(qd->qd_gl)) { gfs2_glock_dq_uninit(q_gh); @@ -877,13 +876,14 @@ static int need_sync(struct gfs2_quota_data *qd) if (value < 0) do_sync = 0; - else if (qd->qd_qb.qb_value >= (int64_t)qd->qd_qb.qb_limit) + else if ((s64)be64_to_cpu(qd->qd_qb.qb_value) >= + (s64)be64_to_cpu(qd->qd_qb.qb_limit)) do_sync = 0; else { value *= gfs2_jindex_size(sdp) * num; do_div(value, den); - value += qd->qd_qb.qb_value; - if (value < (int64_t)qd->qd_qb.qb_limit) + value += (s64)be64_to_cpu(qd->qd_qb.qb_value); + if (value < (int64_t)be64_to_cpu(qd->qd_qb.qb_limit)) do_sync = 0; } @@ -959,17 +959,17 @@ int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) (qd->qd_id == gid && !test_bit(QDF_USER, &qd->qd_flags)))) continue; - value = qd->qd_qb.qb_value; + value = (s64)be64_to_cpu(qd->qd_qb.qb_value); spin_lock(&sdp->sd_quota_spin); value += qd->qd_change; spin_unlock(&sdp->sd_quota_spin); - if (qd->qd_qb.qb_limit && (int64_t)qd->qd_qb.qb_limit < value) { + if (be64_to_cpu(qd->qd_qb.qb_limit) && (int64_t)be64_to_cpu(qd->qd_qb.qb_limit) < value) { print_message(qd, "exceeded"); error = -EDQUOT; break; - } else if (qd->qd_qb.qb_warn && - (int64_t)qd->qd_qb.qb_warn < value && + } else if (be64_to_cpu(qd->qd_qb.qb_warn) && + (int64_t)be64_to_cpu(qd->qd_qb.qb_warn) < value && time_after_eq(jiffies, qd->qd_last_warn + gfs2_tune_get(sdp, gt_quota_warn_period) * HZ)) { @@ -1088,9 +1088,9 @@ int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, goto out; memset(q, 0, sizeof(struct gfs2_quota)); - q->qu_limit = qd->qd_qb.qb_limit; - q->qu_warn = qd->qd_qb.qb_warn; - q->qu_value = qd->qd_qb.qb_value; + q->qu_limit = be64_to_cpu(qd->qd_qb.qb_limit); + q->qu_warn = be64_to_cpu(qd->qd_qb.qb_warn); + q->qu_value = be64_to_cpu(qd->qd_qb.qb_value); spin_lock(&sdp->sd_quota_spin); q->qu_value += qd->qd_change; diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h index af05492f96447d..6702a56d49b539 100644 --- a/fs/gfs2/quota.h +++ b/fs/gfs2/quota.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __QUOTA_DOT_H__ diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 8fe518cfb3de0c..acafe4b4d6f064 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/recovery.h b/fs/gfs2/recovery.h index ac0f1d6ce45647..bed1a7857f6e47 100644 --- a/fs/gfs2/recovery.h +++ b/fs/gfs2/recovery.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __RECOVERY_DOT_H__ diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 84fcc1bfaf1bcf..62d0a84df98272 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index 14600944d1843a..f94761bf34605c 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __RGRP_DOT_H__ diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 3c318a9e8a8c6d..2cf2802fc92e13 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index df2495230402e6..4a6ce9582743be 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __SUPER_DOT_H__ diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 3c4cb455890573..3ffa88506c447a 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/sys.h b/fs/gfs2/sys.h index c46a700e801e7d..f8c01b50bfba3f 100644 --- a/fs/gfs2/sys.h +++ b/fs/gfs2/sys.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __SYS_DOT_H__ diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 05e0b72d56ff09..8e18e634cbedcb 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h index fbef3f5a99e3e8..9e3ce84f6102f7 100644 --- a/fs/gfs2/trans.h +++ b/fs/gfs2/trans.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __TRANS_DOT_H__ diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 39e67b1ec70ab7..2852431764c915 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 8216d28bd816eb..60b370365eea6c 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #ifndef __UTIL_DOT_H__ -- cgit 1.2.3-korg From cd915493fce912f1bd838ee1250737ecf33b8fae Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 4 Sep 2006 12:49:07 -0400 Subject: [GFS2] Change all types to uX style This makes all fixed size types have consistent names. Cc: Jan Engelhardt Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 60 ++++++++++---------- fs/gfs2/bmap.h | 4 +- fs/gfs2/dir.c | 124 ++++++++++++++++++++--------------------- fs/gfs2/dir.h | 8 +-- fs/gfs2/eattr.c | 56 +++++++++---------- fs/gfs2/eattr.h | 6 +- fs/gfs2/glock.c | 8 +-- fs/gfs2/glock.h | 6 +- fs/gfs2/incore.h | 72 ++++++++++++------------ fs/gfs2/inode.c | 20 +++---- fs/gfs2/lm_interface.h | 2 +- fs/gfs2/locking/dlm/lock.c | 8 +-- fs/gfs2/locking/dlm/lock_dlm.h | 14 ++--- fs/gfs2/locking/dlm/thread.c | 2 +- fs/gfs2/log.c | 18 +++--- fs/gfs2/lops.c | 18 +++--- fs/gfs2/meta_io.c | 18 +++--- fs/gfs2/meta_io.h | 10 ++-- fs/gfs2/ops_address.c | 8 +-- fs/gfs2/ops_export.c | 12 ++-- fs/gfs2/ops_file.c | 10 ++-- fs/gfs2/ops_inode.c | 12 ++-- fs/gfs2/ops_vm.c | 4 +- fs/gfs2/quota.c | 50 ++++++++--------- fs/gfs2/quota.h | 14 ++--- fs/gfs2/recovery.c | 16 +++--- fs/gfs2/recovery.h | 4 +- fs/gfs2/rgrp.c | 72 ++++++++++++------------ fs/gfs2/rgrp.h | 10 ++-- fs/gfs2/super.c | 28 +++++----- fs/gfs2/super.h | 2 +- fs/gfs2/sys.c | 4 +- fs/gfs2/trans.c | 6 +- fs/gfs2/trans.h | 4 +- fs/gfs2/util.c | 2 +- fs/gfs2/util.h | 14 ++--- 36 files changed, 363 insertions(+), 363 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index bb597839c0c9b8..a97ad74d880cb2 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -38,8 +38,8 @@ struct metapath { }; typedef int (*block_call_t) (struct gfs2_inode *ip, struct buffer_head *dibh, - struct buffer_head *bh, uint64_t *top, - uint64_t *bottom, unsigned int height, + struct buffer_head *bh, u64 *top, + u64 *bottom, unsigned int height, void *data); struct strip_mine { @@ -58,7 +58,7 @@ struct strip_mine { */ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, - uint64_t block, struct page *page) + u64 block, struct page *page) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct inode *inode = &ip->i_inode; @@ -121,7 +121,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) { struct buffer_head *bh, *dibh; - uint64_t block = 0; + u64 block = 0; int isdir = gfs2_is_dir(ip); int error; @@ -161,7 +161,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); if (ip->i_di.di_size) { - *(uint64_t *)(dibh->b_data + sizeof(struct gfs2_dinode)) = + *(u64 *)(dibh->b_data + sizeof(struct gfs2_dinode)) = cpu_to_be64(block); ip->i_di.di_blocks++; } @@ -190,10 +190,10 @@ out: * Returns: the height the tree should be */ -static unsigned int calc_tree_height(struct gfs2_inode *ip, uint64_t size) +static unsigned int calc_tree_height(struct gfs2_inode *ip, u64 size) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - uint64_t *arr; + u64 *arr; unsigned int max, height; if (ip->i_di.di_size > size) @@ -336,11 +336,11 @@ static int build_height(struct inode *inode, unsigned height) * */ -static void find_metapath(struct gfs2_inode *ip, uint64_t block, +static void find_metapath(struct gfs2_inode *ip, u64 block, struct metapath *mp) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - uint64_t b = block; + u64 b = block; unsigned int i; for (i = ip->i_di.di_height; i--;) @@ -390,10 +390,10 @@ static inline u64 *metapointer(struct buffer_head *bh, int *boundary, static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, unsigned int height, struct metapath *mp, int create, - int *new, uint64_t *block) + int *new, u64 *block) { int boundary; - uint64_t *ptr = metapointer(bh, &boundary, height, mp); + u64 *ptr = metapointer(bh, &boundary, height, mp); if (*ptr) { *block = be64_to_cpu(*ptr); @@ -594,13 +594,13 @@ int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsi static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh, struct metapath *mp, unsigned int height, - uint64_t block, int first, block_call_t bc, + u64 block, int first, block_call_t bc, void *data) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct buffer_head *bh = NULL; - uint64_t *top, *bottom; - uint64_t bn; + u64 *top, *bottom; + u64 bn; int error; int mh_size = sizeof(struct gfs2_meta_header); @@ -617,10 +617,10 @@ static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh, if (error) return error; - top = (uint64_t *)(bh->b_data + mh_size) + + top = (u64 *)(bh->b_data + mh_size) + ((first) ? mp->mp_list[height] : 0); - bottom = (uint64_t *)(bh->b_data + mh_size) + sdp->sd_inptrs; + bottom = (u64 *)(bh->b_data + mh_size) + sdp->sd_inptrs; } error = bc(ip, dibh, bh, top, bottom, height, data); @@ -659,15 +659,15 @@ out: */ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, - struct buffer_head *bh, uint64_t *top, uint64_t *bottom, + struct buffer_head *bh, u64 *top, u64 *bottom, unsigned int height, void *data) { struct strip_mine *sm = data; struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_rgrp_list rlist; - uint64_t bn, bstart; - uint32_t blen; - uint64_t *p; + u64 bn, bstart; + u32 blen; + u64 *p; unsigned int rg_blocks = 0; int metadata; unsigned int revokes = 0; @@ -804,7 +804,7 @@ out: * Returns: errno */ -static int do_grow(struct gfs2_inode *ip, uint64_t size) +static int do_grow(struct gfs2_inode *ip, u64 size) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al; @@ -949,7 +949,7 @@ unlock: return err; } -static int trunc_start(struct gfs2_inode *ip, uint64_t size) +static int trunc_start(struct gfs2_inode *ip, u64 size) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct buffer_head *dibh; @@ -974,7 +974,7 @@ static int trunc_start(struct gfs2_inode *ip, uint64_t size) error = 1; } else { - if (size & (uint64_t)(sdp->sd_sb.sb_bsize - 1)) + if (size & (u64)(sdp->sd_sb.sb_bsize - 1)) error = gfs2_block_truncate_page(ip->i_inode.i_mapping); if (!error) { @@ -993,10 +993,10 @@ out: return error; } -static int trunc_dealloc(struct gfs2_inode *ip, uint64_t size) +static int trunc_dealloc(struct gfs2_inode *ip, u64 size) { unsigned int height = ip->i_di.di_height; - uint64_t lblock; + u64 lblock; struct metapath mp; int error; @@ -1076,7 +1076,7 @@ out: * Returns: errno */ -static int do_shrink(struct gfs2_inode *ip, uint64_t size) +static int do_shrink(struct gfs2_inode *ip, u64 size) { int error; @@ -1104,7 +1104,7 @@ static int do_shrink(struct gfs2_inode *ip, uint64_t size) * Returns: errno */ -int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size) +int gfs2_truncatei(struct gfs2_inode *ip, u64 size) { int error; @@ -1172,12 +1172,12 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, * Returns: errno */ -int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, +int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset, unsigned int len, int *alloc_required) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - uint64_t lblock, lblock_stop, dblock; - uint32_t extlen; + u64 lblock, lblock_stop, dblock; + u32 extlen; int new = 0; int error = 0; diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index ab0157c5ed0e5a..cb3b624fea3132 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); int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary); int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); -int gfs2_truncatei(struct gfs2_inode *ip, uint64_t size); +int gfs2_truncatei(struct gfs2_inode *ip, u64 size); int gfs2_truncatei_resume(struct gfs2_inode *ip); int gfs2_file_dealloc(struct gfs2_inode *ip); void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, unsigned int *data_blocks, unsigned int *ind_blocks); -int gfs2_write_alloc_required(struct gfs2_inode *ip, uint64_t offset, +int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset, unsigned int len, int *alloc_required); #endif /* __BMAP_DOT_H__ */ diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 59d0cbcaecffc1..2023dc4ea30667 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -78,15 +78,15 @@ #define IS_LEAF 1 /* Hashed (leaf) directory */ #define IS_DINODE 2 /* Linear (stuffed dinode block) directory */ -#define gfs2_disk_hash2offset(h) (((uint64_t)(h)) >> 1) -#define gfs2_dir_offset2hash(p) ((uint32_t)(((uint64_t)(p)) << 1)) +#define gfs2_disk_hash2offset(h) (((u64)(h)) >> 1) +#define gfs2_dir_offset2hash(p) ((u32)(((u64)(p)) << 1)) typedef int (*leaf_call_t) (struct gfs2_inode *dip, - uint32_t index, uint32_t len, uint64_t leaf_no, + u32 index, u32 len, u64 leaf_no, void *data); -int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, uint64_t block, +int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block, struct buffer_head **bhp) { struct buffer_head *bh; @@ -99,7 +99,7 @@ int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, uint64_t block, return 0; } -static int gfs2_dir_get_existing_buffer(struct gfs2_inode *ip, uint64_t block, +static int gfs2_dir_get_existing_buffer(struct gfs2_inode *ip, u64 block, struct buffer_head **bhp) { struct buffer_head *bh; @@ -151,12 +151,12 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf, * Returns: The number of bytes correctly written or error code */ static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf, - uint64_t offset, unsigned int size) + u64 offset, unsigned int size) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct buffer_head *dibh; - uint64_t lblock, dblock; - uint32_t extlen = 0; + u64 lblock, dblock; + u32 extlen = 0; unsigned int o; int copied = 0; int error = 0; @@ -271,11 +271,11 @@ static int gfs2_dir_read_stuffed(struct gfs2_inode *ip, char *buf, * Returns: The amount of data actually copied or the error */ static int gfs2_dir_read_data(struct gfs2_inode *ip, char *buf, - uint64_t offset, unsigned int size) + u64 offset, unsigned int size) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); - uint64_t lblock, dblock; - uint32_t extlen = 0; + u64 lblock, dblock; + u32 extlen = 0; unsigned int o; int copied = 0; int error = 0; @@ -581,7 +581,7 @@ static int dirent_next(struct gfs2_inode *dip, struct buffer_head *bh, { struct gfs2_dirent *tmp, *cur; char *bh_end; - uint16_t cur_rec_len; + u16 cur_rec_len; cur = *dent; bh_end = bh->b_data + bh->b_size; @@ -630,7 +630,7 @@ static int dirent_next(struct gfs2_inode *dip, struct buffer_head *bh, static void dirent_del(struct gfs2_inode *dip, struct buffer_head *bh, struct gfs2_dirent *prev, struct gfs2_dirent *cur) { - uint16_t cur_rec_len, prev_rec_len; + u16 cur_rec_len, prev_rec_len; if (!cur->de_inum.no_addr) { gfs2_consist_inode(dip); @@ -698,7 +698,7 @@ static struct gfs2_dirent *gfs2_dirent_alloc(struct inode *inode, return gfs2_init_dirent(inode, dent, name, bh); } -static int get_leaf(struct gfs2_inode *dip, uint64_t leaf_no, +static int get_leaf(struct gfs2_inode *dip, u64 leaf_no, struct buffer_head **bhp) { int error; @@ -721,16 +721,16 @@ static int get_leaf(struct gfs2_inode *dip, uint64_t leaf_no, * Returns: 0 on success, error code otherwise */ -static int get_leaf_nr(struct gfs2_inode *dip, uint32_t index, - uint64_t *leaf_out) +static int get_leaf_nr(struct gfs2_inode *dip, u32 index, + u64 *leaf_out) { - uint64_t leaf_no; + u64 leaf_no; int error; error = gfs2_dir_read_data(dip, (char *)&leaf_no, - index * sizeof(uint64_t), - sizeof(uint64_t)); - if (error != sizeof(uint64_t)) + index * sizeof(u64), + sizeof(u64)); + if (error != sizeof(u64)) return (error < 0) ? error : -EIO; *leaf_out = be64_to_cpu(leaf_no); @@ -738,10 +738,10 @@ static int get_leaf_nr(struct gfs2_inode *dip, uint32_t index, return 0; } -static int get_first_leaf(struct gfs2_inode *dip, uint32_t index, +static int get_first_leaf(struct gfs2_inode *dip, u32 index, struct buffer_head **bh_out) { - uint64_t leaf_no; + u64 leaf_no; int error; error = get_leaf_nr(dip, index, &leaf_no); @@ -847,8 +847,8 @@ static int dir_make_exhash(struct inode *inode) struct buffer_head *bh, *dibh; struct gfs2_leaf *leaf; int y; - uint32_t x; - uint64_t *lp, bn; + u32 x; + u64 *lp, bn; int error; error = gfs2_meta_inode_buffer(dip, &dibh); @@ -904,7 +904,7 @@ static int dir_make_exhash(struct inode *inode) gfs2_trans_add_bh(dip->i_gl, dibh, 1); gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); - lp = (uint64_t *)(dibh->b_data + sizeof(struct gfs2_dinode)); + lp = (u64 *)(dibh->b_data + sizeof(struct gfs2_dinode)); for (x = sdp->sd_hash_ptrs; x--; lp++) *lp = cpu_to_be64(bn); @@ -939,9 +939,9 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name) struct buffer_head *nbh, *obh, *dibh; struct gfs2_leaf *nleaf, *oleaf; struct gfs2_dirent *dent = NULL, *prev = NULL, *next = NULL, *new; - uint32_t start, len, half_len, divider; - uint64_t bn, *lp, leaf_no; - uint32_t index; + u32 start, len, half_len, divider; + u64 bn, *lp, leaf_no; + u32 index; int x, moved = 0; int error; @@ -985,14 +985,14 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name) /* Change the pointers. Don't bother distinguishing stuffed from non-stuffed. This code is complicated enough already. */ - lp = kmalloc(half_len * sizeof(uint64_t), GFP_NOFS | __GFP_NOFAIL); + lp = kmalloc(half_len * sizeof(u64), GFP_NOFS | __GFP_NOFAIL); /* Change the pointers */ for (x = 0; x < half_len; x++) lp[x] = cpu_to_be64(bn); - error = gfs2_dir_write_data(dip, (char *)lp, start * sizeof(uint64_t), - half_len * sizeof(uint64_t)); - if (error != half_len * sizeof(uint64_t)) { + error = gfs2_dir_write_data(dip, (char *)lp, start * sizeof(u64), + half_len * sizeof(u64)); + if (error != half_len * sizeof(u64)) { if (error >= 0) error = -EIO; goto fail_lpfree; @@ -1077,15 +1077,15 @@ static int dir_double_exhash(struct gfs2_inode *dip) { struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); struct buffer_head *dibh; - uint32_t hsize; - uint64_t *buf; - uint64_t *from, *to; - uint64_t block; + u32 hsize; + u64 *buf; + u64 *from, *to; + u64 block; int x; int error = 0; hsize = 1 << dip->i_di.di_depth; - if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { + if (hsize * sizeof(u64) != dip->i_di.di_size) { gfs2_consist_inode(dip); return -EIO; } @@ -1105,7 +1105,7 @@ static int dir_double_exhash(struct gfs2_inode *dip) } from = buf; - to = (uint64_t *)((char *)buf + sdp->sd_hash_bsize); + to = (u64 *)((char *)buf + sdp->sd_hash_bsize); for (x = sdp->sd_hash_ptrs; x--; from++) { *to++ = *from; /* No endianess worries */ @@ -1153,7 +1153,7 @@ fail: static int compare_dents(const void *a, const void *b) { struct gfs2_dirent *dent_a, *dent_b; - uint32_t hash_a, hash_b; + u32 hash_a, hash_b; int ret = 0; dent_a = *(struct gfs2_dirent **)a; @@ -1201,14 +1201,14 @@ static int compare_dents(const void *a, const void *b) * Returns: errno, >0 on exception from filldir */ -static int do_filldir_main(struct gfs2_inode *dip, uint64_t *offset, +static int do_filldir_main(struct gfs2_inode *dip, u64 *offset, void *opaque, gfs2_filldir_t filldir, - const struct gfs2_dirent **darr, uint32_t entries, + const struct gfs2_dirent **darr, u32 entries, int *copied) { const struct gfs2_dirent *dent, *dent_next; struct gfs2_inum inum; - uint64_t off, off_next; + u64 off, off_next; unsigned int x, y; int run = 0; int error = 0; @@ -1346,21 +1346,21 @@ out: * Returns: errno */ -static int dir_e_read(struct inode *inode, uint64_t *offset, void *opaque, +static int dir_e_read(struct inode *inode, u64 *offset, void *opaque, gfs2_filldir_t filldir) { struct gfs2_inode *dip = GFS2_I(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); - uint32_t hsize, len = 0; - uint32_t ht_offset, lp_offset, ht_offset_cur = -1; - uint32_t hash, index; - uint64_t *lp; + u32 hsize, len = 0; + u32 ht_offset, lp_offset, ht_offset_cur = -1; + u32 hash, index; + u64 *lp; int copied = 0; int error = 0; unsigned depth = 0; hsize = 1 << dip->i_di.di_depth; - if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { + if (hsize * sizeof(u64) != dip->i_di.di_size) { gfs2_consist_inode(dip); return -EIO; } @@ -1378,7 +1378,7 @@ static int dir_e_read(struct inode *inode, uint64_t *offset, void *opaque, if (ht_offset_cur != ht_offset) { error = gfs2_dir_read_data(dip, (char *)lp, - ht_offset * sizeof(uint64_t), + ht_offset * sizeof(u64), sdp->sd_hash_bsize); if (error != sdp->sd_hash_bsize) { if (error >= 0) @@ -1405,7 +1405,7 @@ out: return error; } -int gfs2_dir_read(struct inode *inode, uint64_t *offset, void *opaque, +int gfs2_dir_read(struct inode *inode, u64 *offset, void *opaque, gfs2_filldir_t filldir) { 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) struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); struct buffer_head *bh; struct gfs2_leaf *leaf; - uint32_t hsize, len; - uint32_t ht_offset, lp_offset, ht_offset_cur = -1; - uint32_t index = 0; - uint64_t *lp; - uint64_t leaf_no; + u32 hsize, len; + u32 ht_offset, lp_offset, ht_offset_cur = -1; + u32 index = 0; + u64 *lp; + u64 leaf_no; int error = 0; hsize = 1 << dip->i_di.di_depth; - if (hsize * sizeof(uint64_t) != dip->i_di.di_size) { + if (hsize * sizeof(u64) != dip->i_di.di_size) { gfs2_consist_inode(dip); return -EIO; } @@ -1748,7 +1748,7 @@ static int foreach_leaf(struct gfs2_inode *dip, leaf_call_t lc, void *data) if (ht_offset_cur != ht_offset) { error = gfs2_dir_read_data(dip, (char *)lp, - ht_offset * sizeof(uint64_t), + ht_offset * sizeof(u64), sdp->sd_hash_bsize); if (error != sdp->sd_hash_bsize) { if (error >= 0) @@ -1798,17 +1798,17 @@ out: * Returns: errno */ -static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, - uint64_t leaf_no, void *data) +static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, + u64 leaf_no, void *data) { struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); struct gfs2_leaf *tmp_leaf; struct gfs2_rgrp_list rlist; struct buffer_head *bh, *dibh; - uint64_t blk, nblk; + u64 blk, nblk; unsigned int rg_blocks = 0, l_blocks = 0; char *ht; - unsigned int x, size = len * sizeof(uint64_t); + unsigned int x, size = len * sizeof(u64); int error; 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, dip->i_di.di_blocks--; } - error = gfs2_dir_write_data(dip, ht, index * sizeof(uint64_t), size); + error = gfs2_dir_write_data(dip, ht, index * sizeof(u64), size); if (error != size) { if (error >= 0) error = -EIO; diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h index 366a5571648f61..f1f83faa36ecb0 100644 --- a/fs/gfs2/dir.h +++ b/fs/gfs2/dir.h @@ -24,7 +24,7 @@ typedef int (*gfs2_filldir_t) (void *opaque, const char *name, unsigned int length, - uint64_t offset, + u64 offset, struct gfs2_inum *inum, unsigned int type); int 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, int gfs2_dir_add(struct inode *inode, const struct qstr *filename, const struct gfs2_inum *inum, unsigned int type); int gfs2_dir_del(struct gfs2_inode *dip, const struct qstr *filename); -int gfs2_dir_read(struct inode *inode, uint64_t * offset, void *opaque, +int gfs2_dir_read(struct inode *inode, u64 * offset, void *opaque, gfs2_filldir_t filldir); int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename, struct gfs2_inum *new_inum, unsigned int new_type); @@ -41,10 +41,10 @@ int gfs2_dir_exhash_dealloc(struct gfs2_inode *dip); int gfs2_diradd_alloc_required(struct inode *dir, const struct qstr *filename); -int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, uint64_t block, +int gfs2_dir_get_new_buffer(struct gfs2_inode *ip, u64 block, struct buffer_head **bhp); -static inline uint32_t gfs2_disk_hash(const char *data, int len) +static inline u32 gfs2_disk_hash(const char *data, int len) { return crc32_le(0xFFFFFFFF, data, len) ^ 0xFFFFFFFF; } diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 5a56e6568622b0..f6b5e306a6c8ca 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -115,7 +115,7 @@ fail: static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data) { struct buffer_head *bh, *eabh; - uint64_t *eablk, *end; + u64 *eablk, *end; int error; 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) goto out; } - eablk = (uint64_t *)(bh->b_data + sizeof(struct gfs2_meta_header)); + eablk = (u64 *)(bh->b_data + sizeof(struct gfs2_meta_header)); end = eablk + GFS2_SB(&ip->i_inode)->sd_inptrs; for (; eablk < end; eablk++) { - uint64_t bn; + u64 bn; if (!*eablk) break; @@ -235,8 +235,8 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh, struct gfs2_rgrpd *rgd; struct gfs2_holder rg_gh; struct buffer_head *dibh; - uint64_t *dataptrs, bn = 0; - uint64_t bstart = 0; + u64 *dataptrs, bn = 0; + u64 bstart = 0; unsigned int blen = 0; unsigned int blks = 0; unsigned int x; @@ -296,7 +296,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh, gfs2_free_meta(ip, bstart, blen); if (prev && !leave) { - uint32_t len; + u32 len; len = GFS2_EA_REC_LEN(prev) + GFS2_EA_REC_LEN(ea); 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, struct buffer_head **bh; unsigned int amount = GFS2_EA_DATA_LEN(ea); unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); - uint64_t *dataptrs = GFS2_EA2DATAPTRS(ea); + u64 *dataptrs = GFS2_EA2DATAPTRS(ea); unsigned int x; int error = 0; @@ -601,7 +601,7 @@ static int ea_alloc_blk(struct gfs2_inode *ip, struct buffer_head **bhp) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_ea_header *ea; - uint64_t block; + u64 block; block = gfs2_alloc_meta(ip); @@ -649,7 +649,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea, ea->ea_num_ptrs = 0; memcpy(GFS2_EA2DATA(ea), er->er_data, er->er_data_len); } else { - uint64_t *dataptr = GFS2_EA2DATAPTRS(ea); + u64 *dataptr = GFS2_EA2DATAPTRS(ea); const char *data = er->er_data; unsigned int data_len = er->er_data_len; unsigned int copy; @@ -658,7 +658,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea, ea->ea_num_ptrs = DIV_ROUND_UP(er->er_data_len, sdp->sd_jbsize); for (x = 0; x < ea->ea_num_ptrs; x++) { struct buffer_head *bh; - uint64_t block; + u64 block; int mh_size = sizeof(struct gfs2_meta_header); block = gfs2_alloc_meta(ip); @@ -676,7 +676,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea, memset(bh->b_data + mh_size + copy, 0, sdp->sd_jbsize - copy); - *dataptr++ = cpu_to_be64((uint64_t)bh->b_blocknr); + *dataptr++ = cpu_to_be64((u64)bh->b_blocknr); data += copy; data_len -= copy; @@ -792,10 +792,10 @@ static int ea_init(struct gfs2_inode *ip, struct gfs2_ea_request *er) static struct gfs2_ea_header *ea_split_ea(struct gfs2_ea_header *ea) { - uint32_t ea_size = GFS2_EA_SIZE(ea); + u32 ea_size = GFS2_EA_SIZE(ea); struct gfs2_ea_header *new = (struct gfs2_ea_header *)((char *)ea + ea_size); - uint32_t new_size = GFS2_EA_REC_LEN(ea) - ea_size; + u32 new_size = GFS2_EA_REC_LEN(ea) - ea_size; int last = ea->ea_flags & GFS2_EAFLAG_LAST; ea->ea_rec_len = cpu_to_be32(ea_size); @@ -812,7 +812,7 @@ static void ea_set_remove_stuffed(struct gfs2_inode *ip, { struct gfs2_ea_header *ea = el->el_ea; struct gfs2_ea_header *prev = el->el_prev; - uint32_t len; + u32 len; gfs2_trans_add_bh(ip->i_gl, el->el_bh, 1); @@ -953,12 +953,12 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct buffer_head *indbh, *newbh; - uint64_t *eablk; + u64 *eablk; int error; int mh_size = sizeof(struct gfs2_meta_header); if (ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT) { - uint64_t *end; + u64 *end; error = gfs2_meta_read(ip->i_gl, ip->i_di.di_eattr, DIO_START | DIO_WAIT, &indbh); @@ -970,7 +970,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, goto out; } - eablk = (uint64_t *)(indbh->b_data + mh_size); + eablk = (u64 *)(indbh->b_data + mh_size); end = eablk + sdp->sd_inptrs; for (; eablk < end; eablk++) @@ -984,7 +984,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, gfs2_trans_add_bh(ip->i_gl, indbh, 1); } else { - uint64_t blk; + u64 blk; blk = gfs2_alloc_meta(ip); @@ -993,7 +993,7 @@ static int ea_set_block(struct gfs2_inode *ip, struct gfs2_ea_request *er, gfs2_metatype_set(indbh, GFS2_METATYPE_IN, GFS2_FORMAT_IN); gfs2_buffer_clear_tail(indbh, mh_size); - eablk = (uint64_t *)(indbh->b_data + mh_size); + eablk = (u64 *)(indbh->b_data + mh_size); *eablk = cpu_to_be64(ip->i_di.di_eattr); ip->i_di.di_eattr = blk; 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, if (error) goto out; - *eablk = cpu_to_be64((uint64_t)newbh->b_blocknr); + *eablk = cpu_to_be64((u64)newbh->b_blocknr); error = ea_write(ip, GFS2_EA_BH2FIRST(newbh), er); brelse(newbh); if (error) @@ -1140,7 +1140,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el) gfs2_trans_add_bh(ip->i_gl, el->el_bh, 1); if (prev) { - uint32_t len; + u32 len; len = GFS2_EA_REC_LEN(prev) + GFS2_EA_REC_LEN(ea); prev->ea_rec_len = cpu_to_be32(len); @@ -1225,7 +1225,7 @@ static int ea_acl_chmod_unstuffed(struct gfs2_inode *ip, struct buffer_head **bh; unsigned int amount = GFS2_EA_DATA_LEN(ea); unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); - uint64_t *dataptrs = GFS2_EA2DATAPTRS(ea); + u64 *dataptrs = GFS2_EA2DATAPTRS(ea); unsigned int x; int error; @@ -1325,9 +1325,9 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip) struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_rgrp_list rlist; struct buffer_head *indbh, *dibh; - uint64_t *eablk, *end; + u64 *eablk, *end; unsigned int rg_blocks = 0; - uint64_t bstart = 0; + u64 bstart = 0; unsigned int blen = 0; unsigned int blks = 0; unsigned int x; @@ -1345,11 +1345,11 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip) goto out; } - eablk = (uint64_t *)(indbh->b_data + sizeof(struct gfs2_meta_header)); + eablk = (u64 *)(indbh->b_data + sizeof(struct gfs2_meta_header)); end = eablk + sdp->sd_inptrs; for (; eablk < end; eablk++) { - uint64_t bn; + u64 bn; if (!*eablk) break; @@ -1390,12 +1390,12 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip) gfs2_trans_add_bh(ip->i_gl, indbh, 1); - eablk = (uint64_t *)(indbh->b_data + sizeof(struct gfs2_meta_header)); + eablk = (u64 *)(indbh->b_data + sizeof(struct gfs2_meta_header)); bstart = 0; blen = 0; for (; eablk < end; eablk++) { - uint64_t bn; + u64 bn; if (!*eablk) break; diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index 7b0291f99fd9fa..85c70c335c59c4 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -16,7 +16,7 @@ #define GFS2_EA_SIZE(ea) \ ALIGN(sizeof(struct gfs2_ea_header) + (ea)->ea_name_len + \ ((GFS2_EA_IS_STUFFED(ea)) ? GFS2_EA_DATA_LEN(ea) : \ - (sizeof(uint64_t) * (ea)->ea_num_ptrs)), 8) + (sizeof(u64) * (ea)->ea_num_ptrs)), 8) #define GFS2_EA_IS_STUFFED(ea) (!(ea)->ea_num_ptrs) #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) #define GFS2_EAREQ_SIZE_UNSTUFFED(sdp, er) \ ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + \ - sizeof(uint64_t) * DIV_ROUND_UP((er)->er_data_len, (sdp)->sd_jbsize), 8) + sizeof(u64) * DIV_ROUND_UP((er)->er_data_len, (sdp)->sd_jbsize), 8) #define GFS2_EA2NAME(ea) ((char *)((struct gfs2_ea_header *)(ea) + 1)) #define GFS2_EA2DATA(ea) (GFS2_EA2NAME(ea) + (ea)->ea_name_len) #define GFS2_EA2DATAPTRS(ea) \ -((uint64_t *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8))) +((u64 *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8))) #define GFS2_EA2NEXT(ea) \ ((struct gfs2_ea_header *)((char *)(ea) + GFS2_EA_REC_LEN(ea))) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 1c916fedc04bef..f2edc8b761217d 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) { unsigned int h; - h = jhash(&name->ln_number, sizeof(uint64_t), 0); + h = jhash(&name->ln_number, sizeof(u64), 0); h = jhash(&name->ln_type, sizeof(unsigned int), h); h &= GFS2_GL_HASH_MASK; @@ -255,7 +255,7 @@ static struct gfs2_glock *gfs2_glock_find(struct gfs2_sbd *sdp, * Returns: errno */ -int gfs2_glock_get(struct gfs2_sbd *sdp, uint64_t number, +int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, const struct gfs2_glock_operations *glops, int create, struct gfs2_glock **glp) { @@ -1415,7 +1415,7 @@ void gfs2_glock_dq_uninit(struct gfs2_holder *gh) * Returns: errno */ -int gfs2_glock_nq_num(struct gfs2_sbd *sdp, uint64_t number, +int gfs2_glock_nq_num(struct gfs2_sbd *sdp, u64 number, const struct gfs2_glock_operations *glops, unsigned int state, int flags, struct gfs2_holder *gh) { @@ -1613,7 +1613,7 @@ void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs) * Returns: errno */ -void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, uint64_t number, +void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, u64 number, const struct gfs2_glock_operations *glops, unsigned int state, int flags) { diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 1a90a1983bebec..4762cdb04f64ac 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) } int gfs2_glock_get(struct gfs2_sbd *sdp, - uint64_t number, const struct gfs2_glock_operations *glops, + u64 number, const struct gfs2_glock_operations *glops, int create, struct gfs2_glock **glp); void gfs2_glock_hold(struct gfs2_glock *gl); int gfs2_glock_put(struct gfs2_glock *gl); @@ -96,14 +96,14 @@ int gfs2_glock_be_greedy(struct gfs2_glock *gl, unsigned int time); void gfs2_glock_dq_uninit(struct gfs2_holder *gh); int gfs2_glock_nq_num(struct gfs2_sbd *sdp, - uint64_t number, const struct gfs2_glock_operations *glops, + u64 number, const struct gfs2_glock_operations *glops, unsigned int state, int flags, struct gfs2_holder *gh); int gfs2_glock_nq_m(unsigned int num_gh, struct gfs2_holder *ghs); void gfs2_glock_dq_m(unsigned int num_gh, struct gfs2_holder *ghs); void gfs2_glock_dq_uninit_m(unsigned int num_gh, struct gfs2_holder *ghs); -void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, uint64_t number, +void gfs2_glock_prefetch_num(struct gfs2_sbd *sdp, u64 number, const struct gfs2_glock_operations *glops, unsigned int state, int flags); void gfs2_glock_inode_squish(struct inode *inode); diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 06f5ec6ebf7faf..407afd18fa2eef 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -60,9 +60,9 @@ struct gfs2_log_element { struct gfs2_bitmap { struct buffer_head *bi_bh; char *bi_clone; - uint32_t bi_offset; - uint32_t bi_start; - uint32_t bi_len; + u32 bi_offset; + u32 bi_start; + u32 bi_len; }; struct gfs2_rgrpd { @@ -72,14 +72,14 @@ struct gfs2_rgrpd { struct gfs2_glock *rd_gl; /* Glock for this rgrp */ struct gfs2_rindex rd_ri; struct gfs2_rgrp rd_rg; - uint64_t rd_rg_vn; + u64 rd_rg_vn; struct gfs2_bitmap *rd_bits; unsigned int rd_bh_count; struct mutex rd_mutex; - uint32_t rd_free_clone; + u32 rd_free_clone; struct gfs2_log_element rd_le; - uint32_t rd_last_alloc_data; - uint32_t rd_last_alloc_meta; + u32 rd_last_alloc_data; + u32 rd_last_alloc_meta; struct gfs2_sbd *rd_sbd; }; @@ -185,7 +185,7 @@ struct gfs2_glock { char *gl_lvb; atomic_t gl_lvb_count; - uint64_t gl_vn; + u64 gl_vn; unsigned long gl_stamp; void *gl_object; @@ -232,14 +232,14 @@ struct gfs2_inode { unsigned long i_flags; /* GIF_... */ - uint64_t i_vn; + u64 i_vn; struct gfs2_dinode i_di; /* To be replaced by ref to block */ struct gfs2_glock *i_gl; /* Move into i_gh? */ struct gfs2_holder i_iopen_gh; struct gfs2_holder i_gh; /* for prepare/commit_write only */ struct gfs2_alloc i_alloc; - uint64_t i_last_rg_alloc; + u64 i_last_rg_alloc; spinlock_t i_spin; struct rw_semaphore i_rw_mutex; @@ -277,12 +277,12 @@ struct gfs2_file { struct gfs2_revoke { struct gfs2_log_element rv_le; - uint64_t rv_blkno; + u64 rv_blkno; }; struct gfs2_revoke_replay { struct list_head rr_list; - uint64_t rr_blkno; + u64 rr_blkno; unsigned int rr_where; }; @@ -304,11 +304,11 @@ struct gfs2_quota_data { struct list_head qd_list; unsigned int qd_count; - uint32_t qd_id; + u32 qd_id; unsigned long qd_flags; /* QDF_... */ - int64_t qd_change; - int64_t qd_change_sync; + s64 qd_change; + s64 qd_change_sync; unsigned int qd_slot; unsigned int qd_slot_count; @@ -320,7 +320,7 @@ struct gfs2_quota_data { struct gfs2_glock *qd_gl; struct gfs2_quota_lvb qd_qb; - uint64_t qd_sync_gen; + u64 qd_sync_gen; unsigned long qd_last_warn; unsigned long qd_last_touched; }; @@ -358,7 +358,7 @@ struct gfs2_ail { struct list_head ai_ail1_list; struct list_head ai_ail2_list; - uint64_t ai_sync_gen; + u64 ai_sync_gen; }; struct gfs2_jdesc { @@ -466,20 +466,20 @@ struct gfs2_sbd { /* Constants computed on mount */ - uint32_t sd_fsb2bb; - uint32_t sd_fsb2bb_shift; - uint32_t sd_diptrs; /* Number of pointers in a dinode */ - uint32_t sd_inptrs; /* Number of pointers in a indirect block */ - uint32_t sd_jbsize; /* Size of a journaled data block */ - uint32_t sd_hash_bsize; /* sizeof(exhash block) */ - uint32_t sd_hash_bsize_shift; - uint32_t sd_hash_ptrs; /* Number of pointers in a hash block */ - uint32_t sd_qc_per_block; - uint32_t sd_max_dirres; /* Max blocks needed to add a directory entry */ - uint32_t sd_max_height; /* Max height of a file's metadata tree */ - uint64_t sd_heightsize[GFS2_MAX_META_HEIGHT]; - uint32_t sd_max_jheight; /* Max height of journaled file's meta tree */ - uint64_t sd_jheightsize[GFS2_MAX_META_HEIGHT]; + u32 sd_fsb2bb; + u32 sd_fsb2bb_shift; + u32 sd_diptrs; /* Number of pointers in a dinode */ + u32 sd_inptrs; /* Number of pointers in a indirect block */ + u32 sd_jbsize; /* Size of a journaled data block */ + u32 sd_hash_bsize; /* sizeof(exhash block) */ + u32 sd_hash_bsize_shift; + u32 sd_hash_ptrs; /* Number of pointers in a hash block */ + u32 sd_qc_per_block; + u32 sd_max_dirres; /* Max blocks needed to add a directory entry */ + u32 sd_max_height; /* Max height of a file's metadata tree */ + u64 sd_heightsize[GFS2_MAX_META_HEIGHT]; + u32 sd_max_jheight; /* Max height of journaled file's meta tree */ + u64 sd_jheightsize[GFS2_MAX_META_HEIGHT]; struct gfs2_args sd_args; /* Mount arguments */ struct gfs2_tune sd_tune; /* Filesystem tuning structure */ @@ -522,7 +522,7 @@ struct gfs2_sbd { /* Resource group stuff */ - uint64_t sd_rindex_vn; + u64 sd_rindex_vn; spinlock_t sd_rindex_spin; struct mutex sd_rindex_mutex; struct list_head sd_rindex_list; @@ -567,7 +567,7 @@ struct gfs2_sbd { unsigned int sd_quota_chunks; unsigned char **sd_quota_bitmap; - uint64_t sd_quota_sync_gen; + u64 sd_quota_sync_gen; unsigned long sd_quota_sync_time; /* Log stuff */ @@ -595,7 +595,7 @@ struct gfs2_sbd { unsigned int sd_log_blks_free; struct mutex sd_log_reserve_mutex; - uint64_t sd_log_sequence; + u64 sd_log_sequence; unsigned int sd_log_head; unsigned int sd_log_tail; int sd_log_idle; @@ -605,11 +605,11 @@ struct gfs2_sbd { struct list_head sd_log_flush_list; unsigned int sd_log_flush_head; - uint64_t sd_log_flush_wrapped; + u64 sd_log_flush_wrapped; struct list_head sd_ail1_list; struct list_head sd_ail2_list; - uint64_t sd_ail_sync_gen; + u64 sd_ail_sync_gen; /* Replay stuff */ diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 1aaaaa1cc8c32d..f683a400b0068f 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) { struct gfs2_sbd *sdp = ip->i_inode.i_sb->s_fs_info; struct buffer_head *dibh; - uint32_t nlink; + u32 nlink; int error; BUG_ON(ip->i_di.di_nlink != ip->i_inode.i_nlink); @@ -428,7 +428,7 @@ out: return inode; } -static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino) +static int pick_formal_ino_1(struct gfs2_sbd *sdp, u64 *formal_ino) { struct gfs2_inode *ip = GFS2_I(sdp->sd_ir_inode); struct buffer_head *bh; @@ -469,7 +469,7 @@ static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino) return 1; } -static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino) +static int pick_formal_ino_2(struct gfs2_sbd *sdp, u64 *formal_ino) { struct gfs2_inode *ip = GFS2_I(sdp->sd_ir_inode); 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) if (!ir.ir_length) { struct buffer_head *m_bh; - uint64_t x, y; + u64 x, y; error = gfs2_meta_inode_buffer(m_ip, &m_bh); if (error) goto out_brelse; - x = *(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)); + x = *(u64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)); x = y = be64_to_cpu(x); ir.ir_start = x; ir.ir_length = GFS2_INUM_QUANTUM; @@ -510,7 +510,7 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino) gfs2_consist_inode(m_ip); x = cpu_to_be64(x); gfs2_trans_add_bh(m_ip->i_gl, m_bh, 1); - *(uint64_t *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x; + *(u64 *)(m_bh->b_data + sizeof(struct gfs2_dinode)) = x; brelse(m_bh); } @@ -531,7 +531,7 @@ out: return error; } -static int pick_formal_ino(struct gfs2_sbd *sdp, uint64_t *inum) +static int pick_formal_ino(struct gfs2_sbd *sdp, u64 *inum) { int error; @@ -577,9 +577,9 @@ static int create_ok(struct gfs2_inode *dip, const struct qstr *name, return error; } - if (dip->i_di.di_entries == (uint32_t)-1) + if (dip->i_di.di_entries == (u32)-1) return -EFBIG; - if (S_ISDIR(mode) && dip->i_di.di_nlink == (uint32_t)-1) + if (S_ISDIR(mode) && dip->i_di.di_nlink == (u32)-1) return -EMLINK; return 0; @@ -1131,7 +1131,7 @@ int gfs2_glock_nq_atime(struct gfs2_holder *gh) struct gfs2_glock *gl = gh->gh_gl; struct gfs2_sbd *sdp = gl->gl_sbd; struct gfs2_inode *ip = gl->gl_object; - int64_t curtime, quantum = gfs2_tune_get(sdp, gt_atime_quantum); + s64 curtime, quantum = gfs2_tune_get(sdp, gt_atime_quantum); unsigned int state; int flags; int error; diff --git a/fs/gfs2/lm_interface.h b/fs/gfs2/lm_interface.h index 0bf4c276e0fead..e2dfc3da4da963 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, struct lm_lockname { - uint64_t ln_number; + u64 ln_number; unsigned int ln_type; }; diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c index 1f15b6e8b2cf36..dceea419b94b57 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) /* convert gfs lock-state to dlm lock-mode */ -static int16_t make_mode(int16_t lmstate) +static s16 make_mode(s16 lmstate) { switch (lmstate) { case LM_ST_UNLOCKED: @@ -79,7 +79,7 @@ static int16_t make_mode(int16_t lmstate) /* convert dlm lock-mode to gfs lock-state */ -int16_t gdlm_make_lmstate(int16_t dlmmode) +s16 gdlm_make_lmstate(s16 dlmmode) { switch (dlmmode) { case DLM_LOCK_IV: @@ -101,14 +101,14 @@ int16_t gdlm_make_lmstate(int16_t dlmmode) static void check_cur_state(struct gdlm_lock *lp, unsigned int cur_state) { - int16_t cur = make_mode(cur_state); + s16 cur = make_mode(cur_state); if (lp->cur != DLM_LOCK_IV) gdlm_assert(lp->cur == cur, "%d, %d", lp->cur, cur); } static inline unsigned int make_flags(struct gdlm_lock *lp, unsigned int gfs_flags, - int16_t cur, int16_t req) + s16 cur, s16 req) { unsigned int lkf = 0; diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h index 941063498532ba..c7b6e370258f60 100644 --- a/fs/gfs2/locking/dlm/lock_dlm.h +++ b/fs/gfs2/locking/dlm/lock_dlm.h @@ -56,7 +56,7 @@ enum { }; struct gdlm_ls { - uint32_t id; + u32 id; int jid; int first; int first_done; @@ -77,7 +77,7 @@ struct gdlm_ls { struct list_head delayed; struct list_head submit; struct list_head all_locks; - uint32_t all_locks_count; + u32 all_locks_count; wait_queue_head_t wait_control; struct task_struct *thread1; struct task_struct *thread2; @@ -109,10 +109,10 @@ struct gdlm_lock { char *lvb; struct dlm_lksb lksb; - int16_t cur; - int16_t req; - int16_t prev_req; - uint32_t lkf; /* dlm flags DLM_LKF_ */ + s16 cur; + s16 req; + s16 prev_req; + u32 lkf; /* dlm flags DLM_LKF_ */ unsigned long flags; /* lock_dlm flags LFL_ */ int bast_mode; /* protected by async_lock */ @@ -158,7 +158,7 @@ void gdlm_release_threads(struct gdlm_ls *); /* lock.c */ -int16_t gdlm_make_lmstate(int16_t); +s16 gdlm_make_lmstate(s16); void gdlm_queue_delayed(struct gdlm_lock *); void gdlm_submit_delayed(struct gdlm_ls *); int gdlm_release_all_locks(struct gdlm_ls *); diff --git a/fs/gfs2/locking/dlm/thread.c b/fs/gfs2/locking/dlm/thread.c index a782246d666bb7..d4895ec242f61d 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) { struct gdlm_ls *ls = lp->ls; struct lm_async_cb acb; - int16_t prev_mode = lp->cur; + s16 prev_mode = lp->cur; memset(&acb, 0, sizeof(acb)); diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 45ea3ec6f776e3..5713890128741e 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, void gfs2_ail1_start(struct gfs2_sbd *sdp, int flags) { struct list_head *head = &sdp->sd_ail1_list; - uint64_t sync_gen; + u64 sync_gen; struct list_head *first, *tmp; struct gfs2_ail *first_ai, *ai; @@ -205,10 +205,10 @@ void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks) up_read(&sdp->sd_log_flush_lock); } -static uint64_t log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) +static u64 log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) { int new = 0; - uint64_t dbn; + u64 dbn; int error; int bdy; @@ -287,7 +287,7 @@ static inline void log_incr_head(struct gfs2_sbd *sdp) struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp) { - uint64_t blkno = log_bmap(sdp, sdp->sd_log_flush_head); + u64 blkno = log_bmap(sdp, sdp->sd_log_flush_head); struct gfs2_log_buf *lb; struct buffer_head *bh; @@ -317,7 +317,7 @@ struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp) struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp, struct buffer_head *real) { - uint64_t blkno = log_bmap(sdp, sdp->sd_log_flush_head); + u64 blkno = log_bmap(sdp, sdp->sd_log_flush_head); struct gfs2_log_buf *lb; struct buffer_head *bh; @@ -361,13 +361,13 @@ static void log_pull_tail(struct gfs2_sbd *sdp, unsigned int new_tail, int pull) * Returns: the initialized log buffer descriptor */ -static void log_write_header(struct gfs2_sbd *sdp, uint32_t flags, int pull) +static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull) { - uint64_t blkno = log_bmap(sdp, sdp->sd_log_flush_head); + u64 blkno = log_bmap(sdp, sdp->sd_log_flush_head); struct buffer_head *bh; struct gfs2_log_header *lh; unsigned int tail; - uint32_t hash; + u32 hash; /* printk(KERN_INFO "log write header start (flags=%08x, pull=%d)\n", flags, pull); */ @@ -523,7 +523,7 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr) reserved += sdp->sd_log_commited_buf; if (sdp->sd_log_commited_revoke) reserved += gfs2_struct2blk(sdp, sdp->sd_log_commited_revoke, - sizeof(uint64_t)); + sizeof(u64)); if (reserved) reserved++; diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index e2c2582c8f6e04..456d6ad1049d51 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, struct gfs2_glock *gl = ip->i_gl; unsigned int blks = be32_to_cpu(ld->ld_data1); struct buffer_head *bh_log, *bh_ip; - uint64_t blkno; + u64 blkno; int error = 0; 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) ld->ld_header.mh_format = cpu_to_be32(GFS2_FORMAT_LD); ld->ld_type = cpu_to_be32(GFS2_LOG_DESC_REVOKE); ld->ld_length = cpu_to_be32(gfs2_struct2blk(sdp, sdp->sd_log_num_revoke, - sizeof(uint64_t))); + sizeof(u64))); ld->ld_data1 = cpu_to_be32(sdp->sd_log_num_revoke); ld->ld_data2 = cpu_to_be32(0); memset(ld->ld_reserved, 0, sizeof(ld->ld_reserved)); @@ -305,7 +305,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) list_del_init(&rv->rv_le.le_list); sdp->sd_log_num_revoke--; - if (offset + sizeof(uint64_t) > sdp->sd_sb.sb_bsize) { + if (offset + sizeof(u64) > sdp->sd_sb.sb_bsize) { set_buffer_dirty(bh); ll_rw_block(WRITE, 1, &bh); @@ -320,7 +320,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) *(__be64 *)(bh->b_data + offset) = cpu_to_be64(rv->rv_blkno); kfree(rv); - offset += sizeof(uint64_t); + offset += sizeof(u64); } gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); @@ -349,7 +349,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, unsigned int revokes = be32_to_cpu(ld->ld_data1); struct buffer_head *bh; unsigned int offset; - uint64_t blkno; + u64 blkno; int first = 1; int error; @@ -366,7 +366,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, if (!first) gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LB); - while (offset + sizeof(uint64_t) <= sdp->sd_sb.sb_bsize) { + while (offset + sizeof(u64) <= sdp->sd_sb.sb_bsize) { blkno = be64_to_cpu(*(__be64 *)(bh->b_data + offset)); error = gfs2_revoke_add(sdp, blkno, start); @@ -377,7 +377,7 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, if (!--revokes) break; - offset += sizeof(uint64_t); + offset += sizeof(u64); } brelse(bh); @@ -677,8 +677,8 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, struct gfs2_glock *gl = ip->i_gl; unsigned int blks = be32_to_cpu(ld->ld_data1); struct buffer_head *bh_log, *bh_ip; - uint64_t blkno; - uint64_t esc; + u64 blkno; + u64 esc; int error = 0; 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 3f6da00e2f5964..5b10379c20ebb5 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) struct list_head *head = &gl->gl_ail_list; struct gfs2_bufdata *bd; struct buffer_head *bh; - uint64_t blkno; + u64 blkno; int error; blocks = atomic_read(&gl->gl_ail_count); @@ -303,7 +303,7 @@ void gfs2_meta_sync(struct gfs2_glock *gl, int flags) */ static struct buffer_head *getbuf(struct gfs2_sbd *sdp, struct inode *aspace, - uint64_t blkno, int create) + u64 blkno, int create) { struct page *page; struct buffer_head *bh; @@ -366,7 +366,7 @@ static void meta_prep_new(struct buffer_head *bh) * Returns: The buffer */ -struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, uint64_t blkno) +struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno) { struct buffer_head *bh; 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) * Returns: errno */ -int gfs2_meta_read(struct gfs2_glock *gl, uint64_t blkno, int flags, +int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, struct buffer_head **bhp) { int error; @@ -549,7 +549,7 @@ void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, * */ -void gfs2_meta_wipe(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) +void gfs2_meta_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); 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) if (bd) { gfs2_log_lock(sdp); if (bd->bd_ail) { - uint64_t blkno = bh->b_blocknr; + u64 blkno = bh->b_blocknr; bd->bd_ail = NULL; list_del(&bd->bd_ail_st_list); list_del(&bd->bd_ail_gl_list); @@ -637,7 +637,7 @@ void gfs2_meta_cache_flush(struct gfs2_inode *ip) * Returns: errno */ -int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, uint64_t num, +int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, u64 num, int new, struct buffer_head **bhp) { 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, * */ -void gfs2_meta_ra(struct gfs2_glock *gl, uint64_t dblock, uint32_t extlen) +void gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen) { struct gfs2_sbd *sdp = gl->gl_sbd; struct inode *aspace = gl->gl_aspace; struct buffer_head *first_bh, *bh; - uint32_t max_ra = gfs2_tune_get(sdp, gt_max_readahead) >> + u32 max_ra = gfs2_tune_get(sdp, gt_max_readahead) >> sdp->sd_sb.sb_bsize_shift; int error; diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index 4ddc936aae16d1..9a9acc94029282 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); void gfs2_meta_inval(struct gfs2_glock *gl); void gfs2_meta_sync(struct gfs2_glock *gl, int flags); -struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, uint64_t blkno); -int gfs2_meta_read(struct gfs2_glock *gl, uint64_t blkno, +struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno); +int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags, struct buffer_head **bhp); int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags); @@ -55,10 +55,10 @@ void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh); void gfs2_unpin(struct gfs2_sbd *sdp, struct buffer_head *bh, struct gfs2_ail *ai); -void gfs2_meta_wipe(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen); +void gfs2_meta_wipe(struct gfs2_inode *ip, u64 bstart, u32 blen); void gfs2_meta_cache_flush(struct gfs2_inode *ip); -int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, uint64_t num, +int gfs2_meta_indirect_buffer(struct gfs2_inode *ip, int height, u64 num, int new, struct buffer_head **bhp); static 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, return gfs2_meta_indirect_buffer(ip, 0, ip->i_num.no_addr, 0, bhp); } -void gfs2_meta_ra(struct gfs2_glock *gl, uint64_t dblock, uint32_t extlen); +void gfs2_meta_ra(struct gfs2_glock *gl, u64 dblock, u32 extlen); void gfs2_meta_syncfs(struct gfs2_sbd *sdp); #endif /* __DIO_DOT_H__ */ diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 21ae9e4f0f6c00..ae9c46e75392b3 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, struct buffer_head *bh_result, int create) { int new = create; - uint64_t dblock; + u64 dblock; int error; int boundary; @@ -100,7 +100,7 @@ static int get_block_noalloc(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create) { int new = 0; - uint64_t dblock; + u64 dblock; int error; int boundary; @@ -510,10 +510,10 @@ static int gfs2_commit_write(struct file *file, struct page *page, gfs2_trans_add_bh(ip->i_gl, dibh, 1); if (gfs2_is_stuffed(ip)) { - uint64_t file_size; + u64 file_size; void *kaddr; - file_size = ((uint64_t)page->index << PAGE_CACHE_SHIFT) + to; + file_size = ((u64)page->index << PAGE_CACHE_SHIFT) + to; kaddr = kmap_atomic(page, KM_USER0); memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from, diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c index c94cbc8b6ef60a..cf826893dd5f88 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, switch (fh_type) { case 10: - parent.no_formal_ino = ((uint64_t)be32_to_cpu(fh[4])) << 32; + parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32; parent.no_formal_ino |= be32_to_cpu(fh[5]); - parent.no_addr = ((uint64_t)be32_to_cpu(fh[6])) << 32; + parent.no_addr = ((u64)be32_to_cpu(fh[6])) << 32; parent.no_addr |= be32_to_cpu(fh[7]); fh_obj.imode = be32_to_cpu(fh[8]); case 4: - this->no_formal_ino = ((uint64_t)be32_to_cpu(fh[0])) << 32; + this->no_formal_ino = ((u64)be32_to_cpu(fh[0])) << 32; this->no_formal_ino |= be32_to_cpu(fh[1]); - this->no_addr = ((uint64_t)be32_to_cpu(fh[2])) << 32; + this->no_addr = ((u64)be32_to_cpu(fh[2])) << 32; this->no_addr |= be32_to_cpu(fh[3]); break; default: @@ -118,7 +118,7 @@ struct get_name_filldir { }; static int get_name_filldir(void *opaque, const char *name, unsigned int length, - uint64_t offset, struct gfs2_inum *inum, + u64 offset, struct gfs2_inum *inum, unsigned int type) { struct get_name_filldir *gnfd = (struct get_name_filldir *)opaque; @@ -140,7 +140,7 @@ static int gfs2_get_name(struct dentry *parent, char *name, struct gfs2_inode *dip, *ip; struct get_name_filldir gnfd; struct gfs2_holder gh; - uint64_t offset = 0; + u64 offset = 0; int error; if (!dir) diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index 53ce7816dc1899..f5ddd496d3ecfc 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -47,7 +47,7 @@ struct filldir_bad_entry { char *fbe_name; unsigned int fbe_length; - uint64_t fbe_offset; + u64 fbe_offset; struct gfs2_inum fbe_inum; unsigned int fbe_type; }; @@ -161,7 +161,7 @@ static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin) */ static int filldir_reg_func(void *opaque, const char *name, unsigned int length, - uint64_t offset, struct gfs2_inum *inum, + u64 offset, struct gfs2_inum *inum, unsigned int type) { struct filldir_reg *fdr = (struct filldir_reg *)opaque; @@ -200,7 +200,7 @@ static int readdir_reg(struct file *file, void *dirent, filldir_t filldir) struct gfs2_inode *dip = GFS2_I(dir); struct filldir_reg fdr; struct gfs2_holder d_gh; - uint64_t offset = file->f_pos; + u64 offset = file->f_pos; int error; fdr.fdr_sbd = GFS2_SB(dir); @@ -239,7 +239,7 @@ static int readdir_reg(struct file *file, void *dirent, filldir_t filldir) */ static int filldir_bad_func(void *opaque, const char *name, unsigned int length, - uint64_t offset, struct gfs2_inum *inum, + u64 offset, struct gfs2_inum *inum, unsigned int type) { struct filldir_bad *fdb = (struct filldir_bad *)opaque; @@ -293,7 +293,7 @@ static int readdir_bad(struct file *file, void *dirent, filldir_t filldir) unsigned int entries, size; struct filldir_bad *fdb; struct gfs2_holder d_gh; - uint64_t offset = file->f_pos; + u64 offset = file->f_pos; unsigned int x; struct filldir_bad_entry *fbe; int error; diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index bd9b9957f707ba..c680f050e17f9d 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, if (!dip->i_di.di_nlink) goto out_gunlock; error = -EFBIG; - if (dip->i_di.di_entries == (uint32_t)-1) + if (dip->i_di.di_entries == (u32)-1) goto out_gunlock; error = -EPERM; if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) @@ -181,7 +181,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir, if (!ip->i_di.di_nlink) goto out_gunlock; error = -EMLINK; - if (ip->i_di.di_nlink == (uint32_t)-1) + if (ip->i_di.di_nlink == (u32)-1) goto out_gunlock; 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, struct gfs2_holder ghs[2]; struct inode *inode; struct buffer_head *dibh; - uint32_t major = 0, minor = 0; + u32 major = 0, minor = 0; int error; switch (mode & S_IFMT) { @@ -670,12 +670,12 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, error = -EINVAL; goto out_gunlock; } - if (ndip->i_di.di_entries == (uint32_t)-1) { + if (ndip->i_di.di_entries == (u32)-1) { error = -EFBIG; goto out_gunlock; } if (S_ISDIR(ip->i_di.di_mode) && - ndip->i_di.di_nlink == (uint32_t)-1) { + ndip->i_di.di_nlink == (u32)-1) { error = -EMLINK; goto out_gunlock; } @@ -911,7 +911,7 @@ static int setattr_chown(struct inode *inode, struct iattr *attr) struct gfs2_inode *ip = GFS2_I(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); struct buffer_head *dibh; - uint32_t ouid, ogid, nuid, ngid; + u32 ouid, ogid, nuid, ngid; int error; ouid = ip->i_di.di_uid; diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index 32ec8574ac8e34..3b3463144126fd 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) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); unsigned long index = page->index; - uint64_t lblock = index << (PAGE_CACHE_SHIFT - + u64 lblock = index << (PAGE_CACHE_SHIFT - sdp->sd_sb.sb_bsize_shift); unsigned int blocks = PAGE_CACHE_SIZE >> sdp->sd_sb.sb_bsize_shift; struct gfs2_alloc *al; @@ -101,7 +101,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) } for (x = 0; x < blocks; ) { - uint64_t dblock; + u64 dblock; unsigned int extlen; int new = 1; diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 572b92eac36712..f5830befc307ea 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -65,17 +65,17 @@ #define QUOTA_USER 1 #define QUOTA_GROUP 0 -static uint64_t qd2offset(struct gfs2_quota_data *qd) +static u64 qd2offset(struct gfs2_quota_data *qd) { - uint64_t offset; + u64 offset; - offset = 2 * (uint64_t)qd->qd_id + !test_bit(QDF_USER, &qd->qd_flags); + offset = 2 * (u64)qd->qd_id + !test_bit(QDF_USER, &qd->qd_flags); offset *= sizeof(struct gfs2_quota); return offset; } -static int qd_alloc(struct gfs2_sbd *sdp, int user, uint32_t id, +static int qd_alloc(struct gfs2_sbd *sdp, int user, u32 id, struct gfs2_quota_data **qdp) { struct gfs2_quota_data *qd; @@ -91,7 +91,7 @@ static int qd_alloc(struct gfs2_sbd *sdp, int user, uint32_t id, set_bit(QDF_USER, &qd->qd_flags); qd->qd_slot = -1; - error = gfs2_glock_get(sdp, 2 * (uint64_t)id + !user, + error = gfs2_glock_get(sdp, 2 * (u64)id + !user, &gfs2_quota_glops, CREATE, &qd->qd_gl); if (error) goto fail; @@ -110,7 +110,7 @@ fail: return error; } -static int qd_get(struct gfs2_sbd *sdp, int user, uint32_t id, int create, +static int qd_get(struct gfs2_sbd *sdp, int user, u32 id, int create, struct gfs2_quota_data **qdp) { struct gfs2_quota_data *qd = NULL, *new_qd = NULL; @@ -248,7 +248,7 @@ static int bh_get(struct gfs2_quota_data *qd) struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode); unsigned int block, offset; - uint64_t dblock; + u64 dblock; int new = 0; struct buffer_head *bh; int error; @@ -405,7 +405,7 @@ static void qd_unlock(struct gfs2_quota_data *qd) qd_put(qd); } -static int qdsb_get(struct gfs2_sbd *sdp, int user, uint32_t id, int create, +static int qdsb_get(struct gfs2_sbd *sdp, int user, u32 id, int create, struct gfs2_quota_data **qdp) { int error; @@ -438,7 +438,7 @@ static void qdsb_put(struct gfs2_quota_data *qd) qd_put(qd); } -int gfs2_quota_hold(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) +int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al = &ip->i_alloc; @@ -523,12 +523,12 @@ static int sort_qd(const void *a, const void *b) return ret; } -static void do_qc(struct gfs2_quota_data *qd, int64_t change) +static void do_qc(struct gfs2_quota_data *qd, s64 change) { struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode); struct gfs2_quota_change *qc = qd->qd_bh_qc; - int64_t x; + s64 x; mutex_lock(&sdp->sd_quota_mutex); 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) * in turn mostly borrowed from ext3 */ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc, - int64_t change, struct gfs2_quota_data *qd) + s64 change, struct gfs2_quota_data *qd) { struct inode *inode = &ip->i_inode; struct address_space *mapping = inode->i_mapping; @@ -811,7 +811,7 @@ fail: return error; } -int gfs2_quota_lock(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) +int gfs2_quota_lock(struct gfs2_inode *ip, u32 uid, u32 gid) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al = &ip->i_alloc; @@ -848,7 +848,7 @@ static int need_sync(struct gfs2_quota_data *qd) { struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; struct gfs2_tune *gt = &sdp->sd_tune; - int64_t value; + s64 value; unsigned int num, den; int do_sync = 1; @@ -873,7 +873,7 @@ static int need_sync(struct gfs2_quota_data *qd) value *= gfs2_jindex_size(sdp) * num; do_div(value, den); value += (s64)be64_to_cpu(qd->qd_qb.qb_value); - if (value < (int64_t)be64_to_cpu(qd->qd_qb.qb_limit)) + if (value < (s64)be64_to_cpu(qd->qd_qb.qb_limit)) do_sync = 0; } @@ -927,12 +927,12 @@ static int print_message(struct gfs2_quota_data *qd, char *type) return 0; } -int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) +int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al = &ip->i_alloc; struct gfs2_quota_data *qd; - int64_t value; + s64 value; unsigned int x; int error = 0; @@ -954,12 +954,12 @@ int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) value += qd->qd_change; spin_unlock(&sdp->sd_quota_spin); - if (be64_to_cpu(qd->qd_qb.qb_limit) && (int64_t)be64_to_cpu(qd->qd_qb.qb_limit) < value) { + if (be64_to_cpu(qd->qd_qb.qb_limit) && (s64)be64_to_cpu(qd->qd_qb.qb_limit) < value) { print_message(qd, "exceeded"); error = -EDQUOT; break; } else if (be64_to_cpu(qd->qd_qb.qb_warn) && - (int64_t)be64_to_cpu(qd->qd_qb.qb_warn) < value && + (s64)be64_to_cpu(qd->qd_qb.qb_warn) < value && time_after_eq(jiffies, qd->qd_last_warn + gfs2_tune_get(sdp, gt_quota_warn_period) * HZ)) { @@ -971,8 +971,8 @@ int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid) return error; } -void gfs2_quota_change(struct gfs2_inode *ip, int64_t change, - uint32_t uid, uint32_t gid) +void gfs2_quota_change(struct gfs2_inode *ip, s64 change, + u32 uid, u32 gid) { struct gfs2_alloc *al = &ip->i_alloc; struct gfs2_quota_data *qd; @@ -1038,7 +1038,7 @@ int gfs2_quota_sync(struct gfs2_sbd *sdp) return error; } -int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id) +int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id) { struct gfs2_quota_data *qd; struct gfs2_holder q_gh; @@ -1058,7 +1058,7 @@ int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id) } #if 0 -int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, +int gfs2_quota_read(struct gfs2_sbd *sdp, int user, u32 id, struct gfs2_quota *q) { struct gfs2_quota_data *qd; @@ -1100,8 +1100,8 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) unsigned int blocks = ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; unsigned int x, slot = 0; unsigned int found = 0; - uint64_t dblock; - uint32_t extlen = 0; + u64 dblock; + u32 extlen = 0; int error; if (!ip->i_di.di_size || diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h index 6702a56d49b539..d93c61c99365ef 100644 --- a/fs/gfs2/quota.h +++ b/fs/gfs2/quota.h @@ -10,20 +10,20 @@ #ifndef __QUOTA_DOT_H__ #define __QUOTA_DOT_H__ -#define NO_QUOTA_CHANGE ((uint32_t)-1) +#define NO_QUOTA_CHANGE ((u32)-1) -int gfs2_quota_hold(struct gfs2_inode *ip, uint32_t uid, uint32_t gid); +int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid); void gfs2_quota_unhold(struct gfs2_inode *ip); -int gfs2_quota_lock(struct gfs2_inode *ip, uint32_t uid, uint32_t gid); +int gfs2_quota_lock(struct gfs2_inode *ip, u32 uid, u32 gid); void gfs2_quota_unlock(struct gfs2_inode *ip); -int gfs2_quota_check(struct gfs2_inode *ip, uint32_t uid, uint32_t gid); -void gfs2_quota_change(struct gfs2_inode *ip, int64_t change, - uint32_t uid, uint32_t gid); +int gfs2_quota_check(struct gfs2_inode *ip, u32 uid, u32 gid); +void gfs2_quota_change(struct gfs2_inode *ip, s64 change, + u32 uid, u32 gid); int gfs2_quota_sync(struct gfs2_sbd *sdp); -int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, uint32_t id); +int gfs2_quota_refresh(struct gfs2_sbd *sdp, int user, u32 id); int gfs2_quota_init(struct gfs2_sbd *sdp); void gfs2_quota_scan(struct gfs2_sbd *sdp); diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index acafe4b4d6f064..ab55191926c3af 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, struct gfs2_inode *ip = GFS2_I(jd->jd_inode); struct gfs2_glock *gl = ip->i_gl; int new = 0; - uint64_t dblock; - uint32_t extlen; + u64 dblock; + u32 extlen; int error; 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, return error; } -int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) +int gfs2_revoke_add(struct gfs2_sbd *sdp, u64 blkno, unsigned int where) { struct list_head *head = &sdp->sd_revoke_list; struct gfs2_revoke_replay *rr; @@ -82,7 +82,7 @@ int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) return 1; } -int gfs2_revoke_check(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where) +int gfs2_revoke_check(struct gfs2_sbd *sdp, u64 blkno, unsigned int where) { struct gfs2_revoke_replay *rr; int wrap, a, b, revoke; @@ -137,7 +137,7 @@ static int get_log_header(struct gfs2_jdesc *jd, unsigned int blk, { struct buffer_head *bh; struct gfs2_log_header lh; - uint32_t hash; + u32 hash; int error; 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) int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head) { struct gfs2_log_header lh_1, lh_m; - uint32_t blk_1, blk_2, blk_m; + u32 blk_1, blk_2, blk_m; int error; blk_1 = 0; @@ -370,9 +370,9 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); unsigned int lblock; int new = 0; - uint64_t dblock; + u64 dblock; struct gfs2_log_header *lh; - uint32_t hash; + u32 hash; struct buffer_head *bh; int error; int boundary; diff --git a/fs/gfs2/recovery.h b/fs/gfs2/recovery.h index bed1a7857f6e47..1b35516b7591eb 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) int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, struct buffer_head **bh); -int gfs2_revoke_add(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where); -int gfs2_revoke_check(struct gfs2_sbd *sdp, uint64_t blkno, unsigned int where); +int gfs2_revoke_add(struct gfs2_sbd *sdp, u64 blkno, unsigned int where); +int gfs2_revoke_check(struct gfs2_sbd *sdp, u64 blkno, unsigned int where); void gfs2_revoke_clean(struct gfs2_sbd *sdp); int gfs2_find_jhead(struct gfs2_jdesc *jd, diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 62d0a84df98272..af49c8b82ffb87 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -60,7 +60,7 @@ static const char valid_change[16] = { */ static void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buffer, - unsigned int buflen, uint32_t block, + unsigned int buflen, u32 block, unsigned char new_state) { unsigned char *byte, *end, cur_state; @@ -90,7 +90,7 @@ static void gfs2_setbit(struct gfs2_rgrpd *rgd, unsigned char *buffer, */ static unsigned char gfs2_testbit(struct gfs2_rgrpd *rgd, unsigned char *buffer, - unsigned int buflen, uint32_t block) + unsigned int buflen, u32 block) { unsigned char *byte, *end, cur_state; unsigned int bit; @@ -122,12 +122,12 @@ static unsigned char gfs2_testbit(struct gfs2_rgrpd *rgd, unsigned char *buffer, * Return: the block number (bitmap buffer scope) that was found */ -static uint32_t gfs2_bitfit(struct gfs2_rgrpd *rgd, unsigned char *buffer, - unsigned int buflen, uint32_t goal, +static u32 gfs2_bitfit(struct gfs2_rgrpd *rgd, unsigned char *buffer, + unsigned int buflen, u32 goal, unsigned char old_state) { unsigned char *byte, *end, alloc; - uint32_t blk = goal; + u32 blk = goal; unsigned int bit; byte = buffer + (goal / GFS2_NBBY); @@ -169,7 +169,7 @@ static uint32_t gfs2_bitfit(struct gfs2_rgrpd *rgd, unsigned char *buffer, * Returns: The number of bits */ -static uint32_t gfs2_bitcount(struct gfs2_rgrpd *rgd, unsigned char *buffer, +static u32 gfs2_bitcount(struct gfs2_rgrpd *rgd, unsigned char *buffer, unsigned int buflen, unsigned char state) { unsigned char *byte = buffer; @@ -177,7 +177,7 @@ static uint32_t gfs2_bitcount(struct gfs2_rgrpd *rgd, unsigned char *buffer, unsigned char state1 = state << 2; unsigned char state2 = state << 4; unsigned char state3 = state << 6; - uint32_t count = 0; + u32 count = 0; for (; byte < end; byte++) { if (((*byte) & 0x03) == state) @@ -204,11 +204,11 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd) { struct gfs2_sbd *sdp = rgd->rd_sbd; struct gfs2_bitmap *bi = NULL; - uint32_t length = rgd->rd_ri.ri_length; - uint32_t count[4], tmp; + u32 length = rgd->rd_ri.ri_length; + u32 count[4], tmp; int buf, x; - memset(count, 0, 4 * sizeof(uint32_t)); + memset(count, 0, 4 * sizeof(u32)); /* Count # blocks in each of 4 possible allocation states */ for (buf = 0; buf < length; buf++) { @@ -253,10 +253,10 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd) } -static inline int rgrp_contains_block(struct gfs2_rindex *ri, uint64_t block) +static inline int rgrp_contains_block(struct gfs2_rindex *ri, u64 block) { - uint64_t first = ri->ri_data0; - uint64_t last = first + ri->ri_data; + u64 first = ri->ri_data0; + u64 last = first + ri->ri_data; return !!(first <= block && block < last); } @@ -268,7 +268,7 @@ static inline int rgrp_contains_block(struct gfs2_rindex *ri, uint64_t block) * Returns: The resource group, or NULL if not found */ -struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, uint64_t blk) +struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk) { struct gfs2_rgrpd *rgd; @@ -367,8 +367,8 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd) { struct gfs2_sbd *sdp = rgd->rd_sbd; struct gfs2_bitmap *bi; - uint32_t length = rgd->rd_ri.ri_length; /* # blocks in hdr & bitmap */ - uint32_t bytes_left, bytes; + u32 length = rgd->rd_ri.ri_length; /* # blocks in hdr & bitmap */ + u32 bytes_left, bytes; int x; if (!length) @@ -444,7 +444,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) struct gfs2_rgrpd *rgd; char buf[sizeof(struct gfs2_rindex)]; struct file_ra_state ra_state; - uint64_t junk = ip->i_di.di_size; + u64 junk = ip->i_di.di_size; int error; 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) */ static struct gfs2_rgrpd *recent_rgrp_first(struct gfs2_sbd *sdp, - uint64_t rglast) + u64 rglast) { struct gfs2_rgrpd *rgd = NULL; @@ -1037,10 +1037,10 @@ void gfs2_inplace_release(struct gfs2_inode *ip) * Returns: The block type (GFS2_BLKST_*) */ -unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block) +unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block) { struct gfs2_bitmap *bi = NULL; - uint32_t length, rgrp_block, buf_block; + u32 length, rgrp_block, buf_block; unsigned int buf; unsigned char type; @@ -1083,12 +1083,12 @@ unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block) * Returns: the block number allocated */ -static uint32_t rgblk_search(struct gfs2_rgrpd *rgd, uint32_t goal, +static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal, unsigned char old_state, unsigned char new_state) { struct gfs2_bitmap *bi = NULL; - uint32_t length = rgd->rd_ri.ri_length; - uint32_t blk = 0; + u32 length = rgd->rd_ri.ri_length; + u32 blk = 0; unsigned int buf, x; /* 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, * Returns: Resource group containing the block(s) */ -static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, uint64_t bstart, - uint32_t blen, unsigned char new_state) +static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, u64 bstart, + u32 blen, unsigned char new_state) { struct gfs2_rgrpd *rgd; struct gfs2_bitmap *bi = NULL; - uint32_t length, rgrp_blk, buf_blk; + u32 length, rgrp_blk, buf_blk; unsigned int buf; rgd = gfs2_blk2rgrpd(sdp, bstart); @@ -1206,8 +1206,8 @@ u64 gfs2_alloc_data(struct gfs2_inode *ip) struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al = &ip->i_alloc; struct gfs2_rgrpd *rgd = al->al_rgd; - uint32_t goal, blk; - uint64_t block; + u32 goal, blk; + u64 block; if (rgrp_contains_block(&rgd->rd_ri, ip->i_di.di_goal_data)) goal = ip->i_di.di_goal_data - rgd->rd_ri.ri_data0; @@ -1250,8 +1250,8 @@ u64 gfs2_alloc_meta(struct gfs2_inode *ip) struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_alloc *al = &ip->i_alloc; struct gfs2_rgrpd *rgd = al->al_rgd; - uint32_t goal, blk; - uint64_t block; + u32 goal, blk; + u64 block; if (rgrp_contains_block(&rgd->rd_ri, ip->i_di.di_goal_meta)) 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) * */ -void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) +void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_rgrpd *rgd; @@ -1349,7 +1349,7 @@ void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) gfs2_trans_add_rg(rgd); gfs2_statfs_change(sdp, 0, +blen, 0); - gfs2_quota_change(ip, -(int64_t)blen, + gfs2_quota_change(ip, -(s64)blen, ip->i_di.di_uid, ip->i_di.di_gid); } @@ -1361,7 +1361,7 @@ void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) * */ -void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) +void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_rgrpd *rgd; @@ -1378,7 +1378,7 @@ void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) gfs2_trans_add_rg(rgd); gfs2_statfs_change(sdp, 0, +blen, 0); - gfs2_quota_change(ip, -(int64_t)blen, ip->i_di.di_uid, ip->i_di.di_gid); + gfs2_quota_change(ip, -(s64)blen, ip->i_di.di_uid, ip->i_di.di_gid); gfs2_meta_wipe(ip, bstart, blen); } @@ -1397,7 +1397,7 @@ void gfs2_unlink_di(struct inode *inode) gfs2_trans_add_rg(rgd); } -static void gfs2_free_uninit_di(struct gfs2_rgrpd *rgd, uint64_t blkno) +static void gfs2_free_uninit_di(struct gfs2_rgrpd *rgd, u64 blkno) { struct gfs2_sbd *sdp = rgd->rd_sbd; struct gfs2_rgrpd *tmp_rgd; @@ -1440,7 +1440,7 @@ void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip) */ void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, - uint64_t block) + u64 block) { struct gfs2_rgrpd *rgd; struct gfs2_rgrpd **tmp; diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index f94761bf34605c..3d6ae37e85df26 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h @@ -12,7 +12,7 @@ void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd); -struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, uint64_t blk); +struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk); struct gfs2_rgrpd *gfs2_rgrpd_get_first(struct gfs2_sbd *sdp); struct gfs2_rgrpd *gfs2_rgrpd_get_next(struct gfs2_rgrpd *rgd); @@ -35,14 +35,14 @@ gfs2_inplace_reserve_i((ip), __FILE__, __LINE__) void gfs2_inplace_release(struct gfs2_inode *ip); -unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, uint64_t block); +unsigned char gfs2_get_block_type(struct gfs2_rgrpd *rgd, u64 block); u64 gfs2_alloc_data(struct gfs2_inode *ip); u64 gfs2_alloc_meta(struct gfs2_inode *ip); u64 gfs2_alloc_di(struct gfs2_inode *ip, u64 *generation); -void gfs2_free_data(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen); -void gfs2_free_meta(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen); +void gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen); +void gfs2_free_meta(struct gfs2_inode *ip, u64 bstart, u32 blen); void gfs2_free_di(struct gfs2_rgrpd *rgd, struct gfs2_inode *ip); void gfs2_unlink_di(struct inode *inode); @@ -54,7 +54,7 @@ struct gfs2_rgrp_list { }; void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, - uint64_t block); + u64 block); void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state, int flags); void gfs2_rlist_free(struct gfs2_rgrp_list *rlist); diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 520266c2044b28..f1d07d987c7bfd 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -33,11 +33,11 @@ #include "trans.h" #include "util.h" -static const uint32_t gfs2_old_fs_formats[] = { +static const u32 gfs2_old_fs_formats[] = { 0 }; -static const uint32_t gfs2_old_multihost_formats[] = { +static const u32 gfs2_old_multihost_formats[] = { 0 }; @@ -225,8 +225,8 @@ static struct page *gfs2_read_super(struct super_block *sb, sector_t sector) int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) { - uint32_t hash_blocks, ind_blocks, leaf_blocks; - uint32_t tmp_blocks; + u32 hash_blocks, ind_blocks, leaf_blocks; + u32 tmp_blocks; unsigned int x; int error; struct page *page; @@ -251,20 +251,20 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) GFS2_BASIC_BLOCK_SHIFT; sdp->sd_fsb2bb = 1 << sdp->sd_fsb2bb_shift; sdp->sd_diptrs = (sdp->sd_sb.sb_bsize - - sizeof(struct gfs2_dinode)) / sizeof(uint64_t); + sizeof(struct gfs2_dinode)) / sizeof(u64); sdp->sd_inptrs = (sdp->sd_sb.sb_bsize - - sizeof(struct gfs2_meta_header)) / sizeof(uint64_t); + sizeof(struct gfs2_meta_header)) / sizeof(u64); sdp->sd_jbsize = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header); sdp->sd_hash_bsize = sdp->sd_sb.sb_bsize / 2; sdp->sd_hash_bsize_shift = sdp->sd_sb.sb_bsize_shift - 1; - sdp->sd_hash_ptrs = sdp->sd_hash_bsize / sizeof(uint64_t); + sdp->sd_hash_ptrs = sdp->sd_hash_bsize / sizeof(u64); sdp->sd_qc_per_block = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header)) / sizeof(struct gfs2_quota_change); /* Compute maximum reservation required to add a entry to a directory */ - hash_blocks = DIV_ROUND_UP(sizeof(uint64_t) * (1 << GFS2_DIR_MAX_DEPTH), + hash_blocks = DIV_ROUND_UP(sizeof(u64) * (1 << GFS2_DIR_MAX_DEPTH), sdp->sd_jbsize); ind_blocks = 0; @@ -281,8 +281,8 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) sizeof(struct gfs2_dinode); sdp->sd_heightsize[1] = sdp->sd_sb.sb_bsize * sdp->sd_diptrs; for (x = 2;; x++) { - uint64_t space, d; - uint32_t m; + u64 space, d; + u32 m; space = sdp->sd_heightsize[x - 1] * sdp->sd_inptrs; d = space; @@ -299,8 +299,8 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) sizeof(struct gfs2_dinode); sdp->sd_jheightsize[1] = sdp->sd_jbsize * sdp->sd_diptrs; for (x = 2;; x++) { - uint64_t space, d; - uint32_t m; + u64 space, d; + u32 m; space = sdp->sd_jheightsize[x - 1] * sdp->sd_inptrs; d = space; @@ -630,8 +630,8 @@ out: return 0; } -void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, - int64_t dinodes) +void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free, + s64 dinodes) { struct gfs2_inode *l_ip = GFS2_I(sdp->sd_sc_inode); struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index 4a6ce9582743be..b073300a93e812 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -40,7 +40,7 @@ int gfs2_make_fs_ro(struct gfs2_sbd *sdp); int gfs2_statfs_init(struct gfs2_sbd *sdp); void gfs2_statfs_change(struct gfs2_sbd *sdp, - int64_t total, int64_t free, int64_t dinodes); + s64 total, s64 free, s64 dinodes); int gfs2_statfs_sync(struct gfs2_sbd *sdp); int gfs2_statfs_i(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc); int 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 79199738c3891c..8aefda22f98eda 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, static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { - uint32_t id; + u32 id; if (!capable(CAP_SYS_ADMIN)) return -EACCES; @@ -152,7 +152,7 @@ static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { - uint32_t id; + u32 id; if (!capable(CAP_SYS_ADMIN)) return -EACCES; diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 8e18e634cbedcb..acf840160d5f75 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, tr->tr_reserved += 6 + blocks; if (revokes) tr->tr_reserved += gfs2_struct2blk(sdp, revokes, - sizeof(uint64_t)); + sizeof(u64)); INIT_LIST_HEAD(&tr->tr_list_buf); 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) lops_add(sdp, &bd->bd_le); } -void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, uint64_t blkno) +void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, u64 blkno) { struct gfs2_revoke *rv = kmalloc(sizeof(struct gfs2_revoke), GFP_NOFS | __GFP_NOFAIL); @@ -151,7 +151,7 @@ void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, uint64_t blkno) lops_add(sdp, &rv->rv_le); } -void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, uint64_t blkno) +void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno) { struct gfs2_revoke *rv; int found = 0; diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h index 9e3ce84f6102f7..6550d3d18263fd 100644 --- a/fs/gfs2/trans.h +++ b/fs/gfs2/trans.h @@ -27,8 +27,8 @@ void gfs2_trans_end(struct gfs2_sbd *sdp); void gfs2_trans_add_gl(struct gfs2_glock *gl); void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta); -void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, uint64_t blkno); -void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, uint64_t blkno); +void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, u64 blkno); +void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno); void gfs2_trans_add_rg(struct gfs2_rgrpd *rgd); #endif /* __TRANS_DOT_H__ */ diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 2852431764c915..d72eb8addc7a03 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, */ int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, - uint16_t type, uint16_t t, const char *function, + u16 type, u16 t, const char *function, char *file, unsigned int line) { int me; diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 60b370365eea6c..204fdb81e34de5 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, char *file, unsigned int line) { struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; - uint32_t magic = mh->mh_magic; + u32 magic = mh->mh_magic; magic = be32_to_cpu(magic); if (unlikely(magic != GFS2_MAGIC)) return gfs2_meta_check_ii(sdp, bh, "magic number", function, @@ -95,19 +95,19 @@ gfs2_meta_check_i((sdp), (bh), __FUNCTION__, __FILE__, __LINE__) int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, - uint16_t type, uint16_t t, + u16 type, u16 t, const char *function, char *file, unsigned int line); static inline int gfs2_metatype_check_i(struct gfs2_sbd *sdp, struct buffer_head *bh, - uint16_t type, + u16 type, const char *function, char *file, unsigned int line) { struct gfs2_meta_header *mh = (struct gfs2_meta_header *)bh->b_data; - uint32_t magic = mh->mh_magic; - uint16_t t = be32_to_cpu(mh->mh_type); + u32 magic = mh->mh_magic; + u16 t = be32_to_cpu(mh->mh_type); magic = be32_to_cpu(magic); if (unlikely(magic != GFS2_MAGIC)) 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, #define gfs2_metatype_check(sdp, bh, type) \ gfs2_metatype_check_i((sdp), (bh), (type), __FUNCTION__, __FILE__, __LINE__) -static inline void gfs2_metatype_set(struct buffer_head *bh, uint16_t type, - uint16_t format) +static inline void gfs2_metatype_set(struct buffer_head *bh, u16 type, + u16 format) { struct gfs2_meta_header *mh; mh = (struct gfs2_meta_header *)bh->b_data; -- cgit 1.2.3-korg From f2f7ba5237e2fe10ba3e328a4f728b9e1ff141da Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 5 Sep 2006 10:39:21 -0400 Subject: [GFS2] Make headers compile on their own As per Jan Engelhardt's comments, this should make all the headers compile on their own by including and/or declaring structures early. Cc: Jan Engelhardt Signed-off-by: Steven Whitehouse --- fs/gfs2/acl.h | 2 ++ fs/gfs2/bmap.h | 4 ++++ fs/gfs2/dir.h | 6 ++++++ fs/gfs2/eaops.h | 1 + fs/gfs2/eattr.h | 3 +++ fs/gfs2/glock.h | 2 ++ fs/gfs2/glops.h | 2 ++ fs/gfs2/incore.h | 2 ++ fs/gfs2/lm.h | 2 ++ fs/gfs2/log.h | 4 ++++ fs/gfs2/lops.h | 3 +++ fs/gfs2/meta_io.h | 4 ++++ fs/gfs2/mount.h | 2 ++ fs/gfs2/ops_address.h | 4 ++++ fs/gfs2/ops_dentry.h | 2 ++ fs/gfs2/ops_file.h | 4 ++++ fs/gfs2/ops_fstype.h | 2 ++ fs/gfs2/ops_inode.h | 2 ++ fs/gfs2/ops_super.h | 2 ++ fs/gfs2/ops_vm.h | 2 ++ fs/gfs2/quota.h | 3 +++ fs/gfs2/recovery.h | 2 ++ fs/gfs2/rgrp.h | 4 ++++ fs/gfs2/super.h | 2 ++ fs/gfs2/sys.h | 3 +++ fs/gfs2/trans.h | 9 +++++++-- fs/gfs2/util.h | 1 + 27 files changed, 77 insertions(+), 2 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/acl.h b/fs/gfs2/acl.h index 5856ba764680db..05c294fe0d780f 100644 --- a/fs/gfs2/acl.h +++ b/fs/gfs2/acl.h @@ -10,6 +10,8 @@ #ifndef __ACL_DOT_H__ #define __ACL_DOT_H__ +#include "incore.h" + #define GFS2_POSIX_ACL_ACCESS "posix_acl_access" #define GFS2_POSIX_ACL_ACCESS_LEN 16 #define GFS2_POSIX_ACL_DEFAULT "posix_acl_default" diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index cb3b624fea3132..503f1cdda29097 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -10,6 +10,10 @@ #ifndef __BMAP_DOT_H__ #define __BMAP_DOT_H__ +struct inode; +struct gfs2_inode; +struct page; + int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page); int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary); int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h index d32449f0839c83..371233419b0730 100644 --- a/fs/gfs2/dir.h +++ b/fs/gfs2/dir.h @@ -10,6 +10,12 @@ #ifndef __DIR_DOT_H__ #define __DIR_DOT_H__ +#include + +struct inode; +struct gfs2_inode; +struct gfs2_inum; + /** * gfs2_filldir_t - Report a directory entry to the caller of gfs2_dir_read() * @opaque: opaque data used by the function diff --git a/fs/gfs2/eaops.h b/fs/gfs2/eaops.h index 1c27700ee8b868..b045897e1e838b 100644 --- a/fs/gfs2/eaops.h +++ b/fs/gfs2/eaops.h @@ -11,6 +11,7 @@ #define __EAOPS_DOT_H__ struct gfs2_ea_request; +struct gfs2_inode; struct gfs2_eattr_operations { int (*eo_get) (struct gfs2_inode *ip, struct gfs2_ea_request *er); diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index 85c70c335c59c4..cb7c2d846765db 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -10,6 +10,9 @@ #ifndef __EATTR_DOT_H__ #define __EATTR_DOT_H__ +struct gfs2_inode; +struct iattr; + #define GFS2_EA_REC_LEN(ea) be32_to_cpu((ea)->ea_rec_len) #define GFS2_EA_DATA_LEN(ea) be32_to_cpu((ea)->ea_data_len) diff --git a/fs/gfs2/glock.h b/fs/gfs2/glock.h index 4762cdb04f64ac..2e1d3286632101 100644 --- a/fs/gfs2/glock.h +++ b/fs/gfs2/glock.h @@ -10,6 +10,8 @@ #ifndef __GLOCK_DOT_H__ #define __GLOCK_DOT_H__ +#include "incore.h" + /* Flags for lock requests; used in gfs2_holder gh_flag field. From lm_interface.h: #define LM_FLAG_TRY 0x00000001 diff --git a/fs/gfs2/glops.h b/fs/gfs2/glops.h index ba943e4736658b..a1d9b5b024e633 100644 --- a/fs/gfs2/glops.h +++ b/fs/gfs2/glops.h @@ -10,6 +10,8 @@ #ifndef __GLOPS_DOT_H__ #define __GLOPS_DOT_H__ +#include "incore.h" + extern const struct gfs2_glock_operations gfs2_meta_glops; extern const struct gfs2_glock_operations gfs2_inode_glops; extern const struct gfs2_glock_operations gfs2_rgrp_glops; diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 407afd18fa2eef..225924ca6b3ef6 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -10,6 +10,8 @@ #ifndef __INCORE_DOT_H__ #define __INCORE_DOT_H__ +#include + #define DIO_FORCE 0x00000001 #define DIO_CLEAN 0x00000002 #define DIO_DIRTY 0x00000004 diff --git a/fs/gfs2/lm.h b/fs/gfs2/lm.h index dbef88852ef300..6b890e73e6c1c7 100644 --- a/fs/gfs2/lm.h +++ b/fs/gfs2/lm.h @@ -10,6 +10,8 @@ #ifndef __LM_DOT_H__ #define __LM_DOT_H__ +struct gfs2_sbd; + #define GFS2_MIN_LVB_SIZE 32 int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent); diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h index 80764e388bb2cb..7f5737d5561288 100644 --- a/fs/gfs2/log.h +++ b/fs/gfs2/log.h @@ -10,6 +10,10 @@ #ifndef __LOG_DOT_H__ #define __LOG_DOT_H__ +#include +#include +#include "incore.h" + /** * gfs2_log_lock - acquire the right to mess with the log manager * @sdp: the filesystem diff --git a/fs/gfs2/lops.h b/fs/gfs2/lops.h index 2e3365c2b1019f..5839c05ae6be29 100644 --- a/fs/gfs2/lops.h +++ b/fs/gfs2/lops.h @@ -10,6 +10,9 @@ #ifndef __LOPS_DOT_H__ #define __LOPS_DOT_H__ +#include +#include "incore.h" + extern const struct gfs2_log_operations gfs2_glock_lops; extern const struct gfs2_log_operations gfs2_buf_lops; extern const struct gfs2_log_operations gfs2_revoke_lops; diff --git a/fs/gfs2/meta_io.h b/fs/gfs2/meta_io.h index 9a9acc94029282..086a472df3f1af 100644 --- a/fs/gfs2/meta_io.h +++ b/fs/gfs2/meta_io.h @@ -10,6 +10,10 @@ #ifndef __DIO_DOT_H__ #define __DIO_DOT_H__ +#include +#include +#include "incore.h" + static inline void gfs2_buffer_clear(struct buffer_head *bh) { memset(bh->b_data, 0, bh->b_size); diff --git a/fs/gfs2/mount.h b/fs/gfs2/mount.h index 8a21897b63e58c..401288acfdf315 100644 --- a/fs/gfs2/mount.h +++ b/fs/gfs2/mount.h @@ -10,6 +10,8 @@ #ifndef __MOUNT_DOT_H__ #define __MOUNT_DOT_H__ +struct gfs2_sbd; + int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount); #endif /* __MOUNT_DOT_H__ */ diff --git a/fs/gfs2/ops_address.h b/fs/gfs2/ops_address.h index 6c07aa2bd98a72..35aaee4aa7e132 100644 --- a/fs/gfs2/ops_address.h +++ b/fs/gfs2/ops_address.h @@ -10,6 +10,10 @@ #ifndef __OPS_ADDRESS_DOT_H__ #define __OPS_ADDRESS_DOT_H__ +#include +#include +#include + extern const struct address_space_operations gfs2_file_aops; extern int gfs2_get_block(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create); diff --git a/fs/gfs2/ops_dentry.h b/fs/gfs2/ops_dentry.h index e7b05e5c62ec51..5caa3db4d3f555 100644 --- a/fs/gfs2/ops_dentry.h +++ b/fs/gfs2/ops_dentry.h @@ -10,6 +10,8 @@ #ifndef __OPS_DENTRY_DOT_H__ #define __OPS_DENTRY_DOT_H__ +#include + extern struct dentry_operations gfs2_dops; #endif /* __OPS_DENTRY_DOT_H__ */ diff --git a/fs/gfs2/ops_file.h b/fs/gfs2/ops_file.h index b1c1bf838ec931..ce319f89ec8e9a 100644 --- a/fs/gfs2/ops_file.h +++ b/fs/gfs2/ops_file.h @@ -9,6 +9,10 @@ #ifndef __OPS_FILE_DOT_H__ #define __OPS_FILE_DOT_H__ + +#include +struct gfs2_inode; + extern struct file gfs2_internal_file_sentinel; extern int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state, diff --git a/fs/gfs2/ops_fstype.h b/fs/gfs2/ops_fstype.h index b85ecce3ca6bea..7cc2c296271be2 100644 --- a/fs/gfs2/ops_fstype.h +++ b/fs/gfs2/ops_fstype.h @@ -10,6 +10,8 @@ #ifndef __OPS_FSTYPE_DOT_H__ #define __OPS_FSTYPE_DOT_H__ +#include + extern struct file_system_type gfs2_fs_type; extern struct file_system_type gfs2meta_fs_type; diff --git a/fs/gfs2/ops_inode.h b/fs/gfs2/ops_inode.h index 6f4b54783d29bd..b15acb4fd34c9b 100644 --- a/fs/gfs2/ops_inode.h +++ b/fs/gfs2/ops_inode.h @@ -10,6 +10,8 @@ #ifndef __OPS_INODE_DOT_H__ #define __OPS_INODE_DOT_H__ +#include + extern struct inode_operations gfs2_file_iops; extern struct inode_operations gfs2_dir_iops; extern struct inode_operations gfs2_symlink_iops; diff --git a/fs/gfs2/ops_super.h b/fs/gfs2/ops_super.h index cbc4f73e9a926b..9de73f042f78a5 100644 --- a/fs/gfs2/ops_super.h +++ b/fs/gfs2/ops_super.h @@ -10,6 +10,8 @@ #ifndef __OPS_SUPER_DOT_H__ #define __OPS_SUPER_DOT_H__ +#include + extern struct super_operations gfs2_super_ops; #endif /* __OPS_SUPER_DOT_H__ */ diff --git a/fs/gfs2/ops_vm.h b/fs/gfs2/ops_vm.h index d5ba4b9c50fdf4..4ae8f43ed5e35d 100644 --- a/fs/gfs2/ops_vm.h +++ b/fs/gfs2/ops_vm.h @@ -10,6 +10,8 @@ #ifndef __OPS_VM_DOT_H__ #define __OPS_VM_DOT_H__ +#include + extern struct vm_operations_struct gfs2_vm_ops_private; extern struct vm_operations_struct gfs2_vm_ops_sharewrite; diff --git a/fs/gfs2/quota.h b/fs/gfs2/quota.h index d93c61c99365ef..a8be1417051f9b 100644 --- a/fs/gfs2/quota.h +++ b/fs/gfs2/quota.h @@ -10,6 +10,9 @@ #ifndef __QUOTA_DOT_H__ #define __QUOTA_DOT_H__ +struct gfs2_inode; +struct gfs2_sbd; + #define NO_QUOTA_CHANGE ((u32)-1) int gfs2_quota_hold(struct gfs2_inode *ip, u32 uid, u32 gid); diff --git a/fs/gfs2/recovery.h b/fs/gfs2/recovery.h index 1b35516b7591eb..961feedf4d8bb0 100644 --- a/fs/gfs2/recovery.h +++ b/fs/gfs2/recovery.h @@ -10,6 +10,8 @@ #ifndef __RECOVERY_DOT_H__ #define __RECOVERY_DOT_H__ +#include "incore.h" + static inline void gfs2_replay_incr_blk(struct gfs2_sbd *sdp, unsigned int *blk) { if (++*blk == sdp->sd_jdesc->jd_blocks) diff --git a/fs/gfs2/rgrp.h b/fs/gfs2/rgrp.h index 3d6ae37e85df26..3558957673876f 100644 --- a/fs/gfs2/rgrp.h +++ b/fs/gfs2/rgrp.h @@ -10,6 +10,10 @@ #ifndef __RGRP_DOT_H__ #define __RGRP_DOT_H__ +struct gfs2_rgrpd; +struct gfs2_sbd; +struct gfs2_holder; + void gfs2_rgrp_verify(struct gfs2_rgrpd *rgd); struct gfs2_rgrpd *gfs2_blk2rgrpd(struct gfs2_sbd *sdp, u64 blk); diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index b073300a93e812..5fa5119cfba653 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -10,6 +10,8 @@ #ifndef __SUPER_DOT_H__ #define __SUPER_DOT_H__ +#include "incore.h" + void gfs2_tune_init(struct gfs2_tune *gt); int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent); diff --git a/fs/gfs2/sys.h b/fs/gfs2/sys.h index f8c01b50bfba3f..1ca8cdac5304bb 100644 --- a/fs/gfs2/sys.h +++ b/fs/gfs2/sys.h @@ -10,6 +10,9 @@ #ifndef __SYS_DOT_H__ #define __SYS_DOT_H__ +#include +struct gfs2_sbd; + /* Allow args to be passed to GFS2 when using an initial ram disk */ extern char *gfs2_sys_margs; extern spinlock_t gfs2_sys_margs_lock; diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h index 6550d3d18263fd..23d4cbe1de5b7b 100644 --- a/fs/gfs2/trans.h +++ b/fs/gfs2/trans.h @@ -10,6 +10,11 @@ #ifndef __TRANS_DOT_H__ #define __TRANS_DOT_H__ +#include +struct gfs2_sbd; +struct gfs2_rgrpd; +struct gfs2_glock; + #define RES_DINODE 1 #define RES_INDIRECT 1 #define RES_JDATA 1 @@ -20,8 +25,8 @@ #define RES_STATFS 1 #define RES_QUOTA 2 -int gfs2_trans_begin(struct gfs2_sbd *sdp, - unsigned int blocks, unsigned int revokes); +int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, + unsigned int revokes); void gfs2_trans_end(struct gfs2_sbd *sdp); diff --git a/fs/gfs2/util.h b/fs/gfs2/util.h index 204fdb81e34de5..76a50899fe9e22 100644 --- a/fs/gfs2/util.h +++ b/fs/gfs2/util.h @@ -10,6 +10,7 @@ #ifndef __UTIL_DOT_H__ #define __UTIL_DOT_H__ +#include "incore.h" #define fs_printk(level, fs, fmt, arg...) \ printk(level "GFS2: fsid=%s: " fmt , (fs)->sd_fsname , ## arg) -- cgit 1.2.3-korg From 7a6bbacbb8dec6fbd1242c959250388f907d429e Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 18 Sep 2006 17:18:23 -0400 Subject: [GFS2] Map multiple blocks at once where possible This is a tidy up of the GFS2 bmap code. The main change is that the bh is passed to gfs2_block_map allowing the flags to be set directly rather than having to repeat that code several times in ops_address.c. At the same time, the extent mapping code from gfs2_extent_map has been moved into gfs2_block_map. This allows all calls to gfs2_block_map to map extents in the case that no allocation is taking place. As a result reads and non-allocating writes should be faster. A quick test with postmark appears to support this. There is a limit on the number of blocks mapped in a single bmap call in that it will only ever map blocks which are pointed to from a single pointer block. So in other words, it will never try to do additional i/o in order to satisfy read-ahead. The maximum number of blocks is thus somewhat less than 512 (the GFS2 4k block size minus the header divided by sizeof(u64)). I've further limited the mapping of "normal" blocks to 32 blocks (to avoid extra work) since readpages() will currently read a maximum of 32 blocks ahead (128k). Some further work will probably be needed to set a suitable value for DIO as well, but for now thats left at the maximum 512 (see ops_address.c:gfs2_get_block_direct). There is probably a lot more that can be done to improve bmap for GFS2, but this is a good first step. Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 131 ++++++++++++++++++++++++-------------------------- fs/gfs2/bmap.h | 2 +- fs/gfs2/log.c | 14 +++--- fs/gfs2/ops_address.c | 68 ++++++-------------------- fs/gfs2/quota.c | 8 ++- fs/gfs2/recovery.c | 10 ++-- 6 files changed, 92 insertions(+), 141 deletions(-) (limited to 'fs/gfs2/bmap.h') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 57caad7bc0d5d4..cc91e482eda00d 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -423,8 +423,7 @@ static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, * gfs2_block_pointers - Map a block from an inode to a disk block * @inode: The inode * @lblock: The logical block number - * @new: Value/Result argument (1 = may create/did create new blocks) - * @boundary: gets set if we've hit a block boundary + * @map_bh: The bh to be mapped * @mp: metapath to use * * Find the block number on the current device which corresponds to an @@ -433,37 +432,35 @@ static int lookup_block(struct gfs2_inode *ip, struct buffer_head *bh, * Returns: errno */ -static struct buffer_head *gfs2_block_pointers(struct inode *inode, u64 lblock, - int *new, u64 *dblock, - int *boundary, - struct metapath *mp) +static int gfs2_block_pointers(struct inode *inode, u64 lblock, int create, + struct buffer_head *bh_map, struct metapath *mp, + unsigned int maxlen) { struct gfs2_inode *ip = GFS2_I(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); struct buffer_head *bh; - int create = *new; unsigned int bsize; unsigned int height; unsigned int end_of_metadata; unsigned int x; int error = 0; - - *new = 0; - *dblock = 0; + int new = 0; + u64 dblock = 0; + int boundary; if (gfs2_assert_warn(sdp, !gfs2_is_stuffed(ip))) - goto out; + return 0; bsize = gfs2_is_dir(ip) ? sdp->sd_jbsize : sdp->sd_sb.sb_bsize; height = calc_tree_height(ip, (lblock + 1) * bsize); if (ip->i_di.di_height < height) { if (!create) - goto out; + return 0; error = build_height(inode, height); if (error) - goto out; + return error; } find_metapath(ip, lblock, mp); @@ -471,32 +468,54 @@ static struct buffer_head *gfs2_block_pointers(struct inode *inode, u64 lblock, error = gfs2_meta_inode_buffer(ip, &bh); if (error) - goto out; + return error; for (x = 0; x < end_of_metadata; x++) { - lookup_block(ip, bh, x, mp, create, new, dblock); + lookup_block(ip, bh, x, mp, create, &new, &dblock); brelse(bh); - if (!*dblock) - goto out; + if (!dblock) + return 0; - error = gfs2_meta_indirect_buffer(ip, x+1, *dblock, *new, &bh); + error = gfs2_meta_indirect_buffer(ip, x+1, dblock, new, &bh); if (error) - goto out; + return error; } - *boundary = lookup_block(ip, bh, end_of_metadata, mp, create, new, dblock); - if (*new) { - struct buffer_head *dibh; - error = gfs2_meta_inode_buffer(ip, &dibh); - if (!error) { - gfs2_trans_add_bh(ip->i_gl, dibh, 1); - gfs2_dinode_out(&ip->i_di, dibh->b_data); - brelse(dibh); + boundary = lookup_block(ip, bh, end_of_metadata, mp, create, &new, &dblock); + clear_buffer_mapped(bh_map); + clear_buffer_new(bh_map); + clear_buffer_boundary(bh_map); + + if (dblock) { + map_bh(bh_map, inode->i_sb, dblock); + if (boundary) + set_buffer_boundary(bh); + if (new) { + struct buffer_head *dibh; + error = gfs2_meta_inode_buffer(ip, &dibh); + if (!error) { + gfs2_trans_add_bh(ip->i_gl, dibh, 1); + gfs2_dinode_out(&ip->i_di, dibh->b_data); + brelse(dibh); + } + set_buffer_new(bh_map); + goto out_brelse; + } + while(--maxlen && !buffer_boundary(bh_map)) { + u64 eblock; + + mp->mp_list[end_of_metadata]++; + boundary = lookup_block(ip, bh, end_of_metadata, mp, 0, &new, &eblock); + if (eblock != ++dblock) + break; + bh_map->b_size += inode->i_blksize; + if (boundary) + set_buffer_boundary(bh_map); } } - return bh; -out: - return ERR_PTR(error); +out_brelse: + brelse(bh); + return 0; } @@ -518,30 +537,23 @@ static inline void bmap_unlock(struct inode *inode, int create) up_read(&ip->i_rw_mutex); } -int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary) +int gfs2_block_map(struct inode *inode, u64 lblock, int create, + struct buffer_head *bh, unsigned int maxlen) { struct metapath mp; - struct buffer_head *bh; - int create = *new; + int ret; bmap_lock(inode, create); - bh = gfs2_block_pointers(inode, lblock, new, dblock, boundary, &mp); + ret = gfs2_block_pointers(inode, lblock, create, bh, &mp, maxlen); bmap_unlock(inode, create); - if (!bh) - return 0; - if (IS_ERR(bh)) - return PTR_ERR(bh); - brelse(bh); - return 0; + return ret; } int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen) { - struct gfs2_inode *ip = GFS2_I(inode); - struct gfs2_sbd *sdp = GFS2_SB(inode); struct metapath mp; - struct buffer_head *bh; - int boundary; + struct buffer_head bh = { .b_state = 0, .b_blocknr = 0, .b_size = 0 }; + int ret; int create = *new; BUG_ON(!extlen); @@ -549,30 +561,15 @@ int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsi BUG_ON(!new); bmap_lock(inode, create); - bh = gfs2_block_pointers(inode, lblock, new, dblock, &boundary, &mp); - *extlen = 1; - - if (bh != NULL && !IS_ERR(bh) && *dblock != 0 && *new == 0) { - u64 tmp_dblock; - int tmp_new; - unsigned int nptrs; - unsigned end_of_metadata = ip->i_di.di_height - 1; - - nptrs = (end_of_metadata) ? sdp->sd_inptrs : sdp->sd_diptrs; - while (++mp.mp_list[end_of_metadata] < nptrs) { - lookup_block(ip, bh, end_of_metadata, &mp, 0, &tmp_new, &tmp_dblock); - if (*dblock + *extlen != tmp_dblock) - break; - ++*extlen; - } - } + ret = gfs2_block_pointers(inode, lblock, create, &bh, &mp, *extlen); bmap_unlock(inode, create); - if (!bh) - return 0; - if (IS_ERR(bh)) - return PTR_ERR(bh); - brelse(bh); - return 0; + *extlen = bh.b_size >> inode->i_blkbits; + *dblock = bh.b_blocknr; + if (buffer_new(&bh)) + *new = 1; + else + *new = 0; + return ret; } /** diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index 503f1cdda29097..0fd379b4cd9e74 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -15,7 +15,7 @@ struct gfs2_inode; struct page; int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page); -int gfs2_block_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, int *boundary); +int gfs2_block_map(struct inode *inode, u64 lblock, int create, struct buffer_head *bh, unsigned int maxlen); int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); int gfs2_truncatei(struct gfs2_inode *ip, u64 size); diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 50f88059c3d5aa..ab341cd0a76aca 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -204,17 +204,15 @@ void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks) static u64 log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) { - int new = 0; - u64 dbn; int error; - int bdy; + struct buffer_head bh_map; - error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, &new, &dbn, &bdy); - if (error || !dbn) - printk(KERN_INFO "error=%d, dbn=%llu lbn=%u", error, (unsigned long long)dbn, lbn); - gfs2_assert_withdraw(sdp, !error && dbn); + error = gfs2_block_map(sdp->sd_jdesc->jd_inode, lbn, 0, &bh_map, 1); + if (error || !bh_map.b_blocknr) + printk(KERN_INFO "error=%d, dbn=%llu lbn=%u", error, bh_map.b_blocknr, lbn); + gfs2_assert_withdraw(sdp, !error && bh_map.b_blocknr); - return dbn; + return bh_map.b_blocknr; } /** diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index d44d42fb4163b8..6f9ac5e6e3f617 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -65,29 +65,11 @@ static void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page, int gfs2_get_block(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create) { - int new = create; - u64 dblock; - int error; - int boundary; - - error = gfs2_block_map(inode, lblock, &new, &dblock, &boundary); - if (error) - return error; - - if (!dblock) - return 0; - - map_bh(bh_result, inode->i_sb, dblock); - if (new) - set_buffer_new(bh_result); - if (boundary) - set_buffer_boundary(bh_result); - - return 0; + return gfs2_block_map(inode, lblock, create, bh_result, 32); } /** - * get_block_noalloc - Fills in a buffer head with details about a block + * gfs2_get_block_noalloc - Fills in a buffer head with details about a block * @inode: The inode * @lblock: The block number to look up * @bh_result: The buffer head to return the result in @@ -96,47 +78,25 @@ int gfs2_get_block(struct inode *inode, sector_t lblock, * Returns: errno */ -static int get_block_noalloc(struct inode *inode, sector_t lblock, - struct buffer_head *bh_result, int create) +static int gfs2_get_block_noalloc(struct inode *inode, sector_t lblock, + struct buffer_head *bh_result, int create) { - int new = 0; - u64 dblock; int error; - int boundary; - error = gfs2_block_map(inode, lblock, &new, &dblock, &boundary); + error = gfs2_block_map(inode, lblock, 0, bh_result, 1); if (error) return error; - - if (dblock) - map_bh(bh_result, inode->i_sb, dblock); - else if (gfs2_assert_withdraw(GFS2_SB(inode), !create)) - error = -EIO; - if (boundary) - set_buffer_boundary(bh_result); - - return error; + if (bh_result->b_blocknr == 0) + return -EIO; + return 0; } -static int get_block_direct(struct inode *inode, sector_t lblock, - struct buffer_head *bh_result, int create) +static int gfs2_get_block_direct(struct inode *inode, sector_t lblock, + struct buffer_head *bh_result, int create) { - int new = 0; - u64 dblock; - int error, boundary; - - error = gfs2_block_map(inode, lblock, &new, &dblock, &boundary); - if (error) - return error; - - if (dblock) { - map_bh(bh_result, inode->i_sb, dblock); - if (boundary) - set_buffer_boundary(bh_result); - } - - return 0; + return gfs2_block_map(inode, lblock, 0, bh_result, 512); } + /** * gfs2_writepage - Write complete page * @page: Page to write @@ -184,7 +144,7 @@ static int gfs2_writepage(struct page *page, struct writeback_control *wbc) gfs2_page_add_databufs(ip, page, 0, sdp->sd_vfs->s_blocksize-1); done_trans = 1; } - error = block_write_full_page(page, get_block_noalloc, wbc); + error = block_write_full_page(page, gfs2_get_block_noalloc, wbc); if (done_trans) gfs2_trans_end(sdp); gfs2_meta_cache_flush(ip); @@ -680,7 +640,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, rv = blockdev_direct_IO_own_locking(rw, iocb, inode, inode->i_sb->s_bdev, iov, offset, nr_segs, - get_block_direct, NULL); + gfs2_get_block_direct, NULL); out: gfs2_glock_dq_m(1, &gh); gfs2_holder_uninit(&gh); diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index fe1828ffebfa71..bc9ad058d20e60 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -248,11 +248,9 @@ static int bh_get(struct gfs2_quota_data *qd) struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; struct gfs2_inode *ip = GFS2_I(sdp->sd_qc_inode); unsigned int block, offset; - u64 dblock; - int new = 0; struct buffer_head *bh; int error; - int boundary; + struct buffer_head bh_map; mutex_lock(&sdp->sd_quota_mutex); @@ -264,10 +262,10 @@ static int bh_get(struct gfs2_quota_data *qd) block = qd->qd_slot / sdp->sd_qc_per_block; offset = qd->qd_slot % sdp->sd_qc_per_block;; - error = gfs2_block_map(&ip->i_inode, block, &new, &dblock, &boundary); + error = gfs2_block_map(&ip->i_inode, block, 0, &bh_map, 1); if (error) goto fail; - error = gfs2_meta_read(ip->i_gl, dblock, DIO_START | DIO_WAIT, &bh); + error = gfs2_meta_read(ip->i_gl, bh_map.b_blocknr, DIO_START | DIO_WAIT, &bh); if (error) goto fail; error = -EIO; diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index a27569c5d85e56..130e9fbf96924d 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -369,25 +369,23 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) struct gfs2_inode *ip = GFS2_I(jd->jd_inode); struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); unsigned int lblock; - int new = 0; - u64 dblock; struct gfs2_log_header *lh; u32 hash; struct buffer_head *bh; int error; - int boundary; + struct buffer_head bh_map; lblock = head->lh_blkno; gfs2_replay_incr_blk(sdp, &lblock); - error = gfs2_block_map(&ip->i_inode, lblock, &new, &dblock, &boundary); + error = gfs2_block_map(&ip->i_inode, lblock, 0, &bh_map, 1); if (error) return error; - if (!dblock) { + if (!bh_map.b_blocknr) { gfs2_consist_inode(ip); return -EIO; } - bh = sb_getblk(sdp->sd_vfs, dblock); + bh = sb_getblk(sdp->sd_vfs, bh_map.b_blocknr); lock_buffer(bh); memset(bh->b_data, 0, bh->b_size); set_buffer_uptodate(bh); -- cgit 1.2.3-korg