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/gfs2.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 fs/gfs2/gfs2.h (limited to 'fs/gfs2/gfs2.h') diff --git a/fs/gfs2/gfs2.h b/fs/gfs2/gfs2.h new file mode 100644 index 0000000000000..a5d1182384669 --- /dev/null +++ b/fs/gfs2/gfs2.h @@ -0,0 +1,62 @@ +/* + * 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 __GFS2_DOT_H__ +#define __GFS2_DOT_H__ + +#include + +#include "lm_interface.h" +#include "lvb.h" +#include "incore.h" +#include "util.h" + +enum { + NO_CREATE = 0, + CREATE = 1, +}; + +enum { + NO_WAIT = 0, + WAIT = 1, +}; + +enum { + NO_FORCE = 0, + FORCE = 1, +}; + +/* Divide num by den. Round up if there is a remainder. */ +#define DIV_RU(num, den) (((num) + (den) - 1) / (den)) + +#define GFS2_FAST_NAME_SIZE 8 + +#define get_v2sdp(sb) ((struct gfs2_sbd *)(sb)->s_fs_info) +#define set_v2sdp(sb, sdp) (sb)->s_fs_info = (sdp) +#define get_v2ip(inode) ((struct gfs2_inode *)(inode)->u.generic_ip) +#define set_v2ip(inode, ip) (inode)->u.generic_ip = (ip) +#define get_v2fp(file) ((struct gfs2_file *)(file)->private_data) +#define set_v2fp(file, fp) (file)->private_data = (fp) +#define get_v2bd(bh) ((struct gfs2_bufdata *)(bh)->b_private) +#define set_v2bd(bh, bd) (bh)->b_private = (bd) +#define get_v2db(bh) ((struct gfs2_databuf *)(bh)->b_private) +#define set_v2db(bh, db) (bh)->b_private = (db) + +#define get_transaction ((struct gfs2_trans *)(current->journal_info)) +#define set_transaction(tr) (current->journal_info) = (tr) + +#define get_gl2ip(gl) ((struct gfs2_inode *)(gl)->gl_object) +#define set_gl2ip(gl, ip) (gl)->gl_object = (ip) +#define get_gl2rgd(gl) ((struct gfs2_rgrpd *)(gl)->gl_object) +#define set_gl2rgd(gl, rgd) (gl)->gl_object = (rgd) +#define get_gl2gl(gl) ((struct gfs2_glock *)(gl)->gl_object) +#define set_gl2gl(gl, gl2) (gl)->gl_object = (gl2) + +#endif /* __GFS2_DOT_H__ */ + -- cgit 1.2.3-korg From 64fb4eb7d4cc9de89f4d9b9061adde46ed3b5641 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 18 Jan 2006 13:14:40 +0000 Subject: [GFS2] Remove gfs2_databuf in favour of gfs2_bufdata structure Removing the gfs2_databuf structure and using gfs2_bufdata instead is a step towards allowing journaling of data without requiring the metadata header on each journaled block. The idea is to merge the code paths for ordered data with that of journaled data, with the log operations in lops.c tacking account of the different types of buffers as they are presented to it. Largely the code path for metadata will be similar too, but obviously through a different set of log operations. Signed-off-by: Steven Whitehouse --- fs/gfs2/gfs2.h | 2 -- fs/gfs2/incore.h | 6 ------ fs/gfs2/lops.c | 20 ++++++++++---------- fs/gfs2/ops_address.c | 10 +++++----- fs/gfs2/trans.c | 18 +++++++++--------- 5 files changed, 24 insertions(+), 32 deletions(-) (limited to 'fs/gfs2/gfs2.h') diff --git a/fs/gfs2/gfs2.h b/fs/gfs2/gfs2.h index a5d1182384669..6c53d080675c3 100644 --- a/fs/gfs2/gfs2.h +++ b/fs/gfs2/gfs2.h @@ -45,8 +45,6 @@ enum { #define set_v2fp(file, fp) (file)->private_data = (fp) #define get_v2bd(bh) ((struct gfs2_bufdata *)(bh)->b_private) #define set_v2bd(bh, bd) (bh)->b_private = (bd) -#define get_v2db(bh) ((struct gfs2_databuf *)(bh)->b_private) -#define set_v2db(bh, db) (bh)->b_private = (db) #define get_transaction ((struct gfs2_trans *)(current->journal_info)) #define set_transaction(tr) (current->journal_info) = (tr) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 3ed0a7f26e45a..3bc40ff5fdf95 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -25,7 +25,6 @@ struct gfs2_log_element; struct gfs2_bitmap; struct gfs2_rgrpd; struct gfs2_bufdata; -struct gfs2_databuf; struct gfs2_glock_operations; struct gfs2_holder; struct gfs2_glock; @@ -116,11 +115,6 @@ struct gfs2_bufdata { struct list_head bd_ail_gl_list; }; -struct gfs2_databuf { - struct gfs2_log_element db_le; - struct buffer_head *db_bh; -}; - struct gfs2_glock_operations { void (*go_xmote_th) (struct gfs2_glock * gl, unsigned int state, int flags); diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index d501e8224ed0c..efb1087d0fa88 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -442,15 +442,15 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) { struct list_head *head = &sdp->sd_log_le_databuf; LIST_HEAD(started); - struct gfs2_databuf *db; + struct gfs2_bufdata *bd; struct buffer_head *bh; while (!list_empty(head)) { - db = list_entry(head->prev, struct gfs2_databuf, db_le.le_list); - list_move(&db->db_le.le_list, &started); + bd = list_entry(head->prev, struct gfs2_bufdata, bd_le.le_list); + list_move(&bd->bd_le.le_list, &started); gfs2_log_lock(sdp); - bh = db->db_bh; + bh = bd->bd_bh; if (bh) { get_bh(bh); gfs2_log_unlock(sdp); @@ -464,22 +464,22 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) } while (!list_empty(&started)) { - db = list_entry(started.next, struct gfs2_databuf, - db_le.le_list); - list_del(&db->db_le.le_list); + bd = list_entry(started.next, struct gfs2_bufdata, + bd_le.le_list); + list_del(&bd->bd_le.le_list); sdp->sd_log_num_databuf--; gfs2_log_lock(sdp); - bh = db->db_bh; + bh = bd->bd_bh; if (bh) { - set_v2db(bh, NULL); + set_v2bd(bh, NULL); gfs2_log_unlock(sdp); wait_on_buffer(bh); brelse(bh); } else gfs2_log_unlock(sdp); - kfree(db); + kfree(bd); } gfs2_assert_warn(sdp, !sdp->sd_log_num_databuf); diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index d352b3528f5e2..db66d32875504 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -429,13 +429,13 @@ static sector_t gfs2_bmap(struct address_space *mapping, sector_t lblock) static void discard_buffer(struct gfs2_sbd *sdp, struct buffer_head *bh) { - struct gfs2_databuf *db; + struct gfs2_bufdata *bd; gfs2_log_lock(sdp); - db = get_v2db(bh); - if (db) { - db->db_bh = NULL; - set_v2db(bh, NULL); + bd = get_v2bd(bh); + if (bd) { + bd->bd_bh = NULL; + set_v2bd(bh, NULL); gfs2_log_unlock(sdp); brelse(bh); } else diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index a9df4a34ebad5..b014591fa4a45 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -199,17 +199,17 @@ void gfs2_trans_add_rg(struct gfs2_rgrpd *rgd) void gfs2_trans_add_databuf(struct gfs2_sbd *sdp, struct buffer_head *bh) { - struct gfs2_databuf *db; + struct gfs2_bufdata *bd; - db = get_v2db(bh); - if (!db) { - db = kmalloc(sizeof(struct gfs2_databuf), - GFP_KERNEL | __GFP_NOFAIL); - lops_init_le(&db->db_le, &gfs2_databuf_lops); + bd = get_v2bd(bh); + if (!bd) { + bd = kmalloc(sizeof(struct gfs2_bufdata), + GFP_NOFS | __GFP_NOFAIL); + lops_init_le(&bd->bd_le, &gfs2_databuf_lops); get_bh(bh); - db->db_bh = bh; - set_v2db(bh, db); - lops_add(sdp, &db->db_le); + bd->bd_bh = bh; + set_v2bd(bh, bd); + lops_add(sdp, &bd->bd_le); } } -- cgit 1.2.3-korg From 5c676f6d359b0404d53f542f02e1359583cb2895 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Mon, 27 Feb 2006 17:23:27 -0500 Subject: [GFS2] Macros removal in gfs2.h As suggested by Pekka Enberg . The DIV_RU macro is renamed DIV_ROUND_UP and and moved to kernel.h The other macros are gone from gfs2.h as (although not requested by Pekka Enberg) are a number of included header file which are now included individually. The inode number comparison function is now an inline function. The DT2IF and IF2DT may be addressed in a future patch. Signed-off-by: Steven Whitehouse --- fs/gfs2/acl.c | 8 ++++-- fs/gfs2/bits.c | 4 +++ fs/gfs2/bmap.c | 10 +++++--- fs/gfs2/daemon.c | 4 +++ fs/gfs2/dir.c | 8 ++++-- fs/gfs2/eaops.c | 4 +++ fs/gfs2/eattr.c | 19 +++++++++----- fs/gfs2/eattr.h | 2 +- fs/gfs2/gfs2.h | 29 --------------------- fs/gfs2/glock.c | 20 +++++++++------ fs/gfs2/glops.c | 21 +++++++++------ fs/gfs2/incore.h | 8 ++++++ fs/gfs2/inode.c | 38 ++++++++++++++------------- fs/gfs2/lm.c | 5 ++++ fs/gfs2/log.c | 8 ++++-- fs/gfs2/lops.c | 56 +++++++++++++++++++++++++--------------- fs/gfs2/lvb.c | 4 +++ fs/gfs2/lvb.h | 8 ------ fs/gfs2/main.c | 4 +++ fs/gfs2/meta_io.c | 37 +++++++++++++++------------ fs/gfs2/mount.c | 4 +++ fs/gfs2/ops_address.c | 34 ++++++++++++++----------- fs/gfs2/ops_dentry.c | 8 ++++-- fs/gfs2/ops_export.c | 17 ++++++++----- fs/gfs2/ops_file.c | 40 ++++++++++++++++------------- fs/gfs2/ops_fstype.c | 35 +++++++++++++++++-------- fs/gfs2/ops_inode.c | 62 ++++++++++++++++++++++++--------------------- fs/gfs2/ops_super.c | 26 +++++++++++-------- fs/gfs2/ops_vm.c | 8 ++++-- fs/gfs2/page.c | 12 ++++++--- fs/gfs2/quota.c | 20 ++++++++++----- fs/gfs2/recovery.c | 29 +++++++++++++-------- fs/gfs2/rgrp.c | 10 +++++--- fs/gfs2/super.c | 36 ++++++++++++++++---------- fs/gfs2/sys.c | 4 +++ fs/gfs2/trans.c | 19 +++++++++----- fs/gfs2/unlinked.c | 11 +++++--- fs/gfs2/util.c | 4 +++ include/linux/gfs2_ondisk.h | 11 +++++--- include/linux/kernel.h | 1 + 40 files changed, 416 insertions(+), 272 deletions(-) (limited to 'fs/gfs2/gfs2.h') diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 9482a677ea471..e9d05fe943572 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -15,8 +15,11 @@ #include #include #include +#include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "acl.h" #include "eaops.h" #include "eattr.h" @@ -24,6 +27,7 @@ #include "inode.h" #include "meta_io.h" #include "trans.h" +#include "util.h" #define ACL_ACCESS 1 #define ACL_DEFAULT 0 @@ -157,7 +161,7 @@ int gfs2_check_acl_locked(struct inode *inode, int mask) struct posix_acl *acl = NULL; int error; - error = acl_get(get_v2ip(inode), ACL_ACCESS, &acl, NULL, NULL, NULL); + error = acl_get(inode->u.generic_ip, ACL_ACCESS, &acl, NULL, NULL, NULL); if (error) return error; @@ -172,7 +176,7 @@ int gfs2_check_acl_locked(struct inode *inode, int mask) int gfs2_check_acl(struct inode *inode, int mask) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder i_gh; int error; diff --git a/fs/gfs2/bits.c b/fs/gfs2/bits.c index 57d420a86adf0..49585e3de0959 100644 --- a/fs/gfs2/bits.c +++ b/fs/gfs2/bits.c @@ -21,10 +21,14 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bits.h" +#include "util.h" static const char valid_change[16] = { /* current */ diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index e132d8a410088..cd5e4d863ce27 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -12,9 +12,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "inode.h" @@ -24,6 +27,7 @@ #include "rgrp.h" #include "trans.h" #include "dir.h" +#include "util.h" /* This doesn't need to be that large as max 64 bit pointers in a 4k * block is 512, so __u16 is fine for that. It saves stack space to @@ -660,7 +664,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, for (x = 0; x < rlist.rl_rgrps; x++) { struct gfs2_rgrpd *rgd; - rgd = get_gl2rgd(rlist.rl_ghs[x].gh_gl); + rgd = rlist.rl_ghs[x].gh_gl->gl_object; rg_blocks += rgd->rd_ri.ri_length; } @@ -1021,7 +1025,7 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, unsigned int tmp; if (gfs2_is_dir(ip)) { - *data_blocks = DIV_RU(len, sdp->sd_jbsize) + 2; + *data_blocks = DIV_ROUND_UP(len, sdp->sd_jbsize) + 2; *ind_blocks = 3 * (sdp->sd_max_jheight - 1); } else { *data_blocks = (len >> sdp->sd_sb.sb_bsize_shift) + 3; @@ -1029,7 +1033,7 @@ void gfs2_write_calc_reserv(struct gfs2_inode *ip, unsigned int len, } for (tmp = *data_blocks; tmp > sdp->sd_diptrs;) { - tmp = DIV_RU(tmp, sdp->sd_inptrs); + tmp = DIV_ROUND_UP(tmp, sdp->sd_inptrs); *ind_blocks += tmp; } } diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index cff8d5368d21c..94317dc7e42ce 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c @@ -14,9 +14,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "daemon.h" #include "glock.h" #include "log.h" @@ -24,6 +27,7 @@ #include "recovery.h" #include "super.h" #include "unlinked.h" +#include "util.h" /* This uses schedule_timeout() instead of msleep() because it's good for the daemons to wake up more often than the timeout when unmounting so diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index 56683788a6cf1..37f70ca558cc7 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c @@ -59,9 +59,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "dir.h" #include "glock.h" #include "inode.h" @@ -70,6 +73,7 @@ #include "rgrp.h" #include "trans.h" #include "bmap.h" +#include "util.h" #define IS_LEAF 1 /* Hashed (leaf) directory */ #define IS_DINODE 2 /* Linear (stuffed dinode block) directory */ @@ -2196,7 +2200,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, for (x = 0; x < rlist.rl_rgrps; x++) { struct gfs2_rgrpd *rgd; - rgd = get_gl2rgd(rlist.rl_ghs[x].gh_gl); + rgd = rlist.rl_ghs[x].gh_gl->gl_object; rg_blocks += rgd->rd_ri.ri_length; } @@ -2205,7 +2209,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, uint32_t index, uint32_t len, goto out_rlist; error = gfs2_trans_begin(sdp, - rg_blocks + (DIV_RU(size, sdp->sd_jbsize) + 1) + + rg_blocks + (DIV_ROUND_UP(size, sdp->sd_jbsize) + 1) + RES_DINODE + RES_STATFS + RES_QUOTA, l_blocks); if (error) goto out_rg_gunlock; diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 2914731250c5d..4b9f6cff7a348 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c @@ -13,13 +13,17 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "acl.h" #include "eaops.h" #include "eattr.h" +#include "util.h" /** * gfs2_ea_name2type - get the type of the ea, and truncate type from the name diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index 146995d9cd653..8219d471f06c6 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -13,10 +13,13 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "acl.h" #include "eaops.h" #include "eattr.h" @@ -26,6 +29,7 @@ #include "quota.h" #include "rgrp.h" #include "trans.h" +#include "util.h" /** * ea_calc_size - returns the acutal number of bytes the request will take up @@ -478,7 +482,7 @@ static int ea_get_unstuffed(struct gfs2_inode *ip, struct gfs2_ea_header *ea, struct gfs2_sbd *sdp = ip->i_sbd; struct buffer_head **bh; unsigned int amount = GFS2_EA_DATA_LEN(ea); - unsigned int nptrs = DIV_RU(amount, sdp->sd_jbsize); + unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); uint64_t *dataptrs = GFS2_EA2DATAPTRS(ea); unsigned int x; int error = 0; @@ -676,7 +680,7 @@ static int ea_write(struct gfs2_inode *ip, struct gfs2_ea_header *ea, unsigned int copy; unsigned int x; - ea->ea_num_ptrs = DIV_RU(er->er_data_len, sdp->sd_jbsize); + 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; @@ -810,7 +814,7 @@ static int ea_init(struct gfs2_inode *ip, struct gfs2_ea_request *er) unsigned int blks = 1; if (GFS2_EAREQ_SIZE_STUFFED(er) > jbsize) - blks += DIV_RU(er->er_data_len, jbsize); + blks += DIV_ROUND_UP(er->er_data_len, jbsize); return ea_alloc_skeleton(ip, er, blks, ea_init_i, NULL); } @@ -962,7 +966,8 @@ static int ea_set_simple(struct gfs2_inode *ip, struct buffer_head *bh, es->es_bh = bh; es->es_ea = ea; - blks = 2 + DIV_RU(es->es_er->er_data_len, ip->i_sbd->sd_jbsize); + blks = 2 + DIV_ROUND_UP(es->es_er->er_data_len, + ip->i_sbd->sd_jbsize); error = ea_alloc_skeleton(ip, es->es_er, blks, ea_set_simple_alloc, es); @@ -1066,7 +1071,7 @@ static int ea_set_i(struct gfs2_inode *ip, struct gfs2_ea_request *er, if (!(ip->i_di.di_flags & GFS2_DIF_EA_INDIRECT)) blks++; if (GFS2_EAREQ_SIZE_STUFFED(er) > ip->i_sbd->sd_jbsize) - blks += DIV_RU(er->er_data_len, ip->i_sbd->sd_jbsize); + blks += DIV_ROUND_UP(er->er_data_len, ip->i_sbd->sd_jbsize); return ea_alloc_skeleton(ip, er, blks, ea_set_block, el); } @@ -1250,7 +1255,7 @@ static int ea_acl_chmod_unstuffed(struct gfs2_inode *ip, struct gfs2_sbd *sdp = ip->i_sbd; struct buffer_head **bh; unsigned int amount = GFS2_EA_DATA_LEN(ea); - unsigned int nptrs = DIV_RU(amount, sdp->sd_jbsize); + unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); uint64_t *dataptrs = GFS2_EA2DATAPTRS(ea); unsigned int x; int error; @@ -1402,7 +1407,7 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip) for (x = 0; x < rlist.rl_rgrps; x++) { struct gfs2_rgrpd *rgd; - rgd = get_gl2rgd(rlist.rl_ghs[x].gh_gl); + rgd = rlist.rl_ghs[x].gh_gl->gl_object; rg_blocks += rgd->rd_ri.ri_length; } diff --git a/fs/gfs2/eattr.h b/fs/gfs2/eattr.h index e5a42abf68a35..2b4152b1fcbef 100644 --- a/fs/gfs2/eattr.h +++ b/fs/gfs2/eattr.h @@ -29,7 +29,7 @@ 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_RU((er)->er_data_len, (sdp)->sd_jbsize), 8) + sizeof(uint64_t) * 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) diff --git a/fs/gfs2/gfs2.h b/fs/gfs2/gfs2.h index 6c53d080675c3..57175f70e2bd5 100644 --- a/fs/gfs2/gfs2.h +++ b/fs/gfs2/gfs2.h @@ -10,13 +10,6 @@ #ifndef __GFS2_DOT_H__ #define __GFS2_DOT_H__ -#include - -#include "lm_interface.h" -#include "lvb.h" -#include "incore.h" -#include "util.h" - enum { NO_CREATE = 0, CREATE = 1, @@ -32,29 +25,7 @@ enum { FORCE = 1, }; -/* Divide num by den. Round up if there is a remainder. */ -#define DIV_RU(num, den) (((num) + (den) - 1) / (den)) - #define GFS2_FAST_NAME_SIZE 8 -#define get_v2sdp(sb) ((struct gfs2_sbd *)(sb)->s_fs_info) -#define set_v2sdp(sb, sdp) (sb)->s_fs_info = (sdp) -#define get_v2ip(inode) ((struct gfs2_inode *)(inode)->u.generic_ip) -#define set_v2ip(inode, ip) (inode)->u.generic_ip = (ip) -#define get_v2fp(file) ((struct gfs2_file *)(file)->private_data) -#define set_v2fp(file, fp) (file)->private_data = (fp) -#define get_v2bd(bh) ((struct gfs2_bufdata *)(bh)->b_private) -#define set_v2bd(bh, bd) (bh)->b_private = (bd) - -#define get_transaction ((struct gfs2_trans *)(current->journal_info)) -#define set_transaction(tr) (current->journal_info) = (tr) - -#define get_gl2ip(gl) ((struct gfs2_inode *)(gl)->gl_object) -#define set_gl2ip(gl, ip) (gl)->gl_object = (ip) -#define get_gl2rgd(gl) ((struct gfs2_rgrpd *)(gl)->gl_object) -#define set_gl2rgd(gl, rgd) (gl)->gl_object = (rgd) -#define get_gl2gl(gl) ((struct gfs2_glock *)(gl)->gl_object) -#define set_gl2gl(gl, gl2) (gl)->gl_object = (gl2) - #endif /* __GFS2_DOT_H__ */ diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index f30fde91d14af..81b06812b3296 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -16,10 +16,13 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "glops.h" #include "inode.h" @@ -28,6 +31,7 @@ #include "meta_io.h" #include "quota.h" #include "super.h" +#include "util.h" /* Must be kept in sync with the beginning of struct gfs2_glock */ struct glock_plug { @@ -1962,7 +1966,7 @@ void gfs2_try_toss_inode(struct gfs2_sbd *sdp, struct gfs2_inum *inum) if (!gfs2_glmutex_trylock(gl)) goto out; - ip = get_gl2ip(gl); + ip = gl->gl_object; if (!ip) goto out_unlock; @@ -1994,7 +1998,7 @@ void gfs2_iopen_go_callback(struct gfs2_glock *io_gl, unsigned int state) return; spin_lock(&io_gl->gl_spin); - i_gl = get_gl2gl(io_gl); + i_gl = io_gl->gl_object; if (i_gl) { gfs2_glock_hold(i_gl); spin_unlock(&io_gl->gl_spin); @@ -2004,7 +2008,7 @@ void gfs2_iopen_go_callback(struct gfs2_glock *io_gl, unsigned int state) } if (gfs2_glmutex_trylock(i_gl)) { - struct gfs2_inode *ip = get_gl2ip(i_gl); + struct gfs2_inode *ip = i_gl->gl_object; if (ip) { gfs2_try_toss_vnode(ip); gfs2_glmutex_unlock(i_gl); @@ -2093,7 +2097,7 @@ void gfs2_reclaim_glock(struct gfs2_sbd *sdp) if (gfs2_glmutex_trylock(gl)) { if (gl->gl_ops == &gfs2_inode_glops) { - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; if (ip && !atomic_read(&ip->i_count)) gfs2_inode_destroy(ip); } @@ -2174,7 +2178,7 @@ static void scan_glock(struct gfs2_glock *gl) { if (gfs2_glmutex_trylock(gl)) { if (gl->gl_ops == &gfs2_inode_glops) { - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; if (ip && !atomic_read(&ip->i_count)) goto out_schedule; } @@ -2234,7 +2238,7 @@ static void clear_glock(struct gfs2_glock *gl) if (gfs2_glmutex_trylock(gl)) { if (gl->gl_ops == &gfs2_inode_glops) { - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; if (ip && !atomic_read(&ip->i_count)) gfs2_inode_destroy(ip); } @@ -2430,10 +2434,10 @@ static int dump_glock(struct gfs2_glock *gl) if (error) goto out; } - if (gl->gl_ops == &gfs2_inode_glops && get_gl2ip(gl)) { + if (gl->gl_ops == &gfs2_inode_glops && gl->gl_object) { if (!test_bit(GLF_LOCK, &gl->gl_flags) && list_empty(&gl->gl_holders)) { - error = dump_inode(get_gl2ip(gl)); + error = dump_inode(gl->gl_object); if (error) goto out; } else { diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 27374306ecded..d9334eb72df81 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -12,9 +12,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "glops.h" @@ -24,6 +27,7 @@ #include "page.h" #include "recovery.h" #include "rgrp.h" +#include "util.h" /** * meta_go_sync - sync out the metadata for this glock @@ -193,7 +197,7 @@ static int inode_go_demote_ok(struct gfs2_glock *gl) struct gfs2_sbd *sdp = gl->gl_sbd; int demote = 0; - if (!get_gl2ip(gl) && !gl->gl_aspace->i_mapping->nrpages) + if (!gl->gl_object && !gl->gl_aspace->i_mapping->nrpages) demote = 1; else if (!sdp->sd_args.ar_localcaching && time_after_eq(jiffies, gl->gl_stamp + @@ -214,7 +218,7 @@ static int inode_go_demote_ok(struct gfs2_glock *gl) static int inode_go_lock(struct gfs2_holder *gh) { struct gfs2_glock *gl = gh->gh_gl; - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; int error = 0; if (!ip) @@ -246,7 +250,7 @@ static int inode_go_lock(struct gfs2_holder *gh) static void inode_go_unlock(struct gfs2_holder *gh) { struct gfs2_glock *gl = gh->gh_gl; - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; if (ip && test_bit(GLF_DIRTY, &gl->gl_flags)) gfs2_inode_attr_in(ip); @@ -264,7 +268,7 @@ static void inode_go_unlock(struct gfs2_holder *gh) static void inode_greedy(struct gfs2_glock *gl) { struct gfs2_sbd *sdp = gl->gl_sbd; - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; unsigned int quantum = gfs2_tune_get(sdp, gt_greedy_quantum); unsigned int max = gfs2_tune_get(sdp, gt_greedy_max); unsigned int new_time; @@ -311,7 +315,7 @@ static int rgrp_go_demote_ok(struct gfs2_glock *gl) static int rgrp_go_lock(struct gfs2_holder *gh) { - return gfs2_rgrp_bh_get(get_gl2rgd(gh->gh_gl)); + return gfs2_rgrp_bh_get(gh->gh_gl->gl_object); } /** @@ -324,7 +328,7 @@ static int rgrp_go_lock(struct gfs2_holder *gh) static void rgrp_go_unlock(struct gfs2_holder *gh) { - gfs2_rgrp_bh_put(get_gl2rgd(gh->gh_gl)); + gfs2_rgrp_bh_put(gh->gh_gl->gl_object); } /** @@ -358,13 +362,14 @@ static void trans_go_xmote_th(struct gfs2_glock *gl, unsigned int state, static void trans_go_xmote_bh(struct gfs2_glock *gl) { struct gfs2_sbd *sdp = gl->gl_sbd; - struct gfs2_glock *j_gl = get_v2ip(sdp->sd_jdesc->jd_inode)->i_gl; + struct gfs2_inode *ip = sdp->sd_jdesc->jd_inode->u.generic_ip; + struct gfs2_glock *j_gl = ip->i_gl; struct gfs2_log_header head; int error; if (gl->gl_state != LM_ST_UNLOCKED && test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { - gfs2_meta_cache_flush(get_v2ip(sdp->sd_jdesc->jd_inode)); + gfs2_meta_cache_flush(sdp->sd_jdesc->jd_inode->u.generic_ip); j_gl->gl_ops->go_inval(j_gl, DIO_METADATA | DIO_DATA); error = gfs2_find_jhead(sdp->sd_jdesc, &head); diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 0e550e8e5be3a..2443e9aad5985 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -313,6 +313,14 @@ enum { QDF_LOCKED = 2, }; +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 */ +}; + struct gfs2_quota_data { struct list_head qd_list; unsigned int qd_count; diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 51ecdb8503b07..ea9e996f36731 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -14,9 +14,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "acl.h" #include "bmap.h" #include "dir.h" @@ -33,6 +36,7 @@ #include "rgrp.h" #include "trans.h" #include "unlinked.h" +#include "util.h" /** * inode_attr_in - Copy attributes from the dinode into the VFS inode @@ -176,7 +180,7 @@ struct inode *gfs2_ip2v(struct gfs2_inode *ip) init_special_inode(tmp, tmp->i_mode, tmp->i_rdev); } - set_v2ip(tmp, NULL); + tmp->u.generic_ip = NULL; for (;;) { spin_lock(&ip->i_spin); @@ -196,7 +200,7 @@ struct inode *gfs2_ip2v(struct gfs2_inode *ip) gfs2_inode_hold(ip); ip->i_vnode = inode; - set_v2ip(inode, ip); + inode->u.generic_ip = ip; spin_unlock(&ip->i_spin); @@ -207,7 +211,7 @@ struct inode *gfs2_ip2v(struct gfs2_inode *ip) static int iget_test(struct inode *inode, void *opaque) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_inum *inum = (struct gfs2_inum *)opaque; if (ip && ip->i_num.no_addr == inum->no_addr) @@ -320,11 +324,11 @@ static int inode_create(struct gfs2_glock *i_gl, struct gfs2_inum *inum, spin_lock(&io_gl->gl_spin); gfs2_glock_hold(i_gl); - set_gl2gl(io_gl, i_gl); + io_gl->gl_object = i_gl; spin_unlock(&io_gl->gl_spin); gfs2_glock_hold(i_gl); - set_gl2ip(i_gl, ip); + i_gl->gl_object = ip; atomic_inc(&sdp->sd_inode_count); @@ -359,7 +363,7 @@ int gfs2_inode_get(struct gfs2_glock *i_gl, struct gfs2_inum *inum, int create, gfs2_glmutex_lock(i_gl); - *ipp = get_gl2ip(i_gl); + *ipp = i_gl->gl_object; if (*ipp) { error = -ESTALE; if ((*ipp)->i_num.no_formal_ino != inum->no_formal_ino) @@ -404,10 +408,10 @@ void gfs2_inode_destroy(struct gfs2_inode *ip) struct gfs2_glock *i_gl = ip->i_gl; gfs2_assert_warn(sdp, !atomic_read(&ip->i_count)); - gfs2_assert(sdp, get_gl2gl(io_gl) == i_gl); + gfs2_assert(sdp, io_gl->gl_object == i_gl); spin_lock(&io_gl->gl_spin); - set_gl2gl(io_gl, NULL); + io_gl->gl_object = NULL; gfs2_glock_put(i_gl); spin_unlock(&io_gl->gl_spin); @@ -416,7 +420,7 @@ void gfs2_inode_destroy(struct gfs2_inode *ip) gfs2_meta_cache_flush(ip); kmem_cache_free(gfs2_inode_cachep, ip); - set_gl2ip(i_gl, NULL); + i_gl->gl_object = NULL; gfs2_glock_put(i_gl); atomic_dec(&sdp->sd_inode_count); @@ -524,7 +528,7 @@ static int inode_dealloc(struct gfs2_sbd *sdp, struct gfs2_unlinked *ul, goto out; } - gfs2_assert_warn(sdp, !get_gl2ip(i_gh.gh_gl)); + gfs2_assert_warn(sdp, !i_gh.gh_gl->gl_object); error = inode_create(i_gh.gh_gl, &ul->ul_ut.ut_inum, io_gh->gh_gl, LM_ST_EXCLUSIVE, &ip); @@ -715,7 +719,7 @@ int gfs2_lookupi(struct inode *dir, struct qstr *name, int is_root, struct inode **inodep) { struct gfs2_inode *ipp; - struct gfs2_inode *dip = get_v2ip(dir); + struct gfs2_inode *dip = dir->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; struct gfs2_holder d_gh; struct gfs2_inum inum; @@ -774,7 +778,7 @@ done: static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_ir_inode); + struct gfs2_inode *ip = sdp->sd_ir_inode->u.generic_ip; struct buffer_head *bh; struct gfs2_inum_range ir; int error; @@ -815,8 +819,8 @@ static int pick_formal_ino_1(struct gfs2_sbd *sdp, uint64_t *formal_ino) static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_ir_inode); - struct gfs2_inode *m_ip = get_v2ip(sdp->sd_inum_inode); + struct gfs2_inode *ip = sdp->sd_ir_inode->u.generic_ip; + struct gfs2_inode *m_ip = sdp->sd_inum_inode->u.generic_ip; struct gfs2_holder gh; struct buffer_head *bh; struct gfs2_inum_range ir; @@ -1194,7 +1198,7 @@ struct inode *gfs2_createi(struct gfs2_holder *ghs, struct qstr *name, unsigned int mode) { struct inode *inode; - struct gfs2_inode *dip = get_gl2ip(ghs->gh_gl); + struct gfs2_inode *dip = ghs->gh_gl->gl_object; struct gfs2_sbd *sdp = dip->i_sbd; struct gfs2_unlinked *ul; struct gfs2_inode *ip; @@ -1570,7 +1574,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 = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; int64_t curtime, quantum = gfs2_tune_get(sdp, gt_atime_quantum); unsigned int state; int flags; @@ -1817,7 +1821,7 @@ int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr) { int error; - if (get_transaction) + if (current->journal_info) return __gfs2_setattr_simple(ip, attr); error = gfs2_trans_begin(ip->i_sbd, RES_DINODE, 0); diff --git a/fs/gfs2/lm.c b/fs/gfs2/lm.c index 3df8fa00442db..5b3c56d2df2fd 100644 --- a/fs/gfs2/lm.c +++ b/fs/gfs2/lm.c @@ -13,12 +13,17 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "lm.h" #include "super.h" +#include "util.h" +#include "lvb.h" /** * gfs2_lm_mount - mount a locking protocol diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 0e31d46edd4d1..32a41a274bf86 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -12,14 +12,18 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "log.h" #include "lops.h" #include "meta_io.h" +#include "util.h" #define PULL 1 @@ -80,7 +84,7 @@ unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct, if (nstruct > first) { second = (sdp->sd_sb.sb_bsize - sizeof(struct gfs2_meta_header)) / ssize; - blks += DIV_RU(nstruct - first, second); + blks += DIV_ROUND_UP(nstruct - first, second); } return blks; @@ -257,7 +261,7 @@ static uint64_t log_bmap(struct gfs2_sbd *sdp, unsigned int lbn) uint64_t dbn; int error; - error = gfs2_block_map(get_v2ip(sdp->sd_jdesc->jd_inode), + error = gfs2_block_map(sdp->sd_jdesc->jd_inode->u.generic_ip, lbn, &new, &dbn, NULL); gfs2_assert_withdraw(sdp, !error && dbn); diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 4bd89c0781e73..430161a05a21f 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -12,9 +12,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "log.h" #include "lops.h" @@ -22,12 +25,14 @@ #include "recovery.h" #include "rgrp.h" #include "trans.h" +#include "util.h" static void glock_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) { struct gfs2_glock *gl; + struct gfs2_trans *tr = current->journal_info; - get_transaction->tr_touched = 1; + tr->tr_touched = 1; if (!list_empty(&le->le_list)) return; @@ -68,7 +73,7 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) if (!list_empty(&bd->bd_list_tr)) return; - tr = get_transaction; + tr = current->journal_info; tr->tr_touched = 1; tr->tr_num_buf++; list_add(&bd->bd_list_tr, &tr->tr_list_buf); @@ -179,7 +184,8 @@ static void buf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) static void buf_lo_before_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; if (pass != 0) return; @@ -192,8 +198,9 @@ static int buf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, struct gfs2_log_descriptor *ld, __be64 *ptr, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; - struct gfs2_glock *gl = get_v2ip(jd->jd_inode)->i_gl; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; + 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; @@ -238,17 +245,18 @@ static int buf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; if (error) { - gfs2_meta_sync(get_v2ip(jd->jd_inode)->i_gl, + gfs2_meta_sync(ip->i_gl, DIO_START | DIO_WAIT); return; } if (pass != 1) return; - gfs2_meta_sync(get_v2ip(jd->jd_inode)->i_gl, DIO_START | DIO_WAIT); + gfs2_meta_sync(ip->i_gl, DIO_START | DIO_WAIT); fs_info(sdp, "jid=%u: Replayed %u of %u blocks\n", jd->jd_jid, sdp->sd_replayed_blocks, sdp->sd_found_blocks); @@ -258,7 +266,7 @@ static void revoke_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) { struct gfs2_trans *tr; - tr = get_transaction; + tr = current->journal_info; tr->tr_touched = 1; tr->tr_num_revoke++; @@ -324,7 +332,8 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp) static void revoke_lo_before_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; if (pass != 0) return; @@ -337,7 +346,8 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, struct gfs2_log_descriptor *ld, __be64 *ptr, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; unsigned int blks = be32_to_cpu(ld->ld_length); unsigned int revokes = be32_to_cpu(ld->ld_data1); struct buffer_head *bh; @@ -383,7 +393,8 @@ static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; if (error) { gfs2_revoke_clean(sdp); @@ -401,8 +412,9 @@ static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) static void rg_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) { struct gfs2_rgrpd *rgd; + struct gfs2_trans *tr = current->journal_info; - get_transaction->tr_touched = 1; + tr->tr_touched = 1; if (!list_empty(&le->le_list)) return; @@ -451,9 +463,9 @@ static void rg_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) { struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le); - struct gfs2_trans *tr = get_transaction; + struct gfs2_trans *tr = current->journal_info; struct address_space *mapping = bd->bd_bh->b_page->mapping; - struct gfs2_inode *ip = get_v2ip(mapping->host); + struct gfs2_inode *ip = mapping->host->u.generic_ip; tr->tr_touched = 1; if (!list_empty(&bd->bd_list_tr) && @@ -633,7 +645,7 @@ static void databuf_lo_before_commit(struct gfs2_sbd *sdp) bh = bd1->bd_bh; if (bh) { - set_v2bd(bh, NULL); + bh->b_private = NULL; gfs2_log_unlock(sdp); wait_on_buffer(bh); brelse(bh); @@ -651,8 +663,9 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, struct gfs2_log_descriptor *ld, __be64 *ptr, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; - struct gfs2_glock *gl = get_v2ip(jd->jd_inode)->i_gl; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; + 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; @@ -701,10 +714,11 @@ static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, unsigned int start, static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; if (error) { - gfs2_meta_sync(get_v2ip(jd->jd_inode)->i_gl, + gfs2_meta_sync(ip->i_gl, DIO_START | DIO_WAIT); return; } @@ -712,7 +726,7 @@ static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) return; /* data sync? */ - gfs2_meta_sync(get_v2ip(jd->jd_inode)->i_gl, DIO_START | DIO_WAIT); + gfs2_meta_sync(ip->i_gl, DIO_START | DIO_WAIT); fs_info(sdp, "jid=%u: Replayed %u of %u data blocks\n", jd->jd_jid, sdp->sd_replayed_blocks, sdp->sd_found_blocks); diff --git a/fs/gfs2/lvb.c b/fs/gfs2/lvb.c index ca959ebb80c1a..63b815dad8e7a 100644 --- a/fs/gfs2/lvb.c +++ b/fs/gfs2/lvb.c @@ -12,9 +12,13 @@ #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); diff --git a/fs/gfs2/lvb.h b/fs/gfs2/lvb.h index ca9732b2d9f4b..1b9eb69b95345 100644 --- a/fs/gfs2/lvb.h +++ b/fs/gfs2/lvb.h @@ -12,14 +12,6 @@ #define GFS2_MIN_LVB_SIZE 32 -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 */ -}; - 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); diff --git a/fs/gfs2/main.c b/fs/gfs2/main.c index 0c60f2b10fddd..c54177790318b 100644 --- a/fs/gfs2/main.c +++ b/fs/gfs2/main.c @@ -14,11 +14,15 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "ops_fstype.h" #include "sys.h" +#include "util.h" /** * init_gfs2_fs - Register GFS2 as a filesystem diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 53f33fa899f9b..b85fa24646661 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -17,9 +17,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "glops.h" #include "inode.h" @@ -28,6 +31,7 @@ #include "meta_io.h" #include "rgrp.h" #include "trans.h" +#include "util.h" #define buffer_busy(bh) \ ((bh)->b_state & ((1ul << BH_Dirty) | (1ul << BH_Lock) | (1ul << BH_Pinned))) @@ -37,7 +41,7 @@ static int aspace_get_block(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create) { - gfs2_assert_warn(get_v2sdp(inode->i_sb), 0); + gfs2_assert_warn(inode->i_sb->s_fs_info, 0); return -EOPNOTSUPP; } @@ -55,15 +59,15 @@ static int gfs2_aspace_writepage(struct page *page, static void stuck_releasepage(struct buffer_head *bh) { - struct gfs2_sbd *sdp = get_v2sdp(bh->b_page->mapping->host->i_sb); - struct gfs2_bufdata *bd = get_v2bd(bh); + struct gfs2_sbd *sdp = bh->b_page->mapping->host->i_sb->s_fs_info; + struct gfs2_bufdata *bd = bh->b_private; struct gfs2_glock *gl; fs_warn(sdp, "stuck in gfs2_releasepage()\n"); fs_warn(sdp, "blkno = %llu, bh->b_count = %d\n", (uint64_t)bh->b_blocknr, atomic_read(&bh->b_count)); fs_warn(sdp, "pinned = %u\n", buffer_pinned(bh)); - fs_warn(sdp, "get_v2bd(bh) = %s\n", (bd) ? "!NULL" : "NULL"); + fs_warn(sdp, "bh->b_private = %s\n", (bd) ? "!NULL" : "NULL"); if (!bd) return; @@ -78,7 +82,7 @@ static void stuck_releasepage(struct buffer_head *bh) (list_empty(&bd->bd_le.le_list)) ? "no" : "yes"); if (gl->gl_ops == &gfs2_inode_glops) { - struct gfs2_inode *ip = get_gl2ip(gl); + struct gfs2_inode *ip = gl->gl_object; unsigned int x; if (!ip) @@ -110,7 +114,7 @@ static void stuck_releasepage(struct buffer_head *bh) static int gfs2_aspace_releasepage(struct page *page, gfp_t gfp_mask) { struct inode *aspace = page->mapping->host; - struct gfs2_sbd *sdp = get_v2sdp(aspace->i_sb); + struct gfs2_sbd *sdp = aspace->i_sb->s_fs_info; struct buffer_head *bh, *head; struct gfs2_bufdata *bd; unsigned long t; @@ -139,14 +143,14 @@ static int gfs2_aspace_releasepage(struct page *page, gfp_t gfp_mask) gfs2_assert_warn(sdp, !buffer_pinned(bh)); - bd = get_v2bd(bh); + bd = bh->b_private; if (bd) { gfs2_assert_warn(sdp, bd->bd_bh == bh); gfs2_assert_warn(sdp, list_empty(&bd->bd_list_tr)); gfs2_assert_warn(sdp, list_empty(&bd->bd_le.le_list)); gfs2_assert_warn(sdp, !bd->bd_ail); kmem_cache_free(gfs2_bufdata_cachep, bd); - set_v2bd(bh, NULL); + bh->b_private = NULL; } bh = bh->b_this_page; @@ -184,7 +188,7 @@ struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp) mapping_set_gfp_mask(aspace->i_mapping, GFP_KERNEL); aspace->i_mapping->a_ops = &aspace_aops; aspace->i_size = ~0ULL; - set_v2ip(aspace, NULL); + aspace->u.generic_ip = NULL; insert_inode_hash(aspace); } @@ -523,7 +527,7 @@ int gfs2_meta_reread(struct gfs2_sbd *sdp, struct buffer_head *bh, int flags) wait_on_buffer(bh); if (!buffer_uptodate(bh)) { - struct gfs2_trans *tr = get_transaction; + struct gfs2_trans *tr = current->journal_info; if (tr && tr->tr_touched) gfs2_io_error_bh(sdp, bh); return -EIO; @@ -550,7 +554,7 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, if (meta) lock_page(bh->b_page); - if (get_v2bd(bh)) { + if (bh->b_private) { if (meta) unlock_page(bh->b_page); return; @@ -569,7 +573,7 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, lops_init_le(&bd->bd_le, &gfs2_databuf_lops); get_bh(bh); } - set_v2bd(bh, bd); + bh->b_private = bd; if (meta) unlock_page(bh->b_page); @@ -584,7 +588,7 @@ void gfs2_attach_bufdata(struct gfs2_glock *gl, struct buffer_head *bh, void gfs2_pin(struct gfs2_sbd *sdp, struct buffer_head *bh) { - struct gfs2_bufdata *bd = get_v2bd(bh); + struct gfs2_bufdata *bd = bh->b_private; gfs2_assert_withdraw(sdp, test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)); @@ -621,7 +625,7 @@ 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) { - struct gfs2_bufdata *bd = get_v2bd(bh); + struct gfs2_bufdata *bd = bh->b_private; gfs2_assert_withdraw(sdp, buffer_uptodate(bh)); @@ -662,15 +666,16 @@ void gfs2_meta_wipe(struct gfs2_inode *ip, uint64_t bstart, uint32_t blen) while (blen) { bh = getbuf(sdp, aspace, bstart, NO_CREATE); if (bh) { - struct gfs2_bufdata *bd = get_v2bd(bh); + struct gfs2_bufdata *bd = bh->b_private; if (test_clear_buffer_pinned(bh)) { + struct gfs2_trans *tr = current->journal_info; gfs2_log_lock(sdp); list_del_init(&bd->bd_le.le_list); gfs2_assert_warn(sdp, sdp->sd_log_num_buf); sdp->sd_log_num_buf--; gfs2_log_unlock(sdp); - get_transaction->tr_num_buf_rm++; + tr->tr_num_buf_rm++; brelse(bh); } if (bd) { diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c index 3e42697aafc74..e90ea7d32f9ec 100644 --- a/fs/gfs2/mount.c +++ b/fs/gfs2/mount.c @@ -12,11 +12,15 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "mount.h" #include "sys.h" +#include "util.h" /** * gfs2_mount_args - Parse mount options diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 89a8b8fad2e7e..01aa4a9b48c39 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c @@ -15,9 +15,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "inode.h" @@ -29,6 +32,7 @@ #include "trans.h" #include "rgrp.h" #include "ops_file.h" +#include "util.h" /** * gfs2_get_block - Fills in a buffer head with details about a block @@ -43,7 +47,7 @@ int gfs2_get_block(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; int new = create; uint64_t dblock; int error; @@ -75,7 +79,7 @@ int gfs2_get_block(struct inode *inode, sector_t lblock, static int get_block_noalloc(struct inode *inode, sector_t lblock, struct buffer_head *bh_result, int create) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; int new = 0; uint64_t dblock; int error; @@ -96,7 +100,7 @@ static int get_blocks(struct inode *inode, sector_t lblock, unsigned long max_blocks, struct buffer_head *bh_result, int create) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; int new = create; uint64_t dblock; uint32_t extlen; @@ -124,7 +128,7 @@ static int get_blocks_noalloc(struct inode *inode, sector_t lblock, unsigned long max_blocks, struct buffer_head *bh_result, int create) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; int new = 0; uint64_t dblock; uint32_t extlen; @@ -158,7 +162,7 @@ static int get_blocks_noalloc(struct inode *inode, sector_t lblock, static int gfs2_writepage(struct page *page, struct writeback_control *wbc) { struct inode *inode = page->mapping->host; - struct gfs2_inode *ip = get_v2ip(page->mapping->host); + struct gfs2_inode *ip = page->mapping->host->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; loff_t i_size = i_size_read(inode); pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT; @@ -170,7 +174,7 @@ static int gfs2_writepage(struct page *page, struct writeback_control *wbc) unlock_page(page); return -EIO; } - if (get_transaction) + if (current->journal_info) goto out_ignore; /* Is the page fully outside i_size? (truncate in progress) */ @@ -259,7 +263,7 @@ static int zero_readpage(struct page *page) static int gfs2_readpage(struct file *file, struct page *page) { - struct gfs2_inode *ip = get_v2ip(page->mapping->host); + struct gfs2_inode *ip = page->mapping->host->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; struct gfs2_holder gh; int error; @@ -307,7 +311,7 @@ out_unlock: static int gfs2_prepare_write(struct file *file, struct page *page, unsigned from, unsigned to) { - struct gfs2_inode *ip = get_v2ip(page->mapping->host); + struct gfs2_inode *ip = page->mapping->host->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; unsigned int data_blocks, ind_blocks, rblocks; int alloc_required; @@ -402,7 +406,7 @@ static int gfs2_commit_write(struct file *file, struct page *page, unsigned from, unsigned to) { struct inode *inode = page->mapping->host; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; int error = -EOPNOTSUPP; struct buffer_head *dibh; @@ -482,7 +486,7 @@ fail_nounlock: static sector_t gfs2_bmap(struct address_space *mapping, sector_t lblock) { - struct gfs2_inode *ip = get_v2ip(mapping->host); + struct gfs2_inode *ip = mapping->host->u.generic_ip; struct gfs2_holder i_gh; sector_t dblock = 0; int error; @@ -504,10 +508,10 @@ static void discard_buffer(struct gfs2_sbd *sdp, struct buffer_head *bh) struct gfs2_bufdata *bd; gfs2_log_lock(sdp); - bd = get_v2bd(bh); + bd = bh->b_private; if (bd) { bd->bd_bh = NULL; - set_v2bd(bh, NULL); + bh->b_private = NULL; gfs2_log_unlock(sdp); brelse(bh); } else @@ -525,7 +529,7 @@ static void discard_buffer(struct gfs2_sbd *sdp, struct buffer_head *bh) static int gfs2_invalidatepage(struct page *page, unsigned long offset) { - struct gfs2_sbd *sdp = get_v2sdp(page->mapping->host->i_sb); + struct gfs2_sbd *sdp = page->mapping->host->i_sb->s_fs_info; struct buffer_head *head, *bh, *next; unsigned int curr_off = 0; int ret = 1; @@ -557,7 +561,7 @@ static ssize_t gfs2_direct_IO_write(struct kiocb *iocb, const struct iovec *iov, { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder gh; int rv; @@ -604,7 +608,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb, { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; if (rw == WRITE) diff --git a/fs/gfs2/ops_dentry.c b/fs/gfs2/ops_dentry.c index b020ad8f180b9..7f61392885194 100644 --- a/fs/gfs2/ops_dentry.c +++ b/fs/gfs2/ops_dentry.c @@ -13,12 +13,16 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "dir.h" #include "glock.h" #include "ops_dentry.h" +#include "util.h" /** * gfs2_drevalidate - Check directory lookup consistency @@ -34,7 +38,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) { struct dentry *parent = dget_parent(dentry); - struct gfs2_inode *dip = get_v2ip(parent->d_inode); + struct gfs2_inode *dip = parent->d_inode->u.generic_ip; struct inode *inode; struct gfs2_holder d_gh; struct gfs2_inode *ip; @@ -66,7 +70,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd) goto fail_gunlock; } - ip = get_v2ip(inode); + ip = inode->u.generic_ip; if (!gfs2_inum_equal(&ip->i_num, &inum)) goto invalid_gunlock; diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c index 60d006402553f..d149584cff301 100644 --- a/fs/gfs2/ops_export.c +++ b/fs/gfs2/ops_export.c @@ -12,9 +12,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "dir.h" #include "glock.h" #include "glops.h" @@ -61,7 +64,7 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len, int connectable) { struct inode *inode = dentry->d_inode; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; if (*len < 4 || (connectable && *len < 8)) @@ -77,12 +80,12 @@ static int gfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *len, fh[3] = cpu_to_be32(fh[3]); *len = 4; - if (!connectable || ip == get_v2ip(sdp->sd_root_dir)) + if (!connectable || ip == sdp->sd_root_dir->u.generic_ip) return *len; spin_lock(&dentry->d_lock); inode = dentry->d_parent->d_inode; - ip = get_v2ip(inode); + ip = inode->u.generic_ip; gfs2_inode_hold(ip); spin_unlock(&dentry->d_lock); @@ -138,8 +141,8 @@ static int gfs2_get_name(struct dentry *parent, char *name, if (!S_ISDIR(dir->i_mode) || !inode) return -EINVAL; - dip = get_v2ip(dir); - ip = get_v2ip(inode); + dip = dir->u.generic_ip; + ip = inode->u.generic_ip; *name = 0; gnfd.inum = ip->i_num; @@ -181,7 +184,7 @@ static struct dentry *gfs2_get_parent(struct dentry *child) static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; struct gfs2_inum *inum = (struct gfs2_inum *)inum_p; struct gfs2_holder i_gh, ri_gh, rgd_gh; struct gfs2_rgrpd *rgd; @@ -194,7 +197,7 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, void *inum_p) inode = gfs2_iget(sb, inum); if (inode) { - ip = get_v2ip(inode); + ip = inode->u.generic_ip; if (ip->i_num.no_formal_ino != inum->no_formal_ino) { iput(inode); return ERR_PTR(-ESTALE); diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index e6ae2551b0cb0..d30c6db46241d 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -19,10 +19,13 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "dir.h" #include "glock.h" @@ -36,6 +39,7 @@ #include "quota.h" #include "rgrp.h" #include "trans.h" +#include "util.h" /* "bad" is for NFS support */ struct filldir_bad_entry { @@ -125,7 +129,7 @@ int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state, static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin) { - struct gfs2_inode *ip = get_v2ip(file->f_mapping->host); + struct gfs2_inode *ip = file->f_mapping->host->u.generic_ip; struct gfs2_holder i_gh; loff_t error; @@ -172,7 +176,7 @@ static ssize_t __gfs2_file_aio_read(struct kiocb *iocb, unsigned long nr_segs, loff_t *ppos) { struct file *filp = iocb->ki_filp; - struct gfs2_inode *ip = get_v2ip(filp->f_mapping->host); + struct gfs2_inode *ip = filp->f_mapping->host->u.generic_ip; struct gfs2_holder gh; ssize_t retval; unsigned long seg; @@ -354,7 +358,7 @@ static int filldir_reg_func(void *opaque, const char *name, unsigned int length, static int readdir_reg(struct file *file, void *dirent, filldir_t filldir) { - struct gfs2_inode *dip = get_v2ip(file->f_mapping->host); + struct gfs2_inode *dip = file->f_mapping->host->u.generic_ip; struct filldir_reg fdr; struct gfs2_holder d_gh; uint64_t offset = file->f_pos; @@ -443,7 +447,7 @@ static int filldir_bad_func(void *opaque, const char *name, unsigned int length, static int readdir_bad(struct file *file, void *dirent, filldir_t filldir) { - struct gfs2_inode *dip = get_v2ip(file->f_mapping->host); + struct gfs2_inode *dip = file->f_mapping->host->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; struct filldir_reg fdr; unsigned int entries, size; @@ -608,7 +612,7 @@ out: static int gfs2_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; switch (cmd) { case GFS2_IOCTL_SETFLAGS: @@ -630,7 +634,7 @@ static int gfs2_ioctl(struct inode *inode, struct file *file, unsigned int cmd, static int gfs2_mmap(struct file *file, struct vm_area_struct *vma) { - struct gfs2_inode *ip = get_v2ip(file->f_mapping->host); + struct gfs2_inode *ip = file->f_mapping->host->u.generic_ip; struct gfs2_holder i_gh; int error; @@ -665,7 +669,7 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma) static int gfs2_open(struct inode *inode, struct file *file) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder i_gh; struct gfs2_file *fp; int error; @@ -679,8 +683,8 @@ static int gfs2_open(struct inode *inode, struct file *file) fp->f_inode = ip; fp->f_vfile = file; - gfs2_assert_warn(ip->i_sbd, !get_v2fp(file)); - set_v2fp(file, fp); + gfs2_assert_warn(ip->i_sbd, !file->private_data); + file->private_data = fp; if (S_ISREG(ip->i_di.di_mode)) { error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, @@ -708,7 +712,7 @@ static int gfs2_open(struct inode *inode, struct file *file) gfs2_glock_dq_uninit(&i_gh); fail: - set_v2fp(file, NULL); + file->private_data = NULL; kfree(fp); return error; @@ -724,11 +728,11 @@ static int gfs2_open(struct inode *inode, struct file *file) static int gfs2_close(struct inode *inode, struct file *file) { - struct gfs2_sbd *sdp = get_v2sdp(inode->i_sb); + struct gfs2_sbd *sdp = inode->i_sb->s_fs_info; struct gfs2_file *fp; - fp = get_v2fp(file); - set_v2fp(file, NULL); + fp = file->private_data; + file->private_data = NULL; if (gfs2_assert_warn(sdp, fp)) return -EIO; @@ -748,7 +752,7 @@ static int gfs2_close(struct inode *inode, struct file *file) static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync) { - struct gfs2_inode *ip = get_v2ip(dentry->d_inode); + struct gfs2_inode *ip = dentry->d_inode->u.generic_ip; gfs2_log_flush_glock(ip->i_gl); @@ -766,7 +770,7 @@ static int gfs2_fsync(struct file *file, struct dentry *dentry, int datasync) static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) { - struct gfs2_inode *ip = get_v2ip(file->f_mapping->host); + struct gfs2_inode *ip = file->f_mapping->host->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; struct lm_lockname name = { .ln_number = ip->i_num.no_addr, @@ -824,7 +828,7 @@ static ssize_t gfs2_sendfile(struct file *in_file, loff_t *offset, size_t count, static int do_flock(struct file *file, int cmd, struct file_lock *fl) { - struct gfs2_file *fp = get_v2fp(file); + struct gfs2_file *fp = file->private_data; struct gfs2_holder *fl_gh = &fp->f_fl_gh; struct gfs2_inode *ip = fp->f_inode; struct gfs2_glock *gl; @@ -874,7 +878,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl) static void do_unflock(struct file *file, struct file_lock *fl) { - struct gfs2_file *fp = get_v2fp(file); + struct gfs2_file *fp = file->private_data; struct gfs2_holder *fl_gh = &fp->f_fl_gh; mutex_lock(&fp->f_fl_mutex); @@ -895,7 +899,7 @@ static void do_unflock(struct file *file, struct file_lock *fl) static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) { - struct gfs2_inode *ip = get_v2ip(file->f_mapping->host); + struct gfs2_inode *ip = file->f_mapping->host->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; if (!(fl->fl_flags & FL_FLOCK)) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 535f020f1e0cf..4c4115f9d960f 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -15,9 +15,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "daemon.h" #include "glock.h" #include "glops.h" @@ -32,6 +35,7 @@ #include "super.h" #include "unlinked.h" #include "sys.h" +#include "util.h" #define DO 0 #define UNDO 1 @@ -47,7 +51,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) memset(sdp, 0, sizeof(struct gfs2_sbd)); - set_v2sdp(sb, sdp); + sb->s_fs_info = sdp; sdp->sd_vfs = sb; gfs2_tune_init(&sdp->sd_tune); @@ -382,6 +386,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) { struct gfs2_holder ji_gh; struct task_struct *p; + struct gfs2_inode *ip; int jindex = 1; int error = 0; @@ -396,7 +401,8 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) fs_err(sdp, "can't lookup journal index: %d\n", error); return error; } - set_bit(GLF_STICKY, &get_v2ip(sdp->sd_jindex)->i_gl->gl_flags); + ip = sdp->sd_jindex->u.generic_ip; + set_bit(GLF_STICKY, &ip->i_gl->gl_flags); /* Load in the journal index special file */ @@ -436,8 +442,8 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) goto fail_jindex; } - error = gfs2_glock_nq_init( - get_v2ip(sdp->sd_jdesc->jd_inode)->i_gl, + ip = sdp->sd_jdesc->jd_inode->u.generic_ip; + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_NOEXP | GL_EXACT, &sdp->sd_jinode_gh); @@ -522,6 +528,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) static int init_inodes(struct gfs2_sbd *sdp, int undo) { int error = 0; + struct gfs2_inode *ip; if (undo) goto fail_qinode; @@ -560,8 +567,9 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) fs_err(sdp, "can't get resource index inode: %d\n", error); goto fail_statfs; } - set_bit(GLF_STICKY, &get_v2ip(sdp->sd_rindex)->i_gl->gl_flags); - sdp->sd_rindex_vn = get_v2ip(sdp->sd_rindex)->i_gl->gl_vn - 1; + ip = sdp->sd_rindex->u.generic_ip; + set_bit(GLF_STICKY, &ip->i_gl->gl_flags); + sdp->sd_rindex_vn = ip->i_gl->gl_vn - 1; /* Read in the quota inode */ error = gfs2_lookup_simple(sdp->sd_master_dir, "quota", @@ -597,6 +605,7 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) struct inode *pn = NULL; char buf[30]; int error = 0; + struct gfs2_inode *ip; if (sdp->sd_args.ar_spectator) return 0; @@ -641,7 +650,8 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) iput(pn); pn = NULL; - error = gfs2_glock_nq_init(get_v2ip(sdp->sd_ir_inode)->i_gl, + ip = sdp->sd_ir_inode->u.generic_ip; + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, &sdp->sd_ir_gh); if (error) { @@ -649,7 +659,8 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) goto fail_qc_i; } - error = gfs2_glock_nq_init(get_v2ip(sdp->sd_sc_inode)->i_gl, + ip = sdp->sd_sc_inode->u.generic_ip; + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, &sdp->sd_sc_gh); if (error) { @@ -657,7 +668,8 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) goto fail_ir_gh; } - error = gfs2_glock_nq_init(get_v2ip(sdp->sd_ut_inode)->i_gl, + ip = sdp->sd_ut_inode->u.generic_ip; + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, &sdp->sd_ut_gh); if (error) { @@ -665,7 +677,8 @@ static int init_per_node(struct gfs2_sbd *sdp, int undo) goto fail_sc_gh; } - error = gfs2_glock_nq_init(get_v2ip(sdp->sd_qc_inode)->i_gl, + ip = sdp->sd_qc_inode->u.generic_ip; + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_NEVER_RECURSE, &sdp->sd_qc_gh); if (error) { @@ -862,7 +875,7 @@ static int fill_super(struct super_block *sb, void *data, int silent) fail: vfree(sdp); - set_v2sdp(sb, NULL); + sb->s_fs_info = NULL; return error; } diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 9971a30eb78ec..7633a8584b0db 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -17,10 +17,13 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "acl.h" #include "bmap.h" #include "dir.h" @@ -36,6 +39,7 @@ #include "rgrp.h" #include "trans.h" #include "unlinked.h" +#include "util.h" /** * gfs2_create - Create a file @@ -49,7 +53,7 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) { - struct gfs2_inode *dip = get_v2ip(dir); + struct gfs2_inode *dip = dir->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; struct gfs2_holder ghs[2]; struct inode *inode; @@ -106,7 +110,7 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry, static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) { - struct gfs2_inode *dip = get_v2ip(dir); + struct gfs2_inode *dip = dir->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; struct inode *inode = NULL; int error; @@ -140,10 +144,10 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, static int gfs2_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) { - struct gfs2_inode *dip = get_v2ip(dir); + struct gfs2_inode *dip = dir->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; struct inode *inode = old_dentry->d_inode; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder ghs[2]; int alloc_required; int error; @@ -274,9 +278,9 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir, static int gfs2_unlink(struct inode *dir, struct dentry *dentry) { - struct gfs2_inode *dip = get_v2ip(dir); + struct gfs2_inode *dip = dir->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; - struct gfs2_inode *ip = get_v2ip(dentry->d_inode); + struct gfs2_inode *ip = dentry->d_inode->u.generic_ip; struct gfs2_unlinked *ul; struct gfs2_holder ghs[2]; int error; @@ -329,7 +333,7 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry) static int gfs2_symlink(struct inode *dir, struct dentry *dentry, const char *symname) { - struct gfs2_inode *dip = get_v2ip(dir), *ip; + struct gfs2_inode *dip = dir->u.generic_ip, *ip; struct gfs2_sbd *sdp = dip->i_sbd; struct gfs2_holder ghs[2]; struct inode *inode; @@ -350,7 +354,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry, return PTR_ERR(inode); } - ip = get_gl2ip(ghs[1].gh_gl); + ip = ghs[1].gh_gl->gl_object; ip->i_di.di_size = size; @@ -388,7 +392,7 @@ static int gfs2_symlink(struct inode *dir, struct dentry *dentry, static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) { - struct gfs2_inode *dip = get_v2ip(dir), *ip; + struct gfs2_inode *dip = dir->u.generic_ip, *ip; struct gfs2_sbd *sdp = dip->i_sbd; struct gfs2_holder ghs[2]; struct inode *inode; @@ -403,7 +407,7 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) return PTR_ERR(inode); } - ip = get_gl2ip(ghs[1].gh_gl); + ip = ghs[1].gh_gl->gl_object; ip->i_di.di_nlink = 2; ip->i_di.di_size = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode); @@ -468,9 +472,9 @@ static int gfs2_mkdir(struct inode *dir, struct dentry *dentry, int mode) static int gfs2_rmdir(struct inode *dir, struct dentry *dentry) { - struct gfs2_inode *dip = get_v2ip(dir); + struct gfs2_inode *dip = dir->u.generic_ip; struct gfs2_sbd *sdp = dip->i_sbd; - struct gfs2_inode *ip = get_v2ip(dentry->d_inode); + struct gfs2_inode *ip = dentry->d_inode->u.generic_ip; struct gfs2_unlinked *ul; struct gfs2_holder ghs[2]; int error; @@ -534,7 +538,7 @@ static int gfs2_rmdir(struct inode *dir, struct dentry *dentry) static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) { - struct gfs2_inode *dip = get_v2ip(dir), *ip; + struct gfs2_inode *dip = dir->u.generic_ip, *ip; struct gfs2_sbd *sdp = dip->i_sbd; struct gfs2_holder ghs[2]; struct inode *inode; @@ -563,7 +567,7 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, return PTR_ERR(inode); } - ip = get_gl2ip(ghs[1].gh_gl); + ip = ghs[1].gh_gl->gl_object; ip->i_di.di_major = major; ip->i_di.di_minor = minor; @@ -602,9 +606,9 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, static int gfs2_rename(struct inode *odir, struct dentry *odentry, struct inode *ndir, struct dentry *ndentry) { - struct gfs2_inode *odip = get_v2ip(odir); - struct gfs2_inode *ndip = get_v2ip(ndir); - struct gfs2_inode *ip = get_v2ip(odentry->d_inode); + struct gfs2_inode *odip = odir->u.generic_ip; + struct gfs2_inode *ndip = ndir->u.generic_ip; + struct gfs2_inode *ip = odentry->d_inode->u.generic_ip; struct gfs2_inode *nip = NULL; struct gfs2_sbd *sdp = odip->i_sbd; struct gfs2_unlinked *ul; @@ -616,7 +620,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, int error; if (ndentry->d_inode) { - nip = get_v2ip(ndentry->d_inode); + nip = ndentry->d_inode->u.generic_ip; if (ip == nip) return 0; } @@ -848,7 +852,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, static int gfs2_readlink(struct dentry *dentry, char __user *user_buf, int user_size) { - struct gfs2_inode *ip = get_v2ip(dentry->d_inode); + struct gfs2_inode *ip = dentry->d_inode->u.generic_ip; char array[GFS2_FAST_NAME_SIZE], *buf = array; unsigned int len = GFS2_FAST_NAME_SIZE; int error; @@ -884,7 +888,7 @@ static int gfs2_readlink(struct dentry *dentry, char __user *user_buf, static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) { - struct gfs2_inode *ip = get_v2ip(dentry->d_inode); + struct gfs2_inode *ip = dentry->d_inode->u.generic_ip; char array[GFS2_FAST_NAME_SIZE], *buf = array; unsigned int len = GFS2_FAST_NAME_SIZE; int error; @@ -910,7 +914,7 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd) static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder i_gh; int error; @@ -930,7 +934,7 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd) static int setattr_size(struct inode *inode, struct iattr *attr) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; int error; if (attr->ia_size != ip->i_di.di_size) { @@ -948,7 +952,7 @@ static int setattr_size(struct inode *inode, struct iattr *attr) static int setattr_chown(struct inode *inode, struct iattr *attr) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; struct buffer_head *dibh; uint32_t ouid, ogid, nuid, ngid; @@ -1025,7 +1029,7 @@ static int setattr_chown(struct inode *inode, struct iattr *attr) static int gfs2_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder i_gh; int error; @@ -1072,7 +1076,7 @@ static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = dentry->d_inode; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_holder gh; int error; @@ -1088,7 +1092,7 @@ static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry, static int gfs2_setxattr(struct dentry *dentry, const char *name, const void *data, size_t size, int flags) { - struct gfs2_inode *ip = get_v2ip(dentry->d_inode); + struct gfs2_inode *ip = dentry->d_inode->u.generic_ip; struct gfs2_ea_request er; memset(&er, 0, sizeof(struct gfs2_ea_request)); @@ -1118,7 +1122,7 @@ static ssize_t gfs2_getxattr(struct dentry *dentry, const char *name, er.er_name_len = strlen(er.er_name); er.er_data_len = size; - return gfs2_ea_get(get_v2ip(dentry->d_inode), &er); + return gfs2_ea_get(dentry->d_inode->u.generic_ip, &er); } static ssize_t gfs2_listxattr(struct dentry *dentry, char *buffer, size_t size) @@ -1129,7 +1133,7 @@ static ssize_t gfs2_listxattr(struct dentry *dentry, char *buffer, size_t size) er.er_data = (size) ? buffer : NULL; er.er_data_len = size; - return gfs2_ea_list(get_v2ip(dentry->d_inode), &er); + return gfs2_ea_list(dentry->d_inode->u.generic_ip, &er); } static int gfs2_removexattr(struct dentry *dentry, const char *name) @@ -1142,7 +1146,7 @@ static int gfs2_removexattr(struct dentry *dentry, const char *name) return -EOPNOTSUPP; er.er_name_len = strlen(er.er_name); - return gfs2_ea_remove(get_v2ip(dentry->d_inode), &er); + return gfs2_ea_remove(dentry->d_inode->u.generic_ip, &er); } struct inode_operations gfs2_file_iops = { diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 48a94522406ea..10f70ee121613 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c @@ -18,9 +18,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "inode.h" #include "lm.h" @@ -33,6 +36,7 @@ #include "rgrp.h" #include "super.h" #include "sys.h" +#include "util.h" /** * gfs2_write_inode - Make sure the inode is stable on the disk @@ -44,7 +48,7 @@ static int gfs2_write_inode(struct inode *inode, int sync) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; if (current->flags & PF_MEMALLOC) return 0; @@ -62,7 +66,7 @@ static int gfs2_write_inode(struct inode *inode, int sync) static void gfs2_put_super(struct super_block *sb) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; int error; if (!sdp) @@ -138,7 +142,7 @@ static void gfs2_put_super(struct super_block *sb) vfree(sdp); - set_v2sdp(sb, NULL); + sb->s_fs_info = NULL; } /** @@ -151,7 +155,7 @@ static void gfs2_put_super(struct super_block *sb) static void gfs2_write_super(struct super_block *sb) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; gfs2_log_flush(sdp); } @@ -163,7 +167,7 @@ static void gfs2_write_super(struct super_block *sb) static void gfs2_write_super_lockfs(struct super_block *sb) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; int error; for (;;) { @@ -194,7 +198,7 @@ static void gfs2_write_super_lockfs(struct super_block *sb) static void gfs2_unlockfs(struct super_block *sb) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; gfs2_unfreeze_fs(sdp); } @@ -208,7 +212,7 @@ static void gfs2_unlockfs(struct super_block *sb) static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; struct gfs2_statfs_change sc; int error; @@ -245,7 +249,7 @@ static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf) static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) { - struct gfs2_sbd *sdp = get_v2sdp(sb); + struct gfs2_sbd *sdp = sb->s_fs_info; int error; error = gfs2_mount_args(sdp, data, 1); @@ -283,12 +287,12 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) static void gfs2_clear_inode(struct inode *inode) { - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; if (ip) { spin_lock(&ip->i_spin); ip->i_vnode = NULL; - set_v2ip(inode, NULL); + inode->u.generic_ip = NULL; spin_unlock(&ip->i_spin); gfs2_glock_schedule_for_reclaim(ip->i_gl); @@ -306,7 +310,7 @@ static void gfs2_clear_inode(struct inode *inode) static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) { - struct gfs2_sbd *sdp = get_v2sdp(mnt->mnt_sb); + struct gfs2_sbd *sdp = mnt->mnt_sb->s_fs_info; struct gfs2_args *args = &sdp->sd_args; if (args->ar_lockproto[0]) diff --git a/fs/gfs2/ops_vm.c b/fs/gfs2/ops_vm.c index bfeb920dccee1..dbc57071e7bb4 100644 --- a/fs/gfs2/ops_vm.c +++ b/fs/gfs2/ops_vm.c @@ -14,9 +14,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "inode.h" @@ -25,6 +28,7 @@ #include "quota.h" #include "rgrp.h" #include "trans.h" +#include "util.h" static void pfault_be_greedy(struct gfs2_inode *ip) { @@ -43,7 +47,7 @@ static void pfault_be_greedy(struct gfs2_inode *ip) static struct page *gfs2_private_nopage(struct vm_area_struct *area, unsigned long address, int *type) { - struct gfs2_inode *ip = get_v2ip(area->vm_file->f_mapping->host); + struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip; struct gfs2_holder i_gh; struct page *result; int error; @@ -141,7 +145,7 @@ static int alloc_page_backing(struct gfs2_inode *ip, struct page *page) static struct page *gfs2_sharewrite_nopage(struct vm_area_struct *area, unsigned long address, int *type) { - struct gfs2_inode *ip = get_v2ip(area->vm_file->f_mapping->host); + struct gfs2_inode *ip = area->vm_file->f_mapping->host->u.generic_ip; struct gfs2_holder i_gh; struct page *result = NULL; unsigned long index = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) + diff --git a/fs/gfs2/page.c b/fs/gfs2/page.c index 3542aa6b01c43..a2c9e93c7c391 100644 --- a/fs/gfs2/page.c +++ b/fs/gfs2/page.c @@ -14,14 +14,18 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "inode.h" #include "page.h" #include "trans.h" #include "ops_address.h" +#include "util.h" /** * gfs2_pte_inval - Sync and invalidate all PTEs associated with a glock @@ -34,7 +38,7 @@ void gfs2_pte_inval(struct gfs2_glock *gl) struct gfs2_inode *ip; struct inode *inode; - ip = get_gl2ip(gl); + ip = gl->gl_object; if (!ip || !S_ISREG(ip->i_di.di_mode)) return; @@ -64,7 +68,7 @@ void gfs2_page_inval(struct gfs2_glock *gl) struct gfs2_inode *ip; struct inode *inode; - ip = get_gl2ip(gl); + ip = gl->gl_object; if (!ip || !S_ISREG(ip->i_di.di_mode)) return; @@ -95,7 +99,7 @@ void gfs2_page_sync(struct gfs2_glock *gl, int flags) struct gfs2_inode *ip; struct inode *inode; - ip = get_gl2ip(gl); + ip = gl->gl_object; if (!ip || !S_ISREG(ip->i_di.di_mode)) return; @@ -192,7 +196,7 @@ int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, int gfs2_block_truncate_page(struct address_space *mapping) { struct inode *inode = mapping->host; - struct gfs2_inode *ip = get_v2ip(inode); + struct gfs2_inode *ip = inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; loff_t from = inode->i_size; unsigned long index = from >> PAGE_CACHE_SHIFT; diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 40c7cf87eb441..c57b5cf1d583f 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -44,13 +44,17 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "glops.h" #include "log.h" +#include "lvb.h" #include "meta_io.h" #include "quota.h" #include "rgrp.h" @@ -59,6 +63,7 @@ #include "inode.h" #include "ops_file.h" #include "ops_address.h" +#include "util.h" #define QUOTA_USER 1 #define QUOTA_GROUP 0 @@ -244,7 +249,7 @@ static void slot_put(struct gfs2_quota_data *qd) static int bh_get(struct gfs2_quota_data *qd) { struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; - struct gfs2_inode *ip = get_v2ip(sdp->sd_qc_inode); + struct gfs2_inode *ip = sdp->sd_qc_inode->u.generic_ip; unsigned int block, offset; uint64_t dblock; int new = 0; @@ -526,7 +531,7 @@ static int sort_qd(const void *a, const void *b) static void do_qc(struct gfs2_quota_data *qd, int64_t change) { struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; - struct gfs2_inode *ip = get_v2ip(sdp->sd_qc_inode); + struct gfs2_inode *ip = sdp->sd_qc_inode->u.generic_ip; struct gfs2_quota_change *qc = qd->qd_bh_qc; int64_t x; @@ -642,7 +647,7 @@ unlock: static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda) { struct gfs2_sbd *sdp = (*qda)->qd_gl->gl_sbd; - struct gfs2_inode *ip = get_v2ip(sdp->sd_quota_inode); + struct gfs2_inode *ip = sdp->sd_quota_inode->u.generic_ip; unsigned int data_blocks, ind_blocks; struct file_ra_state ra_state; struct gfs2_holder *ghs, i_gh; @@ -753,6 +758,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, struct gfs2_holder *q_gh) { struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; + struct gfs2_inode *ip = sdp->sd_quota_inode->u.generic_ip; struct gfs2_holder i_gh; struct gfs2_quota q; char buf[sizeof(struct gfs2_quota)]; @@ -776,7 +782,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, if (error) return error; - error = gfs2_glock_nq_init(get_v2ip(sdp->sd_quota_inode)->i_gl, + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &i_gh); if (error) @@ -784,7 +790,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, memset(buf, 0, sizeof(struct gfs2_quota)); pos = qd2offset(qd); - error = gfs2_internal_read(get_v2ip(sdp->sd_quota_inode), + error = gfs2_internal_read(ip, &ra_state, buf, &pos, sizeof(struct gfs2_quota)); @@ -1118,7 +1124,7 @@ int gfs2_quota_read(struct gfs2_sbd *sdp, int user, uint32_t id, int gfs2_quota_init(struct gfs2_sbd *sdp) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_qc_inode); + struct gfs2_inode *ip = sdp->sd_qc_inode->u.generic_ip; unsigned int blocks = ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; unsigned int x, slot = 0; unsigned int found = 0; @@ -1133,7 +1139,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) return -EIO; } sdp->sd_quota_slots = blocks * sdp->sd_qc_per_block; - sdp->sd_quota_chunks = DIV_RU(sdp->sd_quota_slots, 8 * PAGE_SIZE); + sdp->sd_quota_chunks = DIV_ROUND_UP(sdp->sd_quota_slots, 8 * PAGE_SIZE); error = -ENOMEM; diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index e5f2b284fa54e..2df450e2f433e 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -12,9 +12,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "glock.h" #include "glops.h" @@ -23,22 +26,24 @@ #include "meta_io.h" #include "recovery.h" #include "super.h" +#include "util.h" int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk, struct buffer_head **bh) { - struct gfs2_glock *gl = get_v2ip(jd->jd_inode)->i_gl; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_glock *gl = ip->i_gl; int new = 0; uint64_t dblock; uint32_t extlen; int error; - error = gfs2_block_map(get_v2ip(jd->jd_inode), blk, &new, &dblock, + error = gfs2_block_map(ip, blk, &new, &dblock, &extlen); if (error) return error; if (!dblock) { - gfs2_consist_inode(get_v2ip(jd->jd_inode)); + gfs2_consist_inode(ip); return -EIO; } @@ -185,7 +190,7 @@ static int find_good_lh(struct gfs2_jdesc *jd, unsigned int *blk, *blk = 0; if (*blk == orig_blk) { - gfs2_consist_inode(get_v2ip(jd->jd_inode)); + gfs2_consist_inode(jd->jd_inode->u.generic_ip); return -EIO; } } @@ -219,7 +224,7 @@ static int jhead_scan(struct gfs2_jdesc *jd, struct gfs2_log_header *head) continue; if (lh.lh_sequence == head->lh_sequence) { - gfs2_consist_inode(get_v2ip(jd->jd_inode)); + gfs2_consist_inode(jd->jd_inode->u.generic_ip); return -EIO; } if (lh.lh_sequence < head->lh_sequence) @@ -295,7 +300,8 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header *head) static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, unsigned int end, int pass) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; struct buffer_head *bh; struct gfs2_log_descriptor *ld; int error = 0; @@ -324,7 +330,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, continue; } if (error == 1) { - gfs2_consist_inode(get_v2ip(jd->jd_inode)); + gfs2_consist_inode(jd->jd_inode->u.generic_ip); error = -EIO; } brelse(bh); @@ -361,7 +367,7 @@ static int foreach_descriptor(struct gfs2_jdesc *jd, unsigned int start, static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) { - struct gfs2_inode *ip = get_v2ip(jd->jd_inode); + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; unsigned int lblock; int new = 0; @@ -420,7 +426,8 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait) { - struct gfs2_sbd *sdp = get_v2ip(jd->jd_inode)->i_sbd; + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; + struct gfs2_sbd *sdp = ip->i_sbd; struct gfs2_log_header head; struct gfs2_holder j_gh, ji_gh, t_gh; unsigned long t; @@ -450,7 +457,7 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait) goto fail; }; - error = gfs2_glock_nq_init(get_v2ip(jd->jd_inode)->i_gl, LM_ST_SHARED, + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_NOEXP, &ji_gh); if (error) goto fail_gunlock_j; @@ -516,7 +523,7 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait) gfs2_glock_dq_uninit(&t_gh); - t = DIV_RU(jiffies - t, HZ); + t = DIV_ROUND_UP(jiffies - t, HZ); fs_info(sdp, "jid=%u: Journal replayed in %lus\n", jd->jd_jid, t); diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 9525b176f5028..4ae5596943969 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -13,9 +13,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bits.h" #include "glock.h" #include "glops.h" @@ -26,6 +29,7 @@ #include "super.h" #include "trans.h" #include "ops_file.h" +#include "util.h" /** * gfs2_rgrp_verify - Verify that a resource group is consistent @@ -171,7 +175,7 @@ static void clear_rgrpdi(struct gfs2_sbd *sdp) list_del(&rgd->rd_list_mru); if (gl) { - set_gl2rgd(gl, NULL); + gl->gl_object = NULL; gfs2_glock_put(gl); } @@ -320,7 +324,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) if (error) goto fail; - set_gl2rgd(rgd->rd_gl, rgd); + rgd->rd_gl->gl_object = rgd; rgd->rd_rg_vn = rgd->rd_gl->gl_vn - 1; } @@ -354,7 +358,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_rindex); + struct gfs2_inode *ip = sdp->sd_rindex->u.generic_ip; struct gfs2_glock *gl = ip->i_gl; int error; diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 2c1c6aa1c077e..9ccf0b9c5980d 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c @@ -12,9 +12,12 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "dir.h" #include "format.h" @@ -29,6 +32,7 @@ #include "super.h" #include "trans.h" #include "unlinked.h" +#include "util.h" /** * gfs2_tune_init - Fill a gfs2_tune structure with default values @@ -207,12 +211,12 @@ int gfs2_read_sb(struct gfs2_sbd *sdp, struct gfs2_glock *gl, int silent) /* Compute maximum reservation required to add a entry to a directory */ - hash_blocks = DIV_RU(sizeof(uint64_t) * (1 << GFS2_DIR_MAX_DEPTH), + hash_blocks = DIV_ROUND_UP(sizeof(uint64_t) * (1 << GFS2_DIR_MAX_DEPTH), sdp->sd_jbsize); ind_blocks = 0; for (tmp_blocks = hash_blocks; tmp_blocks > sdp->sd_diptrs;) { - tmp_blocks = DIV_RU(tmp_blocks, sdp->sd_inptrs); + tmp_blocks = DIV_ROUND_UP(tmp_blocks, sdp->sd_inptrs); ind_blocks += tmp_blocks; } @@ -278,7 +282,7 @@ int gfs2_do_upgrade(struct gfs2_sbd *sdp, struct gfs2_glock *sb_gl) int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) { - struct gfs2_inode *dip = get_v2ip(sdp->sd_jindex); + struct gfs2_inode *dip = sdp->sd_jindex->u.generic_ip; struct qstr name; char buf[20]; struct gfs2_jdesc *jd; @@ -296,7 +300,7 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) name.len = sprintf(buf, "journal%u", sdp->sd_journals); - error = gfs2_dir_search(get_v2ip(sdp->sd_jindex), + error = gfs2_dir_search(sdp->sd_jindex->u.generic_ip, &name, NULL, NULL); if (error == -ENOENT) { error = 0; @@ -419,7 +423,7 @@ struct gfs2_jdesc *gfs2_jdesc_find_dirty(struct gfs2_sbd *sdp) int gfs2_jdesc_check(struct gfs2_jdesc *jd) { - struct gfs2_inode *ip = get_v2ip(jd->jd_inode); + struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; struct gfs2_sbd *sdp = ip->i_sbd; int ar; int error; @@ -471,7 +475,8 @@ int gfs2_lookup_master_dir(struct gfs2_sbd *sdp) int gfs2_make_fs_rw(struct gfs2_sbd *sdp) { - struct gfs2_glock *j_gl = get_v2ip(sdp->sd_jdesc->jd_inode)->i_gl; + struct gfs2_inode *ip = sdp->sd_jdesc->jd_inode->u.generic_ip; + struct gfs2_glock *j_gl = ip->i_gl; struct gfs2_holder t_gh; struct gfs2_log_header head; int error; @@ -481,7 +486,7 @@ int gfs2_make_fs_rw(struct gfs2_sbd *sdp) if (error) return error; - gfs2_meta_cache_flush(get_v2ip(sdp->sd_jdesc->jd_inode)); + gfs2_meta_cache_flush(ip); j_gl->gl_ops->go_inval(j_gl, DIO_METADATA | DIO_DATA); error = gfs2_find_jhead(sdp->sd_jdesc, &head); @@ -559,9 +564,9 @@ int gfs2_make_fs_ro(struct gfs2_sbd *sdp) int gfs2_statfs_init(struct gfs2_sbd *sdp) { - struct gfs2_inode *m_ip = get_v2ip(sdp->sd_statfs_inode); + struct gfs2_inode *m_ip = sdp->sd_statfs_inode->u.generic_ip; struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; - struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode); + struct gfs2_inode *l_ip = sdp->sd_sc_inode->u.generic_ip; struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; struct buffer_head *m_bh, *l_bh; struct gfs2_holder gh; @@ -608,7 +613,7 @@ 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) { - struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode); + struct gfs2_inode *l_ip = sdp->sd_sc_inode->u.generic_ip; struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; struct buffer_head *l_bh; int error; @@ -634,8 +639,8 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, int64_t total, int64_t free, int gfs2_statfs_sync(struct gfs2_sbd *sdp) { - struct gfs2_inode *m_ip = get_v2ip(sdp->sd_statfs_inode); - struct gfs2_inode *l_ip = get_v2ip(sdp->sd_sc_inode); + struct gfs2_inode *m_ip = sdp->sd_statfs_inode->u.generic_ip; + struct gfs2_inode *l_ip = sdp->sd_sc_inode->u.generic_ip; struct gfs2_statfs_change *m_sc = &sdp->sd_statfs_master; struct gfs2_statfs_change *l_sc = &sdp->sd_statfs_local; struct gfs2_holder gh; @@ -795,7 +800,8 @@ int gfs2_statfs_slow(struct gfs2_sbd *sdp, struct gfs2_statfs_change *sc) error = err; } else { if (!error) - error = statfs_slow_fill(get_gl2rgd(gh->gh_gl), sc); + error = statfs_slow_fill( + gh->gh_gl->gl_object, sc); gfs2_glock_dq_uninit(gh); } } @@ -846,6 +852,7 @@ struct lfcc { int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, struct gfs2_holder *t_gh) { + struct gfs2_inode *ip; struct gfs2_holder ji_gh; struct gfs2_jdesc *jd; struct lfcc *lfcc; @@ -863,7 +870,8 @@ int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, struct gfs2_holder *t_gh) error = -ENOMEM; goto out; } - error = gfs2_glock_nq_init(get_v2ip(jd->jd_inode)->i_gl, + ip = jd->jd_inode->u.generic_ip; + error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &lfcc->gh); if (error) { diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index f87df8ec041ea..f05ba8f691328 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -14,15 +14,19 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "lm.h" #include "sys.h" #include "super.h" #include "glock.h" #include "quota.h" +#include "util.h" char *gfs2_sys_margs; spinlock_t gfs2_sys_margs_lock; diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 0a0ea70eac4c6..2cce68aec134f 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -12,14 +12,18 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "log.h" #include "lops.h" #include "meta_io.h" #include "trans.h" +#include "util.h" int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks, unsigned int revokes, char *file, unsigned int line) @@ -27,7 +31,7 @@ int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks, struct gfs2_trans *tr; int error; - if (gfs2_assert_warn(sdp, !get_transaction) || + if (gfs2_assert_warn(sdp, !current->journal_info) || gfs2_assert_warn(sdp, blocks || revokes)) { fs_warn(sdp, "(%s, %u)\n", file, line); return -EINVAL; @@ -69,7 +73,7 @@ int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks, if (error) goto fail_gunlock; - set_transaction(tr); + current->journal_info = tr; return 0; @@ -90,8 +94,8 @@ void gfs2_trans_end(struct gfs2_sbd *sdp) struct gfs2_trans *tr; struct gfs2_holder *t_gh; - tr = get_transaction; - set_transaction(NULL); + tr = current->journal_info; + current->journal_info = NULL; if (gfs2_assert_warn(sdp, tr)) return; @@ -147,12 +151,12 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta) struct gfs2_sbd *sdp = gl->gl_sbd; struct gfs2_bufdata *bd; - bd = get_v2bd(bh); + bd = bh->b_private; if (bd) gfs2_assert(sdp, bd->bd_gl == gl); else { gfs2_attach_bufdata(gl, bh, meta); - bd = get_v2bd(bh); + bd = bh->b_private; } lops_add(sdp, &bd->bd_le); } @@ -186,8 +190,9 @@ void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, uint64_t blkno) gfs2_log_unlock(sdp); if (found) { + struct gfs2_trans *tr = current->journal_info; kfree(rv); - get_transaction->tr_num_revoke_rm++; + tr->tr_num_revoke_rm++; } } diff --git a/fs/gfs2/unlinked.c b/fs/gfs2/unlinked.c index e92a3a11815ba..24b91c23bc2dc 100644 --- a/fs/gfs2/unlinked.c +++ b/fs/gfs2/unlinked.c @@ -13,19 +13,23 @@ #include #include #include +#include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "bmap.h" #include "inode.h" #include "meta_io.h" #include "trans.h" #include "unlinked.h" +#include "util.h" static int munge_ondisk(struct gfs2_sbd *sdp, unsigned int slot, struct gfs2_unlinked_tag *ut) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_ut_inode); + struct gfs2_inode *ip = sdp->sd_ut_inode->u.generic_ip; unsigned int block, offset; uint64_t dblock; int new = 0; @@ -312,7 +316,7 @@ int gfs2_unlinked_dealloc(struct gfs2_sbd *sdp) int gfs2_unlinked_init(struct gfs2_sbd *sdp) { - struct gfs2_inode *ip = get_v2ip(sdp->sd_ut_inode); + struct gfs2_inode *ip = sdp->sd_ut_inode->u.generic_ip; unsigned int blocks = ip->i_di.di_size >> sdp->sd_sb.sb_bsize_shift; unsigned int x, slot = 0; unsigned int found = 0; @@ -327,7 +331,8 @@ int gfs2_unlinked_init(struct gfs2_sbd *sdp) return -EIO; } sdp->sd_unlinked_slots = blocks * sdp->sd_ut_per_block; - sdp->sd_unlinked_chunks = DIV_RU(sdp->sd_unlinked_slots, 8 * PAGE_SIZE); + sdp->sd_unlinked_chunks = DIV_ROUND_UP(sdp->sd_unlinked_slots, + 8 * PAGE_SIZE); error = -ENOMEM; diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 4fb1704aac10d..8b22fa91bd149 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -13,12 +13,16 @@ #include #include #include +#include #include #include #include "gfs2.h" +#include "lm_interface.h" +#include "incore.h" #include "glock.h" #include "lm.h" +#include "util.h" kmem_cache_t *gfs2_glock_cachep __read_mostly; kmem_cache_t *gfs2_inode_cachep __read_mostly; diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index ec432e0c208df..8d4f0445df474 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h @@ -50,15 +50,18 @@ * An on-disk inode number */ -#define gfs2_inum_equal(ino1, ino2) \ - (((ino1)->no_formal_ino == (ino2)->no_formal_ino) && \ - ((ino1)->no_addr == (ino2)->no_addr)) - struct gfs2_inum { __be64 no_formal_ino; __be64 no_addr; }; +static inline int gfs2_inum_equal(const struct gfs2_inum *ino1, + const struct gfs2_inum *ino2) +{ + return ino1->no_formal_ino == ino2->no_formal_ino && + ino1->no_addr == ino2->no_addr; +} + /* * Generic metadata head structure * Every inplace buffer logged in the journal must start with this. diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 3b507bf05d098..f789278a625ae 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -29,6 +29,7 @@ extern const char linux_banner[]; #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ -- 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/gfs2.h') diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index d822256c7a53b..343dbe3e87bbf 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 a174b4f6bcc29..067105786eaa8 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 32b1d66e68e16..41abd3f4fc737 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 bc46c11491201..06ccb2d808ad9 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 aa4d13002bb45..9e7b9f296786d 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 a27fdeda5fbb6..aa68e7a1b0b76 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 7f8b27e409168..6918a58261e29 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 d209f1fcb8ac8..173403095eb22 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 e5e2565ac2923..85c1dbace88b8 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 30ec6a09bfd0f..3dece17e31166 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 3930304bc511e..f5169a42a9198 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 ffd56686225ba..19fb1dc4ddc42 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 c7bf32ce3eca2..239f0c3553fc4 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 57175f70e2bd5..6edbd551a4c04 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 2029df4b349f9..c041590315384 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 a36b26585fb83..9df09c7eeb952 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 5e8ec6a618242..e262f22f744e0 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 94f2d264aa642..5c1e9491024f8 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 84dd2f579e62e..fc4a983e3c893 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 d218cbf98aa73..27fbcd9b12f0b 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 13bc4eacac6b0..5ef21317b2f6d 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 600b2bc48ba9e..f45c0ffd1c356 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 4ee5c34434bc6..e821101d19c0a 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 378432f17f272..9d34bf3df1036 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 6a78aacb26af9..183192836e986 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 0e5e9cf9dd466..2a8b4b71dd1fa 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 84a3e902e8487..8cfd0f1d29f83 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 22a4f038e3b9e..e4c75a74df5bc 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 0c78d222d6f24..8a1029d3d389a 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 a56b23e0a3f11..e88e9cce14e76 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 3c4c17405e9ac..1b1a8b75219a4 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 b0a4582e78db0..9ce56b5c78039 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 92c1a3f823d8a..b9895bbd5feb5 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 d72144d5d7279..23c6a596fd9e5 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 7e001356824e1..0d4b230785af7 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 bc8331cd7b2c4..2eb14722144f0 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 90d398d2d0478..b3bc21a6ba07e 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 6d2fc107bbd31..16d3ebd320926 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 f201a059fd91a..b88adddaffb2e 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 6cbff891063ef..fef415e2068ee 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 94e3ee1701655..1b6e75c0a4a72 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 a90397f281969..a376ead7d0cdd 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 2f342f3d8755b..88d58e57f5187 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 00522fc927cdd..1e8f602c1e507 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 192577b411f0a..a2edce38f5cb5 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 5899ac33451c4..a459820455091 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 c6452874483d9..622f5760d6b28 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 c8aeaafec50f6..0c06f92368f2d 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 5fafd87c8d7b3..930aaae913771 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 3661b2f25b8fb..6fa7b8649f140 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 a41d208dc5580..a15ccc2761131 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 23161be5db1f9..263c1fb7bbafe 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 54e3a8769cbbc..077cffcd4085c 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 bc80247060f40..cd93644c7d705 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 346e296420c62..2c853a90ac04f 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 adfb8062f5de1..f752b01846905 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 1baeeb23d2322..af05492f96447 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 527544b68a6f9..c504ac1b831d0 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 248481189300c..ac0f1d6ce4564 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 1b1a2aee8f6ba..c1c6fa9c0e4b1 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 4c44a191b1c11..d2db3719cc0f1 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 788dbea45c870..a943a505bc5ab 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 175afdde43bb4..df2495230402e 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 bbfa9e16abc33..d32a2c54daee4 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 62c8ed89ab9c6..c46a700e801e7 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 a4c414c593517..05e0b72d56ff0 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 6b5e9e8bf5619..60ef163dd9bb9 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 9ed0a6b8fc639..b92d730020553 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 51e77f88d74f1..159cf5ffe47e4 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 7c3806c674064..0b37d6bcc36e3 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 4532dbab0a2c9..8216d28bd816e 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 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/gfs2.h') diff --git a/fs/gfs2/Makefile b/fs/gfs2/Makefile index b92852b666293..e3f1ada643ac1 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 399317841501e..60c98c0314a18 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 067105786eaa8..5856ba764680d 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 d20d41e1c0285..913c0e5490e99 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 1a265412f7eef..ab0157c5ed0e5 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 1453605c8f32d..a2a07c41845d4 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 aa93eb6f668e3..801007120fb26 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 76a23c172eebd..7b8a38eaa41a0 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 173403095eb22..366a5571648f6 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 3ace242f2b168..3b8749c22731d 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 3dece17e31166..1c27700ee8b86 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 96736932260f2..9081822ce80cb 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 ae199692e51db..7b0291f99fd9f 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 239f0c3553fc4..9acbf457ee58f 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 6edbd551a4c04..3bb11c0f8b56a 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 b8ccb27906e81..989f4f78f9be7 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 75fad634ced23..07a8d02a234d2 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 1a30fa9bec7ab..8e1d8ee68e2ec 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 9409f0a7b47f5..ba943e4736658 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 362c2422d5069..06f5ec6ebf7fa 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 9fb340984b294..decb0cf856912 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 8bb8b559bceab..32015d89f2499 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 f45c0ffd1c356..1a9e75da19d1c 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 e821101d19c0a..15839aaa4ca6f 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 1da95a55f768f..e1e89d92a8dbb 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 ded1ef6c81e7c..11c4068105ccb 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 f769eac1a34ac..2d81d90db0970 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 530c2f542584d..941063498532b 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 870a1cd99f578..2194b1d5b5ec7 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 3caeafc02a1b6..f279385774b7e 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 1acb2519f4391..263636b390feb 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 0d8bd0806dba9..82bef017f944c 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 489235b2edba1..0b4be102e1705 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 748aa5d336415..95a29914730ae 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 af728cb3b3278..45ea3ec6f776e 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 8cfd0f1d29f83..80764e388bb2c 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 0ec38b3990977..e2c2582c8f6e0 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 8a1029d3d389a..2e3365c2b1019 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 e88e9cce14e76..0000000000000 --- 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 1b1a8b75219a4..0000000000000 --- 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 dccc4f6f503ff..b46f400705a2b 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 502864b241963..03850b64c072c 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 951814e862725..4ddc936aae16d 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 0d4b230785af7..b66027827aaa2 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 2eb14722144f0..8a21897b63e58 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 39c7f0345fc6c..03881f9870f73 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 0de7a95236338..21ae9e4f0f6c0 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 dfc3dda6de111..6c07aa2bd98a7 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 fd55979ec4281..a1ba1ec8eef45 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 1b6e75c0a4a72..e7b05e5c62ec5 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 6354f4799e680..c94cbc8b6ef60 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 09fc077657d17..d52c2d93010c6 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 145a29fa4ea48..07a0c861ac412 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 46302b5139377..064e52c306654 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 e5a91ead250ca..46f910e29bf08 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 622f5760d6b28..b85ecce3ca6be 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 8fb7c5c9a7c3e..1786a485acc54 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 930aaae913771..6f4b54783d29b 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 18ed18c729e81..6ced71240379d 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 a15ccc2761131..cbc4f73e9a926 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 875a769444a1b..451f48d62e588 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 077cffcd4085c..d5ba4b9c50fdf 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 3ca65c37c3547..be87983a20a9f 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 af05492f96447..6702a56d49b53 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 8fe518cfb3de0..acafe4b4d6f06 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 ac0f1d6ce4564..bed1a7857f6e4 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 84fcc1bfaf1bc..62d0a84df9827 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 14600944d1843..f94761bf34605 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 3c318a9e8a8c6..2cf2802fc92e1 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 df2495230402e..4a6ce9582743b 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 3c4cb45589057..3ffa88506c447 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 c46a700e801e7..f8c01b50bfba3 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 05e0b72d56ff0..8e18e634cbedc 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 fbef3f5a99e3e..9e3ce84f6102f 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 39e67b1ec70ab..2852431764c91 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 8216d28bd816e..60b370365eea6 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