]> err.no Git - linux-2.6/commitdiff
[GFS2] Update copyright, tidy up incore.h
authorSteven Whitehouse <swhiteho@redhat.com>
Fri, 1 Sep 2006 15:05:15 +0000 (11:05 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 1 Sep 2006 15:05:15 +0000 (11:05 -0400)
As per comments from Jan Engelhardt <jengelh@linux01.gwdg.de> 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 <jengelh@linux01.gwdg.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
76 files changed:
fs/gfs2/Makefile
fs/gfs2/acl.c
fs/gfs2/acl.h
fs/gfs2/bmap.c
fs/gfs2/bmap.h
fs/gfs2/daemon.c
fs/gfs2/daemon.h
fs/gfs2/dir.c
fs/gfs2/dir.h
fs/gfs2/eaops.c
fs/gfs2/eaops.h
fs/gfs2/eattr.c
fs/gfs2/eattr.h
fs/gfs2/format.h
fs/gfs2/gfs2.h
fs/gfs2/glock.c
fs/gfs2/glock.h
fs/gfs2/glops.c
fs/gfs2/glops.h
fs/gfs2/incore.h
fs/gfs2/inode.c
fs/gfs2/inode.h
fs/gfs2/lm.c
fs/gfs2/lm.h
fs/gfs2/lm_interface.h
fs/gfs2/locking.c
fs/gfs2/locking/dlm/lock.c
fs/gfs2/locking/dlm/lock_dlm.h
fs/gfs2/locking/dlm/main.c
fs/gfs2/locking/dlm/mount.c
fs/gfs2/locking/dlm/plock.c
fs/gfs2/locking/dlm/sysfs.c
fs/gfs2/locking/dlm/thread.c
fs/gfs2/locking/nolock/main.c
fs/gfs2/log.c
fs/gfs2/log.h
fs/gfs2/lops.c
fs/gfs2/lops.h
fs/gfs2/lvb.c [deleted file]
fs/gfs2/lvb.h [deleted file]
fs/gfs2/main.c
fs/gfs2/meta_io.c
fs/gfs2/meta_io.h
fs/gfs2/mount.c
fs/gfs2/mount.h
fs/gfs2/ondisk.c
fs/gfs2/ops_address.c
fs/gfs2/ops_address.h
fs/gfs2/ops_dentry.c
fs/gfs2/ops_dentry.h
fs/gfs2/ops_export.c
fs/gfs2/ops_export.h
fs/gfs2/ops_file.c
fs/gfs2/ops_file.h
fs/gfs2/ops_fstype.c
fs/gfs2/ops_fstype.h
fs/gfs2/ops_inode.c
fs/gfs2/ops_inode.h
fs/gfs2/ops_super.c
fs/gfs2/ops_super.h
fs/gfs2/ops_vm.c
fs/gfs2/ops_vm.h
fs/gfs2/quota.c
fs/gfs2/quota.h
fs/gfs2/recovery.c
fs/gfs2/recovery.h
fs/gfs2/rgrp.c
fs/gfs2/rgrp.h
fs/gfs2/super.c
fs/gfs2/super.h
fs/gfs2/sys.c
fs/gfs2/sys.h
fs/gfs2/trans.c
fs/gfs2/trans.h
fs/gfs2/util.c
fs/gfs2/util.h

index b92852b66629331eef00a2cb2c470cc4a7e1ad08..e3f1ada643ac110008cfdfdfe28f65d7e4374172 100644 (file)
@@ -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
index 399317841501eb1b9c2319ae4dc2b0b8b465978d..60c98c0314a1801ec58a04caef38c6324ba17d91 100644 (file)
@@ -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 <linux/sched.h>
index 067105786eaa82a4fd0b9d36215c200b79fb442f..5856ba764680dbfebf4f8d7fe5b5503ec2babe9a 100644 (file)
@@ -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__
index d20d41e1c0285bf8b89f79373eb8aa95ed96ea5c..913c0e5490e9902487f2c3bc9452f7593187459f 100644 (file)
@@ -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 <linux/sched.h>
index 1a265412f7eef79e9568ae95f1d2004341015bb6..ab0157c5ed0e5a7d11fda970d558f03023971921 100644 (file)
@@ -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__
index 1453605c8f32d8be42f224dd7fb8477bdd6c5bbf..a2a07c41845d414c6ac3a6362e2a5c77cf1db203 100644 (file)
@@ -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 <linux/sched.h>
index aa93eb6f668e33f7e16c8f35363d643db84d47c8..801007120fb266a6c7bd22bddedfe0743cb045e2 100644 (file)
@@ -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__
index 76a23c172eebd6c653d45c4c48fae938954bada2..7b8a38eaa41a0819b9c66dd268973c6e5de6dbec 100644 (file)
@@ -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.
  */
 
 /*
index 173403095eb2215fda0f2016adf42b88e8d00e70..366a5571648f61b059e5c16824244797b198666f 100644 (file)
@@ -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__
index 3ace242f2b1684ab059d4a9afb4a2a7239056451..3b8749c22731dbcf2b2595988bc3396bb12c1817 100644 (file)
@@ -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 <linux/sched.h>
index 3dece17e31166dd77ce870656deca4db76e6d7a0..1c27700ee8b86813fb9c281f7f54e648ce21521b 100644 (file)
@@ -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__
index 96736932260f2eddba52fc0b55d056484a10b1cf..9081822ce80cbe16fe7242b6293b76fc88a5bfa1 100644 (file)
@@ -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 <linux/sched.h>
index ae199692e51db965c8cfc8ef4281a3399ba758ca..7b0291f99fd9fabc20071a1a70f11380ce3a384f 100644 (file)
@@ -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__
index 239f0c3553fc4760230d107b9eb4fbcc89841a1d..9acbf457ee58f5e89ca24da131000fb093839612 100644 (file)
@@ -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__
index 6edbd551a4c041136349782e45f059264913c689..3bb11c0f8b56a15408103944f830bce648628414 100644 (file)
@@ -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__
index b8ccb27906e81ce166d342979d25c57959076d42..989f4f78f9be7432b0b914eb2d6b16d2463986ba 100644 (file)
@@ -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 <linux/sched.h>
index 75fad634ced23631700a4d48a4d48540072c321e..07a8d02a234d206165bc436ed6a7444119de2e3f 100644 (file)
@@ -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__
index 1a30fa9bec7abca4bbdfbc7f2352512f5cd0efed..8e1d8ee68e2ec2b7ae1e2cd73927625b8fe966fd 100644 (file)
@@ -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 <linux/sched.h>
index 9409f0a7b47f555ff555698a40789b0264b2e192..ba943e4736658b212e70fa0979d88db01c9f0ad0 100644 (file)
@@ -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__
index 362c2422d50696583059377b63afa41f4f2f83c0..06f5ec6ebf7fafc0c6d0bea7be9e48ee0af23ce1 100644 (file)
@@ -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__
 
 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 {
index 9fb340984b2945169ce143f4be43be50e0d836c5..decb0cf856912202b55dfc94dd8048434c11d198 100644 (file)
@@ -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 <linux/sched.h>
index 8bb8b559bceab790fcdfd7f96375f8743593e471..32015d89f249991b3b99f88c0048ac32718f1bfd 100644 (file)
@@ -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__
index f45c0ffd1c3564673f2bcd3ac3d45eaf1bdd71a5..1a9e75da19d1ce156511218583678c68a79934f5 100644 (file)
@@ -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 <linux/sched.h>
@@ -22,7 +22,6 @@
 #include "lm.h"
 #include "super.h"
 #include "util.h"
-#include "lvb.h"
 
 /**
  * gfs2_lm_mount - mount a locking protocol
index e821101d19c0a3de26a3bd140d675f907ce515d0..15839aaa4ca6f354448399dc009992e5bbd23174 100644 (file)
@@ -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);
index 1da95a55f768f3e39104565b1edf4a60f4ce31a9..e1e89d92a8dbb5ee885ce2267e9c292775101779 100644 (file)
@@ -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__
index ded1ef6c81e7c6b6084810233f34afecc3915a29..11c4068105ccb7dd04779555701d0f21d80dd010 100644 (file)
@@ -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 <linux/module.h>
index f769eac1a34ac79b6ce2012ef1c7e7d8feda7d62..2d81d90db0970d123f972ba08207a3790da2f4dd 100644 (file)
@@ -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"
index 530c2f542584da507dbe24e76414cda9cf913094..941063498532ba9e31392ace75e361d589689e96 100644 (file)
@@ -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
index 870a1cd99f5781556822c2dfc24929b4bf1c5778..2194b1d5b5ec7163138717b6f89d0057e894eac6 100644 (file)
@@ -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 <linux/init.h>
index 3caeafc02a1b6d354b3044ff4c96959aaa9fbb0b..f279385774b7ee0b051022b6415af510daa7d0d2 100644 (file)
@@ -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"
index 1acb2519f4391df31778707f91ffa47e60ee3493..263636b390febffa73f5aacd06b19356118736ac 100644 (file)
@@ -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 <linux/miscdevice.h>
index 0d8bd0806dba9e9c085b03f73405fdd2d0756d0b..82bef017f944c6d5c21ee7186d3000ddd04d5e81 100644 (file)
@@ -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 <linux/ctype.h>
index 489235b2edba17afc9d5d205b4d4140b8803ee7a..0b4be102e1705db7198bef86edd6a7237ac2ebd7 100644 (file)
@@ -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"
index 748aa5d3364151c661d73ab43a5aed8fc9153423..95a29914730aec4dcc76ee2b02b87e3e4692af6b 100644 (file)
@@ -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 <linux/module.h>
index af728cb3b3278e55f2c6dac3fdced93c2ed89195..45ea3ec6f776e3d9e8ce387c7a861d24f3b9ab2e 100644 (file)
@@ -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 <linux/sched.h>
index 8cfd0f1d29f8353a983179a456cb1799f33e4024..80764e388bb2cb7ee448d2b493e1a5cc5bb691d4 100644 (file)
@@ -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__
index 0ec38b3990977b2078dd8647df8a4782788d5b9c..e2c2582c8f6e04935f092ca7b616d65351ff1bb0 100644 (file)
@@ -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 <linux/sched.h>
index 8a1029d3d389a38be625af866d2255732e2fa63c..2e3365c2b1019fd04a4c1e1e5b357edf47d4473e 100644 (file)
@@ -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 (file)
index e88e9cc..0000000
+++ /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 <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
-#include <linux/completion.h>
-#include <linux/buffer_head.h>
-#include <linux/gfs2_ondisk.h>
-
-#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 (file)
index 1b1a8b7..0000000
+++ /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__ */
-
index dccc4f6f503ff85e1b2041b0f8e49dbd62338aea..b46f400705a2be4b549f12118a2080d77d0067b5 100644 (file)
@@ -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 <linux/sched.h>
index 502864b241963eab02724a67ff11ea8d7d5f88bd..03850b64c072cf576ad78de1472075dc58564852 100644 (file)
@@ -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 <linux/sched.h>
index 951814e8627255adbdacc4bd04dbe715410d2238..4ddc936aae16d11ab331ab2b4a1e5275055c55a8 100644 (file)
@@ -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__
index 0d4b230785af78ecb746ef9f275e4fae0f425db5..b66027827aaa26a8110b351c3dc37e101e80db8a 100644 (file)
@@ -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 <linux/sched.h>
index 2eb14722144f04145aef8bd8ba28192c0e1e7c25..8a21897b63e58ca9c14977107c97b1960616e498 100644 (file)
@@ -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__
index 39c7f0345fc6cdd2683932fc134abea45c5404d9..03881f9870f733352b781670c6eb5823c4b98a17 100644 (file)
@@ -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 <linux/sched.h>
index 0de7a95236338508f3e0e0ada949d75ee411700a..21ae9e4f0f6c00608ad2548bc46b0b0fb9acd764 100644 (file)
@@ -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 <linux/sched.h>
index dfc3dda6de11118cc67ba4c8d4f8b1bd61780d31..6c07aa2bd98a72b22d5c68dc20e0bf3aff90400b 100644 (file)
@@ -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__
index fd55979ec428106e2da3d2ff0f1db6ff46edfb73..a1ba1ec8eef45d4c03d76d987a6a2c41d3a514ef 100644 (file)
@@ -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 <linux/sched.h>
index 1b6e75c0a4a72578fd5b49ed43530781b570c5f8..e7b05e5c62ec51761d35f3ac1619851f54b36ded 100644 (file)
@@ -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__
index 6354f4799e680af71da19615b8ebfde5da7b41ef..c94cbc8b6ef60a8b77e0dd7696daa0313c1d631c 100644 (file)
@@ -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 <linux/sched.h>
index 09fc077657d17059ec1541a9f041ec66d85eac98..d52c2d93010c6fe09135078e433bd96d00f06053 100644 (file)
@@ -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__
index 145a29fa4ea48a4061799edc337a79a4652ef7e6..07a0c861ac4127976b346d02258f1ff5cbc3f06d 100644 (file)
@@ -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 <linux/sched.h>
index 46302b51393773f7fe0c2ad3454cc3e61997dd8e..064e52c306654b99e8121d7e304bbd70b5a280ab 100644 (file)
@@ -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__
index e5a91ead250cac85351ed3b44d6fe9f1a13f5c3e..46f910e29bf082a89d497f99768411ef52e1ca9e 100644 (file)
@@ -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 <linux/sched.h>
index 622f5760d6b289940beb7d17b31338153f4faa04..b85ecce3ca6beac14ff1a946c6b18f3c140734d9 100644 (file)
@@ -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__
index 8fb7c5c9a7c3eec60e109f0e1bd2c53037b6a35f..1786a485acc54ca78a3e694dc2b0cef2669fd549 100644 (file)
@@ -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 <linux/sched.h>
index 930aaae913771a0f151d5871c66a8e1757bd1a82..6f4b54783d29bd7bde383803653ff91e32a8252f 100644 (file)
@@ -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__
index 18ed18c729e81e83411f5d96d89f7bf1252fd5b0..6ced71240379d2c75c5b95adc9bb1fc6a40437b5 100644 (file)
@@ -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 <linux/sched.h>
index a15ccc27611317ee39475d5ab1a8782f934c6cfe..cbc4f73e9a926bed63f95b8d851092dd18dfa4f1 100644 (file)
@@ -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__
index 875a769444a1b613d6fb5f75002a571bab0db1ec..451f48d62e588b3dc7d67697437b8e8f59a15770 100644 (file)
@@ -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 <linux/sched.h>
index 077cffcd4085c56e714002c5fee66a4604af5299..d5ba4b9c50fdf46a450087381a16bab62239db61 100644 (file)
@@ -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__
index 3ca65c37c3547aa90690e275ce5ffc83868e7d54..be87983a20a9f303c25f09085161b38bf62bd8b1 100644 (file)
@@ -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;
index af05492f96447db3b66b67b34037acafddbcfc6e..6702a56d49b539e92b8306acaf8399aad4636972 100644 (file)
@@ -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__
index 8fe518cfb3de0c8891fb4000c7a968544242abff..acafe4b4d6f0647acc81a0ae4c02420ab10abff2 100644 (file)
@@ -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 <linux/sched.h>
index ac0f1d6ce45647b4058d773dde0698dd720a8ebe..bed1a7857f6e47ac830ed42e5f0e68e7d456c2b3 100644 (file)
@@ -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__
index 84fcc1bfaf1bcfb83565ebe673fbe66720c46412..62d0a84df982729480e047257cd107adb5d40f71 100644 (file)
@@ -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 <linux/sched.h>
index 14600944d1843a62a64a002d07d4f2227882ff8f..f94761bf34605c61de7284e0c57aabb0872e0461 100644 (file)
@@ -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__
index 3c318a9e8a8c6d20d3e336dc71618308f062cb4a..2cf2802fc92e1326f734786e8ab981cac6d8468e 100644 (file)
@@ -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 <linux/sched.h>
index df2495230402e6d4d617f96c25829e20c22b69f4..4a6ce9582743be64aba92750d7c07fc5df77e6d9 100644 (file)
@@ -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__
index 3c4cb455890573e0f472363663f3b2193c46dd62..3ffa88506c447ab178a91a4a2600edd1da5a9eed 100644 (file)
@@ -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 <linux/sched.h>
index c46a700e801e7d9eace663ecb4989a960f8864d5..f8c01b50bfba3f788d82281cc4cade2e100df0d3 100644 (file)
@@ -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__
index 05e0b72d56ff09ace0475e54ea1fd932eed1219c..8e18e634cbedcb0a655f1a998fca772f308d8cfd 100644 (file)
@@ -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 <linux/sched.h>
index fbef3f5a99e3e89128d90d4055967d68f00caee5..9e3ce84f6102f7a4ee0944d9f893308fc11de083 100644 (file)
@@ -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__
index 39e67b1ec70ab7adaf3640db40ff55e3617f7f20..2852431764c9154fa8897583c8353a5019503891 100644 (file)
@@ -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 <linux/sched.h>
index 8216d28bd816ebbd42ccf9bfff38f421ac5b2515..60b370365eea6c6a428cbe0cf1194b9f708a1262 100644 (file)
@@ -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__