Module Name:    src
Committed By:   bouyer
Date:           Wed Feb  9 11:18:30 UTC 2011

Modified Files:
        src/sys/ufs [bouyer-quota2]: files.ufs
        src/sys/ufs/lfs [bouyer-quota2]: lfs_vfsops.c
        src/sys/ufs/ufs [bouyer-quota2]: quota.h quota1.h ufs_quota.c
            ufs_quota.h ufs_quota2.c

Log Message:
Various build fixes


To generate a diff of this commit:
cvs rdiff -u -r1.24.6.1 -r1.24.6.2 src/sys/ufs/files.ufs
cvs rdiff -u -r1.287 -r1.287.4.1 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.25.64.2 -r1.25.64.3 src/sys/ufs/ufs/quota.h
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/ufs/ufs/quota1.h
cvs rdiff -u -r1.68.4.9 -r1.68.4.10 src/sys/ufs/ufs/ufs_quota.c
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/sys/ufs/ufs/ufs_quota.h
cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/sys/ufs/ufs/ufs_quota2.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/files.ufs
diff -u src/sys/ufs/files.ufs:1.24.6.1 src/sys/ufs/files.ufs:1.24.6.2
--- src/sys/ufs/files.ufs:1.24.6.1	Thu Jan 20 14:25:01 2011
+++ src/sys/ufs/files.ufs	Wed Feb  9 11:18:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ufs,v 1.24.6.1 2011/01/20 14:25:01 bouyer Exp $
+#	$NetBSD: files.ufs,v 1.24.6.2 2011/02/09 11:18:29 bouyer Exp $
 
 deffs					FFS
 deffs					EXT2FS
@@ -63,6 +63,7 @@
 file	ufs/ufs/ufs_quota1.c		quota & (ffs | lfs | mfs | ext2fs)
 file	ufs/ufs/ufs_quota2.c		quota2 & (ffs | lfs | mfs | ext2fs)
 file	ufs/ufs/quota2_subr.c		quota2 & (ffs | lfs | mfs | ext2fs)
+file	ufs/ufs/quota2_prop.c		(quota | quota2) & (ffs | lfs | mfs | ext2fs)
 file	ufs/ufs/ufs_vfsops.c		ffs | lfs | mfs | ext2fs
 file	ufs/ufs/ufs_vnops.c		ffs | lfs | mfs | ext2fs
 file	ufs/ufs/ufs_wapbl.c		ffs & wapbl

Index: src/sys/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.287 src/sys/ufs/lfs/lfs_vfsops.c:1.287.4.1
--- src/sys/ufs/lfs/lfs_vfsops.c:1.287	Thu Jun 24 13:03:19 2010
+++ src/sys/ufs/lfs/lfs_vfsops.c	Wed Feb  9 11:18:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_vfsops.c,v 1.287 2010/06/24 13:03:19 hannken Exp $	*/
+/*	$NetBSD: lfs_vfsops.c,v 1.287.4.1 2011/02/09 11:18:29 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.287 2010/06/24 13:03:19 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.287.4.1 2011/02/09 11:18:29 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_lfs.h"
@@ -1123,21 +1123,8 @@
 	mutex_exit(&lfs_lock);
 
 #ifdef QUOTA
-	if (mp->mnt_flag & MNT_QUOTA) {
-		int i;
-		error = vflush(mp, fs->lfs_ivnode, SKIPSYSTEM|flags);
-		if (error)
-			return (error);
-		for (i = 0; i < MAXQUOTAS; i++) {
-			if (ump->um_quotas[i] == NULLVP)
-				continue;
-			quotaoff(l, mp, i);
-		}
-		/*
-		 * Here we fall through to vflush again to ensure
-		 * that we have gotten rid of all the system vnodes.
-		 */
-	}
+        if ((error = quota1_umount(mp, flags)) != 0)
+		return (error);
 #endif
 	if ((error = vflush(mp, fs->lfs_ivnode, flags)) != 0)
 		return (error);

Index: src/sys/ufs/ufs/quota.h
diff -u src/sys/ufs/ufs/quota.h:1.25.64.2 src/sys/ufs/ufs/quota.h:1.25.64.3
--- src/sys/ufs/ufs/quota.h:1.25.64.2	Mon Jan 31 15:19:21 2011
+++ src/sys/ufs/ufs/quota.h	Wed Feb  9 11:18:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota.h,v 1.25.64.2 2011/01/31 15:19:21 bouyer Exp $	*/
+/*	$NetBSD: quota.h,v 1.25.64.3 2011/02/09 11:18:29 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -59,7 +59,6 @@
 #define INITQFNAMES { \
 	"user",		/* USRQUOTA */ \
 	"group",	/* GRPQUOTA */ \
-	"undefined", \
 }
 
 /* definition of limits types for each quota */

Index: src/sys/ufs/ufs/quota1.h
diff -u src/sys/ufs/ufs/quota1.h:1.1.2.2 src/sys/ufs/ufs/quota1.h:1.1.2.3
--- src/sys/ufs/ufs/quota1.h:1.1.2.2	Fri Jan 28 23:31:16 2011
+++ src/sys/ufs/ufs/quota1.h	Wed Feb  9 11:18:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: quota1.h,v 1.1.2.2 2011/01/28 23:31:16 bouyer Exp $	*/
+/*	$NetBSD: quota1.h,v 1.1.2.3 2011/02/09 11:18:30 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -93,6 +93,7 @@
 };
 
 /* quota1_subr.c */
+struct quota2_entry;
 void dqblk2q2e(const struct dqblk *, struct quota2_entry *);
 void q2e2dqblk(const struct quota2_entry *, struct dqblk *);
 

Index: src/sys/ufs/ufs/ufs_quota.c
diff -u src/sys/ufs/ufs/ufs_quota.c:1.68.4.9 src/sys/ufs/ufs/ufs_quota.c:1.68.4.10
--- src/sys/ufs/ufs/ufs_quota.c:1.68.4.9	Tue Feb  8 20:00:53 2011
+++ src/sys/ufs/ufs/ufs_quota.c	Wed Feb  9 11:18:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.c,v 1.68.4.9 2011/02/08 20:00:53 bouyer Exp $	*/
+/*	$NetBSD: ufs_quota.c,v 1.68.4.10 2011/02/09 11:18:30 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.68.4.9 2011/02/08 20:00:53 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.68.4.10 2011/02/09 11:18:30 bouyer Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -60,6 +60,18 @@
 kmutex_t dqlock;
 kcondvar_t dqcv;
 
+const char *quotatypes[MAXQUOTAS] = INITQFNAMES;
+
+/*
+ * Code pertaining to management of the in-core dquot data structures.
+ */
+#define DQHASH(dqvp, id) \
+	(((((long)(dqvp)) >> 8) + id) & dqhash)
+static LIST_HEAD(dqhashhead, dquot) *dqhashtbl;
+static u_long dqhash;
+static pool_cache_t dquot_cache;
+
+
 static int quota_handle_cmd_get_version(struct mount *, struct lwp *,
     prop_dictionary_t, prop_array_t);
 static int quota_handle_cmd_get(struct mount *, struct lwp *,

Index: src/sys/ufs/ufs/ufs_quota.h
diff -u src/sys/ufs/ufs/ufs_quota.h:1.1.2.7 src/sys/ufs/ufs/ufs_quota.h:1.1.2.8
--- src/sys/ufs/ufs/ufs_quota.h:1.1.2.7	Tue Feb  8 20:09:56 2011
+++ src/sys/ufs/ufs/ufs_quota.h	Wed Feb  9 11:18:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.h,v 1.1.2.7 2011/02/08 20:09:56 bouyer Exp $	*/
+/*	$NetBSD: ufs_quota.h,v 1.1.2.8 2011/02/09 11:18:30 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -100,16 +100,7 @@
 /*
  * Quota name to error message mapping.
  */
-static const char *quotatypes[] = INITQFNAMES;
-
-/*       
- * Code pertaining to management of the in-core dquot data structures.
- */      
-#define DQHASH(dqvp, id) \
-	(((((long)(dqvp)) >> 8) + id) & dqhash) 
-static LIST_HEAD(dqhashhead, dquot) *dqhashtbl;
-static u_long dqhash;
-static pool_cache_t dquot_cache;
+const char *quotatypes[MAXQUOTAS];
 
 int  getinoquota(struct inode *);
 int  dqget(struct vnode *, u_long, struct ufsmount *, int, struct dquot **);

Index: src/sys/ufs/ufs/ufs_quota2.c
diff -u src/sys/ufs/ufs/ufs_quota2.c:1.1.2.10 src/sys/ufs/ufs/ufs_quota2.c:1.1.2.11
--- src/sys/ufs/ufs/ufs_quota2.c:1.1.2.10	Tue Feb  8 20:00:53 2011
+++ src/sys/ufs/ufs/ufs_quota2.c	Wed Feb  9 11:18:30 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.1.2.10 2011/02/08 20:00:53 bouyer Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.1.2.11 2011/02/09 11:18:30 bouyer Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -28,7 +28,7 @@
   */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.1.2.10 2011/02/08 20:00:53 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.1.2.11 2011/02/09 11:18:30 bouyer Exp $");
 
 #include <sys/buf.h>
 #include <sys/param.h>
@@ -80,7 +80,9 @@
 getq2h(struct ufsmount *ump, int type,
     struct buf **bpp, struct quota2_header **q2hp, int flags)
 {
+#ifdef FFS_EI
 	const int needswap = UFS_MPNEEDSWAP(ump);
+#endif
 	int error;
 	struct buf *bp;
 	struct quota2_header *q2h;
@@ -134,7 +136,9 @@
     uint64_t *offp, int flags, void *a,
     int (*func)(struct ufsmount *, uint64_t *, struct quota2_entry *, uint64_t, void *))
 {
+#ifdef FFS_EI
 	const int needswap = UFS_MPNEEDSWAP(ump);
+#endif
 	daddr_t off = ufs_rw64(*offp, needswap);
 	struct buf *bp, *obp = hbp;
 	int ret = 0, ret2 = 0;
@@ -576,7 +580,9 @@
     uint64_t off, void *v)
 {
 	struct dq2clear_callback *c = v;
+#ifdef FFS_EI
 	const int needswap = UFS_MPNEEDSWAP(ump);
+#endif
 	uint64_t myoff;
 
 	if (ufs_rw32(q2e->q2e_uid, needswap) == c->id) {
@@ -770,7 +776,9 @@
 {
 	struct getuids *gu = v;
 	uid_t *newuids;
+#ifdef FFS_EI
 	const int needswap = UFS_MPNEEDSWAP(ump);
+#endif
 
 	if (gu->nuids == gu->size) {
 		newuids = realloc(gu->uids, gu->size + PAGE_SIZE, M_TEMP,
@@ -866,7 +874,9 @@
 	struct dq2get_callback *c = v;
 	daddr_t lblkno;
 	int blkoff;
+#ifdef FFS_EI
 	const int needswap = UFS_MPNEEDSWAP(ump);
+#endif
 
 	if (ufs_rw32(q2e->q2e_uid, needswap) == c->id) {
 		KASSERT(mutex_owned(&c->dq->dq_interlock));

Reply via email to