[Pkg-lustre-svn-commit] r472 - in /trunk/debian/patches: 00list bug13904-fix1.dpatch bug13904-fix2.dpatch bug13904-fix3.dpatch
winnie at users.alioth.debian.org
winnie at users.alioth.debian.org
Fri May 9 10:01:16 UTC 2008
Author: winnie
Date: Fri May 9 10:01:16 2008
New Revision: 472
URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=472
Log:
Try to backport
Added:
trunk/debian/patches/bug13904-fix1.dpatch
trunk/debian/patches/bug13904-fix3.dpatch
Modified:
trunk/debian/patches/00list
trunk/debian/patches/bug13904-fix2.dpatch
Modified: trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/00list?rev=472&op=diff
==============================================================================
--- trunk/debian/patches/00list (original)
+++ trunk/debian/patches/00list Fri May 9 10:01:16 2008
@@ -25,5 +25,9 @@
bug6334-prevent_multiple_mounts.dpatch
fix-lustre-manpage.dpatch
enable-quota.dpatch
+
+#4 TB Issue:
+bug13904-fix1.dpatch
bug13904-fix2.dpatch
+bug13904-fix3.dpatch
bug15036-fix1.dpatch
Added: trunk/debian/patches/bug13904-fix1.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug13904-fix1.dpatch?rev=472&op=file
==============================================================================
--- trunk/debian/patches/bug13904-fix1.dpatch (added)
+++ trunk/debian/patches/bug13904-fix1.dpatch Fri May 9 10:01:16 2008
@@ -1,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Missing include of sys/quota.h
+
+ at DPATCH@
+Index: lustre/lvfs/lustre_quota_fmt.c
+===================================================================
+RCS file: /cvsroot/cfs/lustre-core/lvfs/lustre_quota_fmt.c,v
+retrieving revision 1.1.2.2
+diff -p -u -r1.1.2.2 lustre_quota_fmt.c
+--- ./lustre/lvfs/lustre_quota_fmt.c 27 Nov 2007 02:11:54 -0000 1.1.2.2
++++ ./lustre/lvfs/lustre_quota_fmt.c 28 Nov 2007 14:28:53 -0000
+@@ -84,13 +84,10 @@ int lustre_check_quota_file(struct lustr
+ return check_quota_file(f, NULL, type, lqi->qi_version);
+ }
+
+-/* Read information header from quota file */
+-int lustre_read_quota_info(struct lustre_quota_info *lqi, int type)
++int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info)
+ {
+ mm_segment_t fs;
+ struct lustre_disk_dqinfo dinfo;
+- struct lustre_mem_dqinfo *info = &lqi->qi_info[type];
+- struct file *f = lqi->qi_files[type];
+ ssize_t size;
+ loff_t offset = LUSTRE_DQINFOOFF;
+
+@@ -113,6 +110,12 @@ int lustre_read_quota_info(struct lustre
+ return 0;
+ }
+
++/* Read information header from quota file */
++int lustre_read_quota_info(struct lustre_quota_info *lqi, int type)
++{
++ return lustre_read_quota_file_info(lqi->qi_files[type], &lqi->qi_info[type]);
++}
++
+ /* Write information header to quota file */
+ int lustre_write_quota_info(struct lustre_quota_info *lqi, int type)
+ {
Modified: trunk/debian/patches/bug13904-fix2.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug13904-fix2.dpatch?rev=472&op=diff
==============================================================================
--- trunk/debian/patches/bug13904-fix2.dpatch (original)
+++ trunk/debian/patches/bug13904-fix2.dpatch Fri May 9 10:01:16 2008
@@ -4,14 +4,10 @@
## DP: Missing include of sys/quota.h
@DPATCH@
-Index: lustre/doc/lfs.1
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/doc/lfs.1,v
-retrieving revision 1.4.18.3
-diff -p -u -r1.4.18.3 lfs.1
---- ./lustre/doc/lfs.1 22 Nov 2007 22:59:38 -0000 1.4.18.3
-+++ ./lustre/doc/lfs.1 19 Dec 2007 20:24:32 -0000
-@@ -26,6 +26,8 @@ lfs \- Lustre utility to create a file w
+diff -urNad lustre-1.6.4.3~/lustre/doc/lfs.1 lustre-1.6.4.3/lustre/doc/lfs.1
+--- lustre-1.6.4.3~/lustre/doc/lfs.1 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/doc/lfs.1 2008-05-09 11:40:37.000000000 +0200
+@@ -26,6 +26,8 @@
.br
.B lfs quotaoff [-ug] <filesystem>
.br
@@ -20,7 +16,7 @@
.B lfs setquota [-u|-g] <name> <block-softlimit> <block-hardlimit>
\fB<inode-softlimit> <inode-hardlimit> <filesystem>\fR
.br
-@@ -68,6 +70,9 @@ To turn filesystem quotas on. Options sp
+@@ -66,6 +68,9 @@
.B quotaoff [-ugf] <filesystem>
To turn filesystem quotas off. Options specify quota for users (-u) groups (-g) and force (-f)
.TP
@@ -30,98 +26,10 @@
.B setquota [-u|-g] <name> <block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> <filesystem>
To set filesystem quotas for users or groups. Limits are specific as blocks and inodes, see EXAMPLES
.TP
-Index: lustre/include/lustre_quota.h
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/include/lustre_quota.h,v
-retrieving revision 1.3.12.2
-diff -p -u -r1.3.12.2 lustre_quota.h
---- ./lustre/include/lustre_quota.h 12 Jul 2007 08:36:46 -0000 1.3.12.2
-+++ ./lustre/include/lustre_quota.h 19 Dec 2007 20:24:32 -0000
-@@ -42,12 +42,24 @@ struct lustre_mem_dqinfo {
- struct lustre_quota_info {
- struct file *qi_files[MAXQUOTAS];
- struct lustre_mem_dqinfo qi_info[MAXQUOTAS];
-+ lustre_quota_version_t qi_version;
- };
-
- #define DQ_STATUS_AVAIL 0x0 /* Available dquot */
- #define DQ_STATUS_SET 0x01 /* Sombody is setting dquot */
- #define DQ_STATUS_RECOVERY 0x02 /* dquot is in recovery */
-
-+struct lustre_mem_dqblk {
-+ __u64 dqb_bhardlimit; /* absolute limit on disk blks alloc */
-+ __u64 dqb_bsoftlimit; /* preferred limit on disk blks */
-+ __u64 dqb_curspace; /* current used space */
-+ __u64 dqb_ihardlimit; /* absolute limit on allocated inodes */
-+ __u64 dqb_isoftlimit; /* preferred inode limit */
-+ __u64 dqb_curinodes; /* current # allocated inodes */
-+ time_t dqb_btime; /* time limit for excessive disk use */
-+ time_t dqb_itime; /* time limit for excessive inode use */
-+};
-+
- struct lustre_dquot {
- /* Hash list in memory, protect by dquot_hash_lock */
- struct list_head dq_hash;
-@@ -63,7 +75,7 @@ struct lustre_dquot {
- int dq_type; /* Type fo quota (USRQUOTA, GRPQUOUTA) */
- unsigned short dq_status; /* See DQ_STATUS_ */
- unsigned long dq_flags; /* See DQ_ in quota.h */
-- struct mem_dqblk dq_dqb; /* Diskquota usage */
-+ struct lustre_mem_dqblk dq_dqb; /* Diskquota usage */
- };
-
- struct dquot_id {
-@@ -77,6 +89,7 @@ struct dquot_id {
- #define QFILE_INIT_INFO 4
- #define QFILE_RD_DQUOT 5
- #define QFILE_WR_DQUOT 6
-+#define QFILE_CONVERT 7
-
- /* admin quotafile operations */
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-@@ -88,6 +101,7 @@ int lustre_commit_dquot(struct lustre_dq
- int lustre_init_quota_info(struct lustre_quota_info *lqi, int type);
- int lustre_get_qids(struct file *file, struct inode *inode, int type,
- struct list_head *list);
-+int lustre_quota_convert(struct lustre_quota_info *lqi, int type);
- #else
-
- #ifndef DQ_FAKE_B
-@@ -122,6 +136,11 @@ static inline int lustre_init_quota_info
- {
- return 0;
- }
-+static inline int lustre_quota_convert(struct lustre_quota_info *lqi,
-+ int type)
-+{
-+ return 0;
-+}
- #endif /* KERNEL_VERSION(2,5,0) */
-
- #define LL_DQUOT_OFF(sb) DQUOT_OFF(sb)
-@@ -461,4 +480,14 @@ extern quota_interface_t mdc_quota_inter
- extern quota_interface_t lov_quota_interface;
- #endif
-
-+#define LUSTRE_ADMIN_QUOTAFILES_V1 {\
-+ "admin_quotafile.usr", /* user admin quotafile */\
-+ "admin_quotafile.grp" /* group admin quotafile */\
-+}
-+
-+#define LUSTRE_ADMIN_QUOTAFILES_V2 {\
-+ "admin_quotafile_v2.usr", /* user admin quotafile */\
-+ "admin_quotafile_v2.grp" /* group admin quotafile */\
-+}
-+
- #endif /* _LUSTRE_QUOTA_H */
-Index: lustre/include/linux/lustre_fsfilt.h
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/include/linux/lustre_fsfilt.h,v
-retrieving revision 1.41.32.4
-diff -p -u -r1.41.32.4 lustre_fsfilt.h
---- ./lustre/include/linux/lustre_fsfilt.h 3 Sep 2007 06:05:42 -0000 1.41.32.4
-+++ ./lustre/include/linux/lustre_fsfilt.h 19 Dec 2007 20:24:32 -0000
-@@ -404,7 +404,7 @@ static inline int fsfilt_quotainfo(struc
+diff -urNad lustre-1.6.4.3~/lustre/include/linux/lustre_fsfilt.h lustre-1.6.4.3/lustre/include/linux/lustre_fsfilt.h
+--- lustre-1.6.4.3~/lustre/include/linux/lustre_fsfilt.h 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/include/linux/lustre_fsfilt.h 2008-05-09 11:40:37.000000000 +0200
+@@ -404,7 +404,7 @@
}
static inline int fsfilt_qids(struct obd_device *obd, struct file *file,
@@ -130,27 +38,19 @@
struct list_head *list)
{
if (obd->obd_fsops->fs_qids)
-Index: lustre/include/lustre/lustre_idl.h
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/include/lustre/lustre_idl.h,v
-retrieving revision 1.3.12.16
-diff -p -u -r1.3.12.16 lustre_idl.h
---- ./lustre/include/lustre/lustre_idl.h 10 Dec 2007 19:21:55 -0000 1.3.12.16
-+++ ./lustre/include/lustre/lustre_idl.h 19 Dec 2007 20:24:33 -0000
-@@ -1493,4 +1493,5 @@ typedef enum {
+diff -urNad lustre-1.6.4.3~/lustre/include/lustre/lustre_idl.h lustre-1.6.4.3/lustre/include/lustre/lustre_idl.h
+--- lustre-1.6.4.3~/lustre/include/lustre/lustre_idl.h 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/include/lustre/lustre_idl.h 2008-05-09 11:40:37.000000000 +0200
+@@ -1488,4 +1488,5 @@
#define QUOTA_RET_NOQUOTA 1 /* not support quota */
#define QUOTA_RET_NOLIMIT 2 /* quota limit isn't set */
#define QUOTA_RET_ACQUOTA 3 /* need to acquire extra quota */
+
#endif
-Index: lustre/include/lustre/lustre_user.h
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/include/lustre/lustre_user.h,v
-retrieving revision 1.18.34.1
-diff -p -u -r1.18.34.1 lustre_user.h
---- ./lustre/include/lustre/lustre_user.h 27 Sep 2007 05:09:22 -0000 1.18.34.1
-+++ ./lustre/include/lustre/lustre_user.h 19 Dec 2007 20:24:34 -0000
-@@ -163,12 +163,15 @@ static inline char *obd_uuid2str(struct
+diff -urNad lustre-1.6.4.3~/lustre/include/lustre/lustre_user.h lustre-1.6.4.3/lustre/include/lustre/lustre_user.h
+--- lustre-1.6.4.3~/lustre/include/lustre/lustre_user.h 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/include/lustre/lustre_user.h 2008-05-09 11:40:37.000000000 +0200
+@@ -163,12 +163,15 @@
return (char *)(uuid->uuid);
}
@@ -172,7 +72,7 @@
#define UGQUOTA 2 /* set both USRQUOTA and GRPQUOTA */
-@@ -218,6 +221,11 @@ struct mds_grp_downcall_data {
+@@ -218,6 +221,11 @@
#endif /* !__KERNEL__ */
@@ -184,14 +84,90 @@
/* XXX: same as if_dqinfo struct in kernel */
struct obd_dqinfo {
__u64 dqi_bgrace;
-Index: lustre/llite/dir.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/llite/dir.c,v
-retrieving revision 1.91.6.13
-diff -p -u -r1.91.6.13 dir.c
---- ./lustre/llite/dir.c 27 Nov 2007 11:36:17 -0000 1.91.6.13
-+++ ./lustre/llite/dir.c 19 Dec 2007 20:24:35 -0000
-@@ -967,6 +967,7 @@ static int ll_dir_ioctl(struct inode *in
+diff -urNad lustre-1.6.4.3~/lustre/include/lustre_quota.h lustre-1.6.4.3/lustre/include/lustre_quota.h
+--- lustre-1.6.4.3~/lustre/include/lustre_quota.h 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/include/lustre_quota.h 2008-05-09 11:40:37.000000000 +0200
+@@ -42,12 +42,24 @@
+ struct lustre_quota_info {
+ struct file *qi_files[MAXQUOTAS];
+ struct lustre_mem_dqinfo qi_info[MAXQUOTAS];
++ lustre_quota_version_t qi_version;
+ };
+
+ #define DQ_STATUS_AVAIL 0x0 /* Available dquot */
+ #define DQ_STATUS_SET 0x01 /* Sombody is setting dquot */
+ #define DQ_STATUS_RECOVERY 0x02 /* dquot is in recovery */
+
++struct lustre_mem_dqblk {
++ __u64 dqb_bhardlimit; /* absolute limit on disk blks alloc */
++ __u64 dqb_bsoftlimit; /* preferred limit on disk blks */
++ __u64 dqb_curspace; /* current used space */
++ __u64 dqb_ihardlimit; /* absolute limit on allocated inodes */
++ __u64 dqb_isoftlimit; /* preferred inode limit */
++ __u64 dqb_curinodes; /* current # allocated inodes */
++ time_t dqb_btime; /* time limit for excessive disk use */
++ time_t dqb_itime; /* time limit for excessive inode use */
++};
++
+ struct lustre_dquot {
+ /* Hash list in memory, protect by dquot_hash_lock */
+ struct list_head dq_hash;
+@@ -63,7 +75,7 @@
+ int dq_type; /* Type fo quota (USRQUOTA, GRPQUOUTA) */
+ unsigned short dq_status; /* See DQ_STATUS_ */
+ unsigned long dq_flags; /* See DQ_ in quota.h */
+- struct mem_dqblk dq_dqb; /* Diskquota usage */
++ struct lustre_mem_dqblk dq_dqb; /* Diskquota usage */
+ };
+
+ struct dquot_id {
+@@ -77,6 +89,7 @@
+ #define QFILE_INIT_INFO 4
+ #define QFILE_RD_DQUOT 5
+ #define QFILE_WR_DQUOT 6
++#define QFILE_CONVERT 7
+
+ /* admin quotafile operations */
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+@@ -88,6 +101,7 @@
+ int lustre_init_quota_info(struct lustre_quota_info *lqi, int type);
+ int lustre_get_qids(struct file *file, struct inode *inode, int type,
+ struct list_head *list);
++int lustre_quota_convert(struct lustre_quota_info *lqi, int type);
+ #else
+
+ #ifndef DQ_FAKE_B
+@@ -122,6 +136,11 @@
+ {
+ return 0;
+ }
++static inline int lustre_quota_convert(struct lustre_quota_info *lqi,
++ int type)
++{
++ return 0;
++}
+ #endif /* KERNEL_VERSION(2,5,0) */
+
+ #define LL_DQUOT_OFF(sb) DQUOT_OFF(sb)
+@@ -461,4 +480,14 @@
+ extern quota_interface_t lov_quota_interface;
+ #endif
+
++#define LUSTRE_ADMIN_QUOTAFILES_V1 {\
++ "admin_quotafile.usr", /* user admin quotafile */\
++ "admin_quotafile.grp" /* group admin quotafile */\
++}
++
++#define LUSTRE_ADMIN_QUOTAFILES_V2 {\
++ "admin_quotafile_v2.usr", /* user admin quotafile */\
++ "admin_quotafile_v2.grp" /* group admin quotafile */\
++}
++
+ #endif /* _LUSTRE_QUOTA_H */
+diff -urNad lustre-1.6.4.3~/lustre/llite/dir.c lustre-1.6.4.3/lustre/llite/dir.c
+--- lustre-1.6.4.3~/lustre/llite/dir.c 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/llite/dir.c 2008-05-09 11:40:37.000000000 +0200
+@@ -967,6 +967,7 @@
type = qctl->qc_type;
id = qctl->qc_id;
switch (cmd) {
@@ -199,14 +175,10 @@
case Q_QUOTAON:
case Q_QUOTAOFF:
case Q_SETQUOTA:
-Index: lustre/lvfs/Makefile.in
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/lvfs/Makefile.in,v
-retrieving revision 1.12.16.2
-diff -p -u -r1.12.16.2 Makefile.in
---- ./lustre/lvfs/Makefile.in 26 Jul 2007 06:24:10 -0000 1.12.16.2
-+++ ./lustre/lvfs/Makefile.in 19 Dec 2007 20:24:35 -0000
-@@ -3,7 +3,7 @@ MODULES := lvfs
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/Makefile.in lustre-1.6.4.3/lustre/lvfs/Makefile.in
+--- lustre-1.6.4.3~/lustre/lvfs/Makefile.in 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/lvfs/Makefile.in 2008-05-09 11:40:37.000000000 +0200
+@@ -3,7 +3,7 @@
@QUOTA_TRUE at MODULES += quotafmt_test
lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o prng.o lvfs_lib.o
@@ -215,14 +187,10 @@
@QUOTA_TRUE at quotafmt-objs := quotafmt_test.o
-Index: lustre/lvfs/autoMakefile.am
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/lvfs/autoMakefile.am,v
-retrieving revision 1.14.16.3
-diff -p -u -r1.14.16.3 autoMakefile.am
---- ./lustre/lvfs/autoMakefile.am 26 Jul 2007 06:46:08 -0000 1.14.16.3
-+++ ./lustre/lvfs/autoMakefile.am 19 Dec 2007 20:24:35 -0000
-@@ -76,6 +76,7 @@ DIST_SOURCES = fsfilt.c fsfilt_ext3.c fs
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/autoMakefile.am lustre-1.6.4.3/lustre/lvfs/autoMakefile.am
+--- lustre-1.6.4.3~/lustre/lvfs/autoMakefile.am 2008-05-09 11:40:36.000000000 +0200
++++ lustre-1.6.4.3/lustre/lvfs/autoMakefile.am 2008-05-09 11:40:37.000000000 +0200
+@@ -76,6 +76,7 @@
lvfs_internal.h lvfs_linux.c lvfs_userfs.c \
upcall_cache.c prng.c lvfs_lib.c\
lustre_quota_fmt.c lustre_quota_fmt.h quotafmt_test.c \
@@ -230,14 +198,10 @@
# quotacheck_test.c quotactl_test.c fsfilt_ext3_quota.h
MOSTLYCLEANFILES := @MOSTLYCLEANFILES@
-Index: lustre/lvfs/fsfilt_ext3.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/lvfs/fsfilt_ext3.c,v
-retrieving revision 1.58.28.19
-diff -p -u -r1.58.28.19 fsfilt_ext3.c
---- ./lustre/lvfs/fsfilt_ext3.c 27 Nov 2007 11:36:18 -0000 1.58.28.19
-+++ ./lustre/lvfs/fsfilt_ext3.c 19 Dec 2007 20:24:36 -0000
-@@ -2063,6 +2063,9 @@ static int fsfilt_ext3_quotainfo(struct
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/fsfilt_ext3.c lustre-1.6.4.3/lustre/lvfs/fsfilt_ext3.c
+--- lustre-1.6.4.3~/lustre/lvfs/fsfilt_ext3.c 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/lvfs/fsfilt_ext3.c 2008-05-09 11:40:37.000000000 +0200
+@@ -2061,6 +2061,9 @@
case QFILE_INIT_INFO:
rc = lustre_init_quota_info(lqi, type);
break;
@@ -247,13 +211,9 @@
default:
CERROR("Unsupported admin quota file cmd %d\n", cmd);
LBUG();
-Index: lustre/lvfs/lustre_quota_fmt.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/lvfs/lustre_quota_fmt.c,v
-retrieving revision 1.2
-diff -p -u -r1.2 lustre_quota_fmt.c
---- ./lustre/lvfs/lustre_quota_fmt.c 31 Mar 2007 00:16:22 -0000 1.2
-+++ ./lustre/lvfs/lustre_quota_fmt.c 19 Dec 2007 20:24:37 -0000
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/lustre_quota_fmt.c lustre-1.6.4.3/lustre/lvfs/lustre_quota_fmt.c
+--- lustre-1.6.4.3~/lustre/lvfs/lustre_quota_fmt.c 2008-05-09 11:40:37.000000000 +0200
++++ lustre-1.6.4.3/lustre/lvfs/lustre_quota_fmt.c 2008-05-09 11:43:31.000000000 +0200
@@ -24,21 +24,33 @@
#include <asm/uaccess.h>
@@ -266,20 +226,20 @@
+ [LUSTRE_QUOTA_V1] = LUSTRE_INITQVERSIONS,
+ [LUSTRE_QUOTA_V2] = LUSTRE_INITQVERSIONS_V2
+};
-+
+
+-#define GETIDINDEX(id, depth) (((id) >> ((LUSTRE_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
+-#define GETENTRIES(buf) ((struct lustre_disk_dqblk *)(((char *)buf)+sizeof(struct lustre_disk_dqdbheader)))
+static const int lustre_dqstrinblk[] = {
+ [LUSTRE_QUOTA_V1] = LUSTRE_DQSTRINBLK,
+ [LUSTRE_QUOTA_V2] = LUSTRE_DQSTRINBLK_V2
+};
--#define GETIDINDEX(id, depth) (((id) >> ((LUSTRE_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
--#define GETENTRIES(buf) ((struct lustre_disk_dqblk *)(((char *)buf)+sizeof(struct lustre_disk_dqdbheader)))
+-static int check_quota_file(struct file *f, struct inode *inode, int type)
+static const int lustre_disk_dqblk_sz[] = {
+ [LUSTRE_QUOTA_V1] = sizeof(struct lustre_disk_dqblk),
+ [LUSTRE_QUOTA_V2] = sizeof(struct lustre_disk_dqblk_v2)
+};
-
--static int check_quota_file(struct file *f, struct inode *inode, int type)
++
+int check_quota_file(struct file *f, struct inode *inode, int type,
+ lustre_quota_version_t version)
{
@@ -293,7 +253,7 @@
if (f) {
fs = get_fs();
-@@ -57,27 +69,24 @@ static int check_quota_file(struct file
+@@ -57,18 +69,18 @@
#endif
}
if (size != sizeof(struct lustre_disk_dqheader))
@@ -304,7 +264,7 @@
- return 0;
- return 1;
+ return -EINVAL;
-+ return 0;
++ return 0 ;
}
/* Check whether given file is really lustre admin quotafile */
@@ -315,18 +275,8 @@
+ return check_quota_file(f, NULL, type, lqi->qi_version);
}
--/* Read information header from quota file */
--int lustre_read_quota_info(struct lustre_quota_info *lqi, int type)
-+int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info)
- {
- mm_segment_t fs;
- struct lustre_disk_dqinfo dinfo;
-- struct lustre_mem_dqinfo *info = &lqi->qi_info[type];
-- struct file *f = lqi->qi_files[type];
- ssize_t size;
- loff_t offset = LUSTRE_DQINFOOFF;
-
-@@ -87,9 +96,9 @@ int lustre_read_quota_info(struct lustre
+ int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info)
+@@ -84,9 +96,9 @@
sizeof(struct lustre_disk_dqinfo), &offset);
set_fs(fs);
if (size != sizeof(struct lustre_disk_dqinfo)) {
@@ -338,8 +288,8 @@
}
info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace);
-@@ -100,6 +109,12 @@ int lustre_read_quota_info(struct lustre
- return 0;
+@@ -103,6 +115,12 @@
+ return lustre_read_quota_file_info(lqi->qi_files[type], &lqi->qi_info[type]);
}
+/* Read information header from quota file */
@@ -351,7 +301,7 @@
/* Write information header to quota file */
int lustre_write_quota_info(struct lustre_quota_info *lqi, int type)
{
-@@ -131,33 +146,65 @@ int lustre_write_quota_info(struct lustr
+@@ -134,33 +152,65 @@
return 0;
}
@@ -372,7 +322,15 @@
+
+void disk2memdqb(struct lustre_mem_dqblk *m, void *d,
+ lustre_quota_version_t version)
-+{
+ {
+- m->dqb_ihardlimit = le32_to_cpu(d->dqb_ihardlimit);
+- m->dqb_isoftlimit = le32_to_cpu(d->dqb_isoftlimit);
+- m->dqb_curinodes = le32_to_cpu(d->dqb_curinodes);
+- m->dqb_itime = le64_to_cpu(d->dqb_itime);
+- m->dqb_bhardlimit = le32_to_cpu(d->dqb_bhardlimit);
+- m->dqb_bsoftlimit = le32_to_cpu(d->dqb_bsoftlimit);
+- m->dqb_curspace = le64_to_cpu(d->dqb_curspace);
+- m->dqb_btime = le64_to_cpu(d->dqb_btime);
+ m->dqb_ihardlimit = DQF_GET(d, version, dqb_ihardlimit);
+ m->dqb_isoftlimit = DQF_GET(d, version, dqb_isoftlimit);
+ m->dqb_curinodes = DQF_GET(d, version, dqb_curinodes);
@@ -381,24 +339,13 @@
+ m->dqb_bsoftlimit = DQF_GET(d, version, dqb_bsoftlimit);
+ m->dqb_curspace = DQF_GET(d, version, dqb_curspace);
+ m->dqb_btime = DQF_GET(d, version, dqb_btime);
-+}
-+
+ }
+
+-static void mem2diskdqb(struct lustre_disk_dqblk *d, struct mem_dqblk *m,
+- qid_t id)
+static int check_quota_bounds(struct lustre_mem_dqblk *m,
+ lustre_quota_version_t version)
{
-- m->dqb_ihardlimit = le32_to_cpu(d->dqb_ihardlimit);
-- m->dqb_isoftlimit = le32_to_cpu(d->dqb_isoftlimit);
-- m->dqb_curinodes = le32_to_cpu(d->dqb_curinodes);
-- m->dqb_itime = le64_to_cpu(d->dqb_itime);
-- m->dqb_bhardlimit = le32_to_cpu(d->dqb_bhardlimit);
-- m->dqb_bsoftlimit = le32_to_cpu(d->dqb_bsoftlimit);
-- m->dqb_curspace = le64_to_cpu(d->dqb_curspace);
-- m->dqb_btime = le64_to_cpu(d->dqb_btime);
--}
--
--static void mem2diskdqb(struct lustre_disk_dqblk *d, struct mem_dqblk *m,
-- qid_t id)
--{
- d->dqb_ihardlimit = cpu_to_le32(m->dqb_ihardlimit);
- d->dqb_isoftlimit = cpu_to_le32(m->dqb_isoftlimit);
- d->dqb_curinodes = cpu_to_le32(m->dqb_curinodes);
@@ -415,8 +362,9 @@
+ m->dqb_bhardlimit <= MAX_UL &&
+ m->dqb_bsoftlimit <= MAX_UL) ||
+ version != LUSTRE_QUOTA_V1;
-+}
-+
+ }
+
+-static dqbuf_t getdqbuf(void)
+static int mem2diskdqb(void *d, struct lustre_mem_dqblk *m,
+ qid_t id, lustre_quota_version_t version)
+{
@@ -434,14 +382,13 @@
+ DQF_PUT(d, version, dqb_id, id);
+
+ return 0;
- }
-
--static dqbuf_t getdqbuf(void)
++}
++
+dqbuf_t getdqbuf(void)
{
dqbuf_t buf = kmalloc(LUSTRE_DQBLKSIZE, GFP_NOFS);
if (!buf)
-@@ -166,12 +213,12 @@ static dqbuf_t getdqbuf(void)
+@@ -169,12 +219,12 @@
return buf;
}
@@ -456,7 +403,7 @@
{
mm_segment_t fs;
ssize_t ret;
-@@ -185,7 +232,7 @@ static ssize_t read_blk(struct file *fil
+@@ -188,7 +238,7 @@
return ret;
}
@@ -465,7 +412,7 @@
{
mm_segment_t fs;
ssize_t ret;
-@@ -196,18 +243,15 @@ static ssize_t write_blk(struct file *fi
+@@ -199,18 +249,15 @@
ret = filp->f_op->write(filp, (char *)buf, LUSTRE_DQBLKSIZE, &offset);
set_fs(fs);
return ret;
@@ -486,7 +433,7 @@
{
dqbuf_t buf = getdqbuf();
struct lustre_disk_dqdbheader *dh =
-@@ -223,7 +267,8 @@ static int get_free_dqblk(struct file *f
+@@ -226,7 +273,8 @@
info->dqi_free_blk = le32_to_cpu(dh->dqdh_next_free);
} else {
memset(buf, 0, LUSTRE_DQBLKSIZE);
@@ -496,7 +443,7 @@
goto out_buf;
blk = info->dqi_blocks++;
}
-@@ -235,8 +280,8 @@ out_buf:
+@@ -238,8 +286,8 @@
}
/* Insert empty block to the list */
@@ -507,7 +454,7 @@
{
struct lustre_disk_dqdbheader *dh =
(struct lustre_disk_dqdbheader *)buf;
-@@ -254,9 +299,9 @@ static int put_free_dqblk(struct file *f
+@@ -257,9 +305,9 @@
}
/* Remove given block from the list of blocks with free entries */
@@ -520,7 +467,7 @@
{
dqbuf_t tmpbuf = getdqbuf();
struct lustre_disk_dqdbheader *dh =
-@@ -288,9 +333,10 @@ static int remove_free_dqentry(struct fi
+@@ -291,9 +339,10 @@
}
freedqbuf(tmpbuf);
dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0);
@@ -534,7 +481,7 @@
return 0;
out_buf:
freedqbuf(tmpbuf);
-@@ -298,9 +344,9 @@ out_buf:
+@@ -301,9 +350,9 @@
}
/* Insert given block to the beginning of list with free entries */
@@ -547,7 +494,7 @@
{
dqbuf_t tmpbuf = getdqbuf();
struct lustre_disk_dqdbheader *dh =
-@@ -330,16 +376,21 @@ out_buf:
+@@ -333,16 +382,21 @@
return err;
}
@@ -572,7 +519,7 @@
dqbuf_t buf;
*err = 0;
-@@ -348,7 +399,7 @@ static uint find_free_dqentry(struct lus
+@@ -351,7 +405,7 @@
return 0;
}
dh = (struct lustre_disk_dqdbheader *)buf;
@@ -581,7 +528,7 @@
if (info->dqi_free_entry) {
blk = info->dqi_free_entry;
if ((*err = read_blk(filp, blk, buf)) < 0)
-@@ -361,39 +412,40 @@ static uint find_free_dqentry(struct lus
+@@ -364,39 +418,40 @@
return 0;
}
memset(buf, 0, LUSTRE_DQBLKSIZE);
@@ -637,7 +584,7 @@
freedqbuf(buf);
return blk;
out_buf:
-@@ -402,7 +454,8 @@ out_buf:
+@@ -405,7 +460,8 @@
}
/* Insert reference to structure into the trie */
@@ -647,7 +594,7 @@
{
struct lustre_quota_info *lqi = dquot->dq_info;
struct file *filp = lqi->qi_files[dquot->dq_type];
-@@ -423,8 +476,7 @@ static int do_insert_tree(struct lustre_
+@@ -426,8 +482,7 @@
newact = 1;
} else {
if ((ret = read_blk(filp, *treeblk, buf)) < 0) {
@@ -657,7 +604,7 @@
*treeblk);
goto out_buf;
}
-@@ -436,16 +488,16 @@ static int do_insert_tree(struct lustre_
+@@ -439,16 +494,16 @@
if (depth == LUSTRE_DQTREEDEPTH - 1) {
if (newblk) {
@@ -678,7 +625,7 @@
if (newson && ret >= 0) {
ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk);
ret = write_blk(filp, *treeblk, buf);
-@@ -457,46 +509,51 @@ out_buf:
+@@ -460,46 +515,51 @@
}
/* Wrapper for inserting quota structure into tree */
@@ -745,7 +692,7 @@
printk(KERN_WARNING "VFS: dquota write failed on dev %s\n",
filp->f_dentry->d_sb->s_id);
if (ret >= 0)
-@@ -508,25 +565,27 @@ static int lustre_write_dquot(struct lus
+@@ -511,25 +571,27 @@
}
/* Free dquot entry in data block */
@@ -778,7 +725,7 @@
goto out_buf;
}
dh = (struct lustre_disk_dqdbheader *)buf;
-@@ -534,27 +593,23 @@ static int free_dqentry(struct lustre_dq
+@@ -537,27 +599,23 @@
if (!le16_to_cpu(dh->dqdh_entries)) { /* Block got free? */
if ((ret = remove_free_dqentry(filp, info, buf, blk)) < 0 ||
(ret = put_free_dqblk(filp, info, buf, blk)) < 0) {
@@ -814,7 +761,7 @@
goto out_buf;
}
}
-@@ -565,7 +620,8 @@ out_buf:
+@@ -568,7 +626,8 @@
}
/* Remove reference to dquot from tree */
@@ -824,7 +771,7 @@
{
struct file *filp = dquot->dq_info->qi_files[dquot->dq_type];
struct lustre_mem_dqinfo *info =
-@@ -578,26 +634,26 @@ static int remove_tree(struct lustre_dqu
+@@ -581,26 +640,26 @@
if (!buf)
return -ENOMEM;
if ((ret = read_blk(filp, *blk, buf)) < 0) {
@@ -857,7 +804,7 @@
}
out_buf:
freedqbuf(buf);
-@@ -605,47 +661,50 @@ out_buf:
+@@ -608,47 +667,50 @@
}
/* Delete dquot from tree */
@@ -925,7 +872,7 @@
dquot->dq_id);
ret = -EIO;
goto out_buf;
-@@ -653,14 +712,15 @@ static loff_t find_block_dqentry(struct
+@@ -656,14 +718,15 @@
ret =
(blk << LUSTRE_DQBLKSIZE_BITS) +
sizeof(struct lustre_disk_dqdbheader) +
@@ -943,7 +890,7 @@
{
struct file *filp = dquot->dq_info->qi_files[dquot->dq_type];
dqbuf_t buf = getdqbuf();
-@@ -670,7 +730,7 @@ static loff_t find_tree_dqentry(struct l
+@@ -673,7 +736,7 @@
if (!buf)
return -ENOMEM;
if ((ret = read_blk(filp, blk, buf)) < 0) {
@@ -952,7 +899,7 @@
goto out_buf;
}
ret = 0;
-@@ -678,18 +738,19 @@ static loff_t find_tree_dqentry(struct l
+@@ -681,18 +744,19 @@
if (!blk) /* No reference? */
goto out_buf;
if (depth < LUSTRE_DQTREEDEPTH - 1)
@@ -976,7 +923,7 @@
}
int lustre_read_dquot(struct lustre_dquot *dquot)
-@@ -698,50 +759,50 @@ int lustre_read_dquot(struct lustre_dquo
+@@ -701,50 +765,50 @@
struct file *filp;
mm_segment_t fs;
loff_t offset;
@@ -1048,7 +995,7 @@
}
return ret;
-@@ -751,6 +812,8 @@ int lustre_read_dquot(struct lustre_dquo
+@@ -754,6 +818,8 @@
int lustre_commit_dquot(struct lustre_dquot *dquot)
{
int rc = 0;
@@ -1057,7 +1004,7 @@
/* always clear the flag so we don't loop on an IO error... */
clear_bit(DQ_MOD_B, &dquot->dq_flags);
-@@ -758,9 +821,9 @@ int lustre_commit_dquot(struct lustre_dq
+@@ -761,9 +827,9 @@
* over all cluster, so keep the fake dquot entry on disk is
* meaningless, just remove it */
if (test_bit(DQ_FAKE_B, &dquot->dq_flags))
@@ -1069,7 +1016,7 @@
if (rc < 0)
return rc;
-@@ -771,29 +834,41 @@ int lustre_commit_dquot(struct lustre_dq
+@@ -774,29 +840,41 @@
return rc;
}
@@ -1120,7 +1067,7 @@
if (rc)
return rc;
-@@ -806,13 +881,13 @@ int lustre_init_quota_info(struct lustre
+@@ -809,13 +887,13 @@
return lustre_write_quota_info(lqi, type);
}
@@ -1140,7 +1087,7 @@
{
if (file) {
return read_blk(file, blk, buf);
-@@ -843,7 +918,7 @@ static int walk_block_dqentry(struct fil
+@@ -846,7 +924,7 @@
if (!buf)
return -ENOMEM;
if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) {
@@ -1149,7 +1096,7 @@
goto out_buf;
}
ret = 0;
-@@ -880,8 +955,8 @@ out_buf:
+@@ -883,8 +961,8 @@
return ret;
}
@@ -1160,7 +1107,7 @@
{
dqbuf_t buf = getdqbuf();
loff_t ret = 0;
-@@ -891,7 +966,7 @@ static int walk_tree_dqentry(struct file
+@@ -894,7 +972,7 @@
if (!buf)
return -ENOMEM;
if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) {
@@ -1169,7 +1116,7 @@
goto out_buf;
}
ret = 0;
-@@ -902,7 +977,7 @@ static int walk_tree_dqentry(struct file
+@@ -905,7 +983,7 @@
continue;
if (depth < LUSTRE_DQTREEDEPTH - 1)
@@ -1178,7 +1125,7 @@
depth + 1, list);
else
ret = walk_block_dqentry(filp, inode, type, blk, list);
-@@ -919,61 +994,65 @@ int lustre_get_qids(struct file *fp, str
+@@ -922,61 +1000,65 @@
struct list_head blk_list;
struct dqblk *blk_item, *tmp;
dqbuf_t buf = NULL;
@@ -1271,7 +1218,7 @@
INIT_LIST_HEAD(&dqid->di_link);
list_add(&dqid->di_link, list);
}
-@@ -986,12 +1065,14 @@ out_free:
+@@ -989,12 +1071,14 @@
}
if (buf)
freedqbuf(buf);
@@ -1288,13 +1235,9 @@
EXPORT_SYMBOL(lustre_read_dquot);
EXPORT_SYMBOL(lustre_commit_dquot);
EXPORT_SYMBOL(lustre_init_quota_info);
-Index: lustre/lvfs/lustre_quota_fmt.h
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/lvfs/lustre_quota_fmt.h,v
-retrieving revision 1.2
-diff -p -u -r1.2 lustre_quota_fmt.h
---- ./lustre/lvfs/lustre_quota_fmt.h 31 Mar 2007 00:16:22 -0000 1.2
-+++ ./lustre/lvfs/lustre_quota_fmt.h 19 Dec 2007 20:24:37 -0000
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/lustre_quota_fmt.h lustre-1.6.4.3/lustre/lvfs/lustre_quota_fmt.h
+--- lustre-1.6.4.3~/lustre/lvfs/lustre_quota_fmt.h 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/lvfs/lustre_quota_fmt.h 2008-05-09 11:40:37.000000000 +0200
@@ -17,19 +17,26 @@
* Same with quota v2's magic
*/
@@ -1303,14 +1246,14 @@
- 0xd9c01927 /* GRPQUOTA */\
+ 0xd9c01f11, /* USRQUOTA */\
+ 0xd9c01927 /* GRPQUOTA */\
- }
-
++}
++
+/* Invalid magics that mark quota file as inconsistent */
+#define LUSTRE_BADQMAGICS {\
+ 0xbadbadba, /* USRQUOTA */\
+ 0xbadbadba /* GRPQUOTA */\
-+}
-+
+ }
+
+/* for the verson 1 of lustre_disk_dqblk*/
#define LUSTRE_INITQVERSIONS {\
- 0, /* USRQUOTA */\
@@ -1327,7 +1270,7 @@
*/
struct lustre_disk_dqblk {
__u32 dqb_id; /* id this quota applies to */
-@@ -43,6 +50,45 @@ struct lustre_disk_dqblk {
+@@ -43,6 +50,45 @@
__u64 dqb_itime; /* time limit for excessive inode use */
};
@@ -1373,7 +1316,7 @@
/*
* Here are header structures as written on disk and their in-memory copies
*/
-@@ -79,6 +125,59 @@ struct lustre_disk_dqdbheader {
+@@ -79,6 +125,59 @@
#define LUSTRE_DQBLKSIZE (1 << LUSTRE_DQBLKSIZE_BITS) /* Size of block with quota structures */
#define LUSTRE_DQTREEOFF 1 /* Offset of tree in file in blocks */
#define LUSTRE_DQTREEDEPTH 4 /* Depth of quota tree */
@@ -1434,12 +1377,9 @@
+int lustre_quota_convert(struct lustre_quota_info *lqi, int type);
#endif /* lustre_quota_fmt.h */
-Index: lustre/lvfs/lustre_quota_fmt_convert.c
-===================================================================
-RCS file: lustre/lvfs/lustre_quota_fmt_convert.c
-diff -N lustre/lvfs/lustre_quota_fmt_convert.c
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ ./lustre/lvfs/lustre_quota_fmt_convert.c 19 Dec 2007 20:24:38 -0000
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/lustre_quota_fmt_convert.c lustre-1.6.4.3/lustre/lvfs/lustre_quota_fmt_convert.c
+--- lustre-1.6.4.3~/lustre/lvfs/lustre_quota_fmt_convert.c 1970-01-01 00:00:00.000000000 +0000
++++ lustre-1.6.4.3/lustre/lvfs/lustre_quota_fmt_convert.c 2008-05-09 11:40:37.000000000 +0200
@@ -0,0 +1,185 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
@@ -1626,14 +1566,10 @@
+}
+
+EXPORT_SYMBOL(lustre_quota_convert);
-Index: lustre/lvfs/quotafmt_test.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/lvfs/quotafmt_test.c,v
-retrieving revision 1.2
-diff -p -u -r1.2 quotafmt_test.c
---- ./lustre/lvfs/quotafmt_test.c 31 Mar 2007 00:16:22 -0000 1.2
-+++ ./lustre/lvfs/quotafmt_test.c 19 Dec 2007 20:24:38 -0000
-@@ -70,7 +70,7 @@ static int quotfmt_initialize(struct lus
+diff -urNad lustre-1.6.4.3~/lustre/lvfs/quotafmt_test.c lustre-1.6.4.3/lustre/lvfs/quotafmt_test.c
+--- lustre-1.6.4.3~/lustre/lvfs/quotafmt_test.c 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/lvfs/quotafmt_test.c 2008-05-09 11:40:37.000000000 +0200
+@@ -70,7 +70,7 @@
sizeof(struct lustre_disk_dqheader),
&offset);
if (size != sizeof(struct lustre_disk_dqheader)) {
@@ -1642,7 +1578,7 @@
name, rc);
rc = size;
break;
-@@ -129,7 +129,7 @@ static int quotfmt_test_1(struct lustre_
+@@ -129,7 +129,7 @@
ENTRY;
for (i = 0; i < MAXQUOTAS; i++) {
@@ -1651,7 +1587,7 @@
RETURN(-EINVAL);
}
RETURN(0);
-@@ -220,7 +220,7 @@ static void put_rand_dquot(struct lustre
+@@ -220,7 +220,7 @@
static int write_check_dquot(struct lustre_quota_info *lqi)
{
struct lustre_dquot *dquot;
@@ -1660,14 +1596,10 @@
int rc = 0;
ENTRY;
-Index: lustre/quota/quota_ctl.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/quota/quota_ctl.c,v
-retrieving revision 1.2.34.2
-diff -p -u -r1.2.34.2 quota_ctl.c
---- ./lustre/quota/quota_ctl.c 27 Nov 2007 11:36:18 -0000 1.2.34.2
-+++ ./lustre/quota/quota_ctl.c 19 Dec 2007 20:24:38 -0000
-@@ -74,6 +74,9 @@ int mds_quota_ctl(struct obd_export *exp
+diff -urNad lustre-1.6.4.3~/lustre/quota/quota_ctl.c lustre-1.6.4.3/lustre/quota/quota_ctl.c
+--- lustre-1.6.4.3~/lustre/quota/quota_ctl.c 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/quota/quota_ctl.c 2008-05-09 11:40:37.000000000 +0200
+@@ -74,6 +74,9 @@
case Q_GETOQUOTA:
rc = mds_get_obd_quota(obd, oqctl);
break;
@@ -1677,14 +1609,10 @@
default:
CERROR("%s: unsupported mds_quotactl command: %d\n",
obd->obd_name, oqctl->qc_cmd);
-Index: lustre/quota/quota_interface.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/quota/quota_interface.c,v
-retrieving revision 1.3.12.3
-diff -p -u -r1.3.12.3 quota_interface.c
---- ./lustre/quota/quota_interface.c 12 Jul 2007 08:36:47 -0000 1.3.12.3
-+++ ./lustre/quota/quota_interface.c 19 Dec 2007 20:24:39 -0000
-@@ -175,7 +175,7 @@ EXPORT_SYMBOL(lprocfs_wr_itune);
+diff -urNad lustre-1.6.4.3~/lustre/quota/quota_interface.c lustre-1.6.4.3/lustre/quota/quota_interface.c
+--- lustre-1.6.4.3~/lustre/quota/quota_interface.c 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/quota/quota_interface.c 2008-05-09 11:40:37.000000000 +0200
+@@ -175,7 +175,7 @@
#define USER_QUOTA 1
#define GROUP_QUOTA 2
@@ -1693,7 +1621,7 @@
int lprocfs_rd_type(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
-@@ -192,7 +192,28 @@ int lprocfs_rd_type(char *page, char **s
+@@ -192,7 +192,28 @@
if (type & GROUP_QUOTA)
strcat(stype, "g");
}
@@ -1723,7 +1651,7 @@
return snprintf(page, count, "%s\n", stype);
}
EXPORT_SYMBOL(lprocfs_rd_type);
-@@ -255,17 +276,52 @@ int lprocfs_wr_type(struct file *file, c
+@@ -255,17 +276,52 @@
struct obd_device *obd = (struct obd_device *)data;
struct obd_device_target *obt = &obd->u.obt;
int type = 0;
@@ -1782,7 +1710,7 @@
obt->obt_qctxt.lqc_atype = type;
if (type == 0)
-@@ -496,6 +552,7 @@ static int mds_quota_setup(struct obd_de
+@@ -496,6 +552,7 @@
int rc;
ENTRY;
@@ -1790,13 +1718,9 @@
atomic_set(&obt->obt_quotachecking, 1);
/* initialize quota master and quota context */
sema_init(&mds->mds_qonoff_sem, 1);
-Index: lustre/quota/quota_internal.h
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/quota/quota_internal.h,v
-retrieving revision 1.3.12.1
-diff -p -u -r1.3.12.1 quota_internal.h
---- ./lustre/quota/quota_internal.h 5 Sep 2007 09:50:17 -0000 1.3.12.1
-+++ ./lustre/quota/quota_internal.h 19 Dec 2007 20:24:39 -0000
+diff -urNad lustre-1.6.4.3~/lustre/quota/quota_internal.h lustre-1.6.4.3/lustre/quota/quota_internal.h
+--- lustre-1.6.4.3~/lustre/quota/quota_internal.h 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/quota/quota_internal.h 2008-05-09 11:40:37.000000000 +0200
@@ -27,8 +27,8 @@
#define DQUOT_DEBUG(dquot, fmt, arg...) \
@@ -1808,7 +1732,7 @@
dquot->dq_id, dquot->dq_type, dquot->dq_off, dquot->dq_flags, \
dquot->dq_dqb.dqb_bhardlimit, dquot->dq_dqb.dqb_curspace, \
dquot->dq_dqb.dqb_ihardlimit, dquot->dq_dqb.dqb_curinodes, \
-@@ -74,6 +74,10 @@ int mds_quota_adjust(struct obd_device *
+@@ -74,6 +74,10 @@
int filter_quota_adjust(struct obd_device *obd, unsigned int qcids[],
unsigned int qpids[], int rc, int opc);
int init_admin_quotafiles(struct obd_device *obd, struct obd_quotactl *oqctl);
@@ -1819,14 +1743,10 @@
int mds_admin_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl);
int mds_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl);
int mds_quota_off(struct obd_device *obd, struct obd_quotactl *oqctl);
-Index: lustre/quota/quota_master.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/quota/quota_master.c,v
-retrieving revision 1.2.34.5
-diff -p -u -r1.2.34.5 quota_master.c
---- ./lustre/quota/quota_master.c 27 Nov 2007 11:36:18 -0000 1.2.34.5
-+++ ./lustre/quota/quota_master.c 19 Dec 2007 20:24:39 -0000
-@@ -361,31 +361,122 @@ int filter_quota_adjust(struct obd_devic
+diff -urNad lustre-1.6.4.3~/lustre/quota/quota_master.c lustre-1.6.4.3/lustre/quota/quota_master.c
+--- lustre-1.6.4.3~/lustre/quota/quota_master.c 2008-05-09 11:40:37.000000000 +0200
++++ lustre-1.6.4.3/lustre/quota/quota_master.c 2008-05-09 11:40:37.000000000 +0200
+@@ -361,31 +361,122 @@
RETURN(0);
}
@@ -1959,7 +1879,7 @@
if (!Q_TYPESET(oqctl, i))
continue;
-@@ -397,33 +488,44 @@ int init_admin_quotafiles(struct obd_dev
+@@ -397,33 +488,44 @@
continue;
}
@@ -2025,7 +1945,7 @@
rc = PTR_ERR(fp);
CERROR("error creating admin quotafile %s (rc:%d)\n",
name, rc);
-@@ -431,15 +533,26 @@ int init_admin_quotafiles(struct obd_dev
+@@ -431,15 +533,26 @@
}
qinfo->qi_files[i] = fp;
@@ -2042,13 +1962,13 @@
+ if (rc)
+ CERROR("error init %s admin quotafile! (rc:%d)\n",
+ i == USRQUOTA ? "user" : "group", rc);
- break;
++ break;
+ case LUSTRE_QUOTA_V2:
+ rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_CONVERT);
+ if (rc)
+ CERROR("error convert %s admin quotafile! (rc:%d)\n",
+ i == USRQUOTA ? "user" : "group", rc);
-+ break;
+ break;
+ default:
+ LBUG();
}
@@ -2058,7 +1978,7 @@
}
up(&mds->mds_qonoff_sem);
-@@ -470,38 +583,61 @@ int mds_admin_quota_on(struct obd_device
+@@ -470,38 +583,61 @@
{
struct mds_obd *mds = &obd->u.mds;
struct lustre_quota_info *qinfo = &mds->mds_quota_info;
@@ -2130,7 +2050,7 @@
rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_RD_INFO);
if (rc) {
CERROR("error read quotainfo of %s! (rc:%d)\n",
-@@ -748,7 +884,7 @@ int mds_set_dqblk(struct obd_device *obd
+@@ -748,7 +884,7 @@
{
struct mds_obd *mds = &obd->u.mds;
struct lustre_quota_info *qinfo = &mds->mds_quota_info;
@@ -2139,14 +2059,10 @@
time_t btime, itime;
struct lustre_dquot *dquot;
struct obd_dqblk *dqblk = &oqctl->qc_dqblk;
-Index: lustre/tests/sanity-quota.sh
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/tests/sanity-quota.sh,v
-retrieving revision 1.7.10.20
-diff -p -u -r1.7.10.20 sanity-quota.sh
---- ./lustre/tests/sanity-quota.sh 12 Dec 2007 20:31:53 -0000 1.7.10.20
-+++ ./lustre/tests/sanity-quota.sh 19 Dec 2007 20:24:41 -0000
-@@ -1029,6 +1029,79 @@ test_14(){ # b=12223 -- setting quota on
+diff -urNad lustre-1.6.4.3~/lustre/tests/sanity-quota.sh lustre-1.6.4.3/lustre/tests/sanity-quota.sh
+--- lustre-1.6.4.3~/lustre/tests/sanity-quota.sh 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/tests/sanity-quota.sh 2008-05-09 11:40:37.000000000 +0200
+@@ -1037,6 +1037,79 @@
}
run_test 14 "test setting quota on root ==="
@@ -2226,16 +2142,12 @@
# turn off quota
test_99()
{
-Index: lustre/tests/test-framework.sh
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/tests/test-framework.sh,v
-retrieving revision 1.42.10.46
-diff -p -u -r1.42.10.46 test-framework.sh
---- ./lustre/tests/test-framework.sh 12 Dec 2007 21:08:16 -0000 1.42.10.46
-+++ ./lustre/tests/test-framework.sh 19 Dec 2007 20:24:43 -0000
-@@ -1246,3 +1246,15 @@ check_runas_id() {
- add user $myRUNAS_ID:$myRUNAS_ID on these nodes."
- rm -rf $DIR/d0_runas_test
+diff -urNad lustre-1.6.4.3~/lustre/tests/test-framework.sh lustre-1.6.4.3/lustre/tests/test-framework.sh
+--- lustre-1.6.4.3~/lustre/tests/test-framework.sh 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/tests/test-framework.sh 2008-05-09 11:40:37.000000000 +0200
+@@ -1175,3 +1175,15 @@
+ {
+ grep -q patchless $LPROC/version
}
+
+check_runas_id_ret() {
@@ -2249,14 +2161,10 @@
+ rm -rf $DIR/d0_runas_test
+ return 0
+}
-Index: lustre/utils/lfs.c
-===================================================================
-RCS file: /cvsroot/cfs/lustre-core/utils/lfs.c,v
-retrieving revision 1.21.18.13
-diff -p -u -r1.21.18.13 lfs.c
---- ./lustre/utils/lfs.c 29 Nov 2007 01:45:59 -0000 1.21.18.13
-+++ ./lustre/utils/lfs.c 19 Dec 2007 20:24:46 -0000
-@@ -66,6 +66,7 @@ static int lfs_quotaon(int argc, char **
+diff -urNad lustre-1.6.4.3~/lustre/utils/lfs.c lustre-1.6.4.3/lustre/utils/lfs.c
+--- lustre-1.6.4.3~/lustre/utils/lfs.c 2008-05-09 11:40:16.000000000 +0200
++++ lustre-1.6.4.3/lustre/utils/lfs.c 2008-05-09 11:40:38.000000000 +0200
+@@ -66,6 +66,7 @@
static int lfs_quotaoff(int argc, char **argv);
static int lfs_setquota(int argc, char **argv);
static int lfs_quota(int argc, char **argv);
@@ -2264,7 +2172,7 @@
#endif
static int lfs_join(int argc, char **argv);
-@@ -135,6 +136,8 @@ command_t cmdlist[] = {
+@@ -135,6 +136,8 @@
" setquota -t [ -u | -g ] <block-grace> <inode-grace> <filesystem>"},
{"quota", lfs_quota, 0, "Display disk usage and limits.\n"
"usage: quota [ -o obd_uuid ] [{-u|-g <name>}|-t] <filesystem>"},
@@ -2273,7 +2181,7 @@
#endif
{"help", Parser_help, 0, "help"},
{"exit", Parser_quit, 0, "quit"},
-@@ -1257,6 +1260,52 @@ static int lfs_quotaoff(int argc, char *
+@@ -1253,6 +1256,52 @@
return 0;
}
@@ -2326,9 +2234,9 @@
static int name2id(unsigned int *id, char *name, int type)
{
if (type == USRQUOTA) {
-@@ -1380,6 +1429,17 @@ error:
- return ULONG_MAX;
- }
+@@ -1317,6 +1366,17 @@
+ } \
+ } while (0)
+#define ARG2ULL(nr, str, msg) \
+do { \
@@ -2344,7 +2252,7 @@
int lfs_setquota(int argc, char **argv)
{
int c;
-@@ -1432,10 +1492,10 @@ int lfs_setquota(int argc, char **argv)
+@@ -1369,10 +1429,10 @@
return CMD_HELP;
}
Added: trunk/debian/patches/bug13904-fix3.dpatch
URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug13904-fix3.dpatch?rev=472&op=file
==============================================================================
--- trunk/debian/patches/bug13904-fix3.dpatch (added)
+++ trunk/debian/patches/bug13904-fix3.dpatch Fri May 9 10:01:16 2008
@@ -1,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Missing include of sys/quota.h
+
+ at DPATCH@
+diff -urNad lustre-1.6.4.3~/lustre/quota/quota_context.c lustre-1.6.4.3/lustre/quota/quota_context.c
+--- lustre-1.6.4.3~/lustre/quota/quota_context.c 2008-05-09 11:44:15.000000000 +0200
++++ lustre-1.6.4.3/lustre/quota/quota_context.c 2008-05-09 11:46:58.000000000 +0200
+@@ -413,7 +413,7 @@
+
+ /* update local operational quota file */
+ if (rc == 0) {
+- __u32 count = QUSG(qdata->qd_count, is_blk);
++ __u64 count = QUSG(qdata->qd_count, is_blk);
+ struct obd_quotactl *qctl;
+ __u64 *hardlimit;
+
+@@ -453,7 +453,7 @@
+ ",type: %s.\n", obd->obd_name, count, *hardlimit,
+ qdata_type ? "grp": "usr");
+ LASSERTF(count < *hardlimit,
+- "count: %d, hardlimit: "LPU64".\n",
++ "count: "LPU64", hardlimit: "LPU64".\n",
+ count, *hardlimit);
+ *hardlimit -= count;
+ break;
More information about the Pkg-lustre-svn-commit
mailing list