Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove the extra op argument to VFS_QUOTACTL() - the op ...
details: https://anonhg.NetBSD.org/src/rev/6e664cb35d91
branches: trunk
changeset: 773206:6e664cb35d91
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jan 29 07:14:38 2012 +0000
description:
Remove the extra op argument to VFS_QUOTACTL() - the op is now stored
purely in the args structure.
This change requires a kernel version bump.
diffstat:
sys/kern/vfs_quotactl.c | 37 ++++++++++++++++++-------------------
sys/kern/vfs_subr.c | 11 ++++-------
sys/miscfs/genfs/layer_extern.h | 4 ++--
sys/miscfs/genfs/layer_vfsops.c | 8 ++++----
sys/sys/mount.h | 6 +++---
sys/ufs/ufs/ufs_extern.h | 6 +++---
sys/ufs/ufs/ufs_quota.c | 10 +++++-----
sys/ufs/ufs/ufs_vfsops.c | 8 ++++----
8 files changed, 43 insertions(+), 47 deletions(-)
diffs (truncated from 389 to 300 lines):
diff -r 63071137ed40 -r 6e664cb35d91 sys/kern/vfs_quotactl.c
--- a/sys/kern/vfs_quotactl.c Sun Jan 29 07:13:42 2012 +0000
+++ b/sys/kern/vfs_quotactl.c Sun Jan 29 07:14:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_quotactl.c,v 1.34 2012/01/29 07:13:42 dholland Exp $ */
+/* $NetBSD: vfs_quotactl.c,v 1.35 2012/01/29 07:14:38 dholland Exp $ */
/*
* Copyright (c) 1991, 1993, 1994
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.34 2012/01/29 07:13:42 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_quotactl.c,v 1.35 2012/01/29 07:14:38 dholland Exp $");
#include <sys/malloc.h> /* XXX: temporary */
#include <sys/mount.h>
@@ -105,7 +105,7 @@
args.qc_op = QUOTACTL_STAT;
args.u.stat.qc_ret = &stat;
- error = VFS_QUOTACTL(mp, QUOTACTL_STAT, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
return error;
}
@@ -176,7 +176,7 @@
args.qc_op = QUOTACTL_QUOTAON;
args.u.quotaon.qc_idtype = q2type;
args.u.quotaon.qc_quotafile = qfile;
- return VFS_QUOTACTL(mp, QUOTACTL_QUOTAON, &args);
+ return VFS_QUOTACTL(mp, &args);
}
static int
@@ -194,7 +194,7 @@
args.qc_op = QUOTACTL_QUOTAOFF;
args.u.quotaoff.qc_idtype = q2type;
- return VFS_QUOTACTL(mp, QUOTACTL_QUOTAOFF, &args);
+ return VFS_QUOTACTL(mp, &args);
}
static int
@@ -283,7 +283,7 @@
args.qc_op = QUOTACTL_GET;
args.u.get.qc_key = &qk;
args.u.get.qc_ret = &blocks;
- error = VFS_QUOTACTL(mp, QUOTACTL_GET, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error == EPERM) {
/* XXX does this make sense? */
continue;
@@ -299,7 +299,7 @@
args.qc_op = QUOTACTL_GET;
args.u.get.qc_key = &qk;
args.u.get.qc_ret = &files;
- error = VFS_QUOTACTL(mp, QUOTACTL_GET, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error == EPERM) {
/* XXX does this make sense? */
continue;
@@ -438,7 +438,7 @@
args.qc_op = QUOTACTL_PUT;
args.u.put.qc_key = &qk;
args.u.put.qc_val = &blocks;
- error = VFS_QUOTACTL(mp, QUOTACTL_PUT, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
goto err;
}
@@ -450,7 +450,7 @@
args.qc_op = QUOTACTL_PUT;
args.u.put.qc_key = &qk;
args.u.put.qc_val = &files;
- error = VFS_QUOTACTL(mp, QUOTACTL_PUT, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
goto err;
}
@@ -574,7 +574,7 @@
args.qc_op = QUOTACTL_CURSOROPEN;
args.u.cursoropen.qc_cursor = &cursor;
- error = VFS_QUOTACTL(mp, QUOTACTL_CURSOROPEN, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
return error;
}
@@ -587,7 +587,7 @@
args.qc_op = QUOTACTL_CURSORSKIPIDTYPE;
args.u.cursorskipidtype.qc_cursor = &cursor;
args.u.cursorskipidtype.qc_idtype = skipidtype;
- error = VFS_QUOTACTL(mp, QUOTACTL_CURSORSKIPIDTYPE, &args);
+ error = VFS_QUOTACTL(mp, &args);
/* ignore if it fails */
(void)error;
@@ -605,7 +605,7 @@
args.qc_op = QUOTACTL_CURSORATEND;
args.u.cursoratend.qc_cursor = &cursor;
args.u.cursoratend.qc_ret = &atend;
- error = VFS_QUOTACTL(mp, QUOTACTL_CURSORATEND, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
goto err;
}
@@ -620,7 +620,7 @@
args.u.cursorget.qc_maxnum = loopmax;
args.u.cursorget.qc_ret = &loopnum;
- error = VFS_QUOTACTL(mp, QUOTACTL_CURSORGET, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error == EDEADLK) {
/*
* transaction abort, start over
@@ -628,7 +628,7 @@
args.qc_op = QUOTACTL_CURSORREWIND;
args.u.cursorrewind.qc_cursor = &cursor;
- error = VFS_QUOTACTL(mp, QUOTACTL_CURSORREWIND, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
goto err;
}
@@ -636,8 +636,7 @@
args.qc_op = QUOTACTL_CURSORSKIPIDTYPE;
args.u.cursorskipidtype.qc_cursor = &cursor;
args.u.cursorskipidtype.qc_idtype = skipidtype;
- error = VFS_QUOTACTL(mp, QUOTACTL_CURSORSKIPIDTYPE,
- &args);
+ error = VFS_QUOTACTL(mp, &args);
/* ignore if it fails */
(void)error;
@@ -731,7 +730,7 @@
args.qc_op = QUOTACTL_CURSORCLOSE;
args.u.cursorclose.qc_cursor = &cursor;
- error2 = VFS_QUOTACTL(mp, QUOTACTL_CURSORCLOSE, &args);
+ error2 = VFS_QUOTACTL(mp, &args);
if (error) {
return error;
@@ -787,7 +786,7 @@
args.qc_op = QUOTACTL_DELETE;
args.u.delete.qc_key = &qk;
- error = VFS_QUOTACTL(mp, QUOTACTL_DELETE, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
goto err;
}
@@ -798,7 +797,7 @@
args.qc_op = QUOTACTL_DELETE;
args.u.delete.qc_key = &qk;
- error = VFS_QUOTACTL(mp, QUOTACTL_DELETE, &args);
+ error = VFS_QUOTACTL(mp, &args);
if (error) {
goto err;
}
diff -r 63071137ed40 -r 6e664cb35d91 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c Sun Jan 29 07:13:42 2012 +0000
+++ b/sys/kern/vfs_subr.c Sun Jan 29 07:14:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.430 2012/01/29 07:13:42 dholland Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.431 2012/01/29 07:14:38 dholland Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.430 2012/01/29 07:13:42 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.431 2012/01/29 07:14:38 dholland Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@@ -90,7 +90,6 @@
#include <sys/syscallargs.h>
#include <sys/kauth.h>
#include <sys/module.h>
-#include <sys/quotactl.h> /* XXX temporary */
#include <miscfs/genfs/genfs.h>
#include <miscfs/syncfs/syncfs.h>
@@ -1007,16 +1006,14 @@
}
int
-VFS_QUOTACTL(struct mount *mp, int op, struct vfs_quotactl_args *args)
+VFS_QUOTACTL(struct mount *mp, struct vfs_quotactl_args *args)
{
int error;
- KASSERT(op == args->qc_op);
-
if ((mp->mnt_iflag & IMNT_MPSAFE) == 0) {
KERNEL_LOCK(1, NULL);
}
- error = (*(mp->mnt_op->vfs_quotactl))(mp, op, args);
+ error = (*(mp->mnt_op->vfs_quotactl))(mp, args);
if ((mp->mnt_iflag & IMNT_MPSAFE) == 0) {
KERNEL_UNLOCK_ONE(NULL);
}
diff -r 63071137ed40 -r 6e664cb35d91 sys/miscfs/genfs/layer_extern.h
--- a/sys/miscfs/genfs/layer_extern.h Sun Jan 29 07:13:42 2012 +0000
+++ b/sys/miscfs/genfs/layer_extern.h Sun Jan 29 07:14:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: layer_extern.h,v 1.32 2012/01/29 06:36:06 dholland Exp $ */
+/* $NetBSD: layer_extern.h,v 1.33 2012/01/29 07:14:39 dholland Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@@ -88,7 +88,7 @@
/* VFS routines */
int layerfs_start(struct mount *, int);
int layerfs_root(struct mount *, struct vnode **);
-int layerfs_quotactl(struct mount *, int, struct vfs_quotactl_args *);
+int layerfs_quotactl(struct mount *, struct vfs_quotactl_args *);
int layerfs_statvfs(struct mount *, struct statvfs *);
int layerfs_sync(struct mount *, int, struct kauth_cred *);
int layerfs_vget(struct mount *, ino_t, struct vnode **);
diff -r 63071137ed40 -r 6e664cb35d91 sys/miscfs/genfs/layer_vfsops.c
--- a/sys/miscfs/genfs/layer_vfsops.c Sun Jan 29 07:13:42 2012 +0000
+++ b/sys/miscfs/genfs/layer_vfsops.c Sun Jan 29 07:14:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: layer_vfsops.c,v 1.37 2012/01/29 06:36:06 dholland Exp $ */
+/* $NetBSD: layer_vfsops.c,v 1.38 2012/01/29 07:14:39 dholland Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.37 2012/01/29 06:36:06 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.38 2012/01/29 07:14:39 dholland Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -141,10 +141,10 @@
}
int
-layerfs_quotactl(struct mount *mp, int op, struct vfs_quotactl_args *args)
+layerfs_quotactl(struct mount *mp, struct vfs_quotactl_args *args)
{
- return VFS_QUOTACTL(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, op, args);
+ return VFS_QUOTACTL(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, args);
}
int
diff -r 63071137ed40 -r 6e664cb35d91 sys/sys/mount.h
--- a/sys/sys/mount.h Sun Jan 29 07:13:42 2012 +0000
+++ b/sys/sys/mount.h Sun Jan 29 07:14:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mount.h,v 1.205 2012/01/29 06:36:06 dholland Exp $ */
+/* $NetBSD: mount.h,v 1.206 2012/01/29 07:14:38 dholland Exp $ */
/*
* Copyright (c) 1989, 1991, 1993
@@ -209,7 +209,7 @@
int (*vfs_start) (struct mount *, int);
int (*vfs_unmount) (struct mount *, int);
int (*vfs_root) (struct mount *, struct vnode **);
- int (*vfs_quotactl) (struct mount *, int, struct vfs_quotactl_args *);
+ int (*vfs_quotactl) (struct mount *, struct vfs_quotactl_args *);
int (*vfs_statvfs) (struct mount *, struct statvfs *);
int (*vfs_sync) (struct mount *, int, struct kauth_cred *);
int (*vfs_vget) (struct mount *, ino_t, struct vnode **);
@@ -244,7 +244,7 @@
int VFS_START(struct mount *, int);
int VFS_UNMOUNT(struct mount *, int);
int VFS_ROOT(struct mount *, struct vnode **);
-int VFS_QUOTACTL(struct mount *, int, struct vfs_quotactl_args *);
+int VFS_QUOTACTL(struct mount *, struct vfs_quotactl_args *);
int VFS_STATVFS(struct mount *, struct statvfs *);
int VFS_SYNC(struct mount *, int, struct kauth_cred *);
int VFS_FHTOVP(struct mount *, struct fid *, struct vnode **);
diff -r 63071137ed40 -r 6e664cb35d91 sys/ufs/ufs/ufs_extern.h
--- a/sys/ufs/ufs/ufs_extern.h Sun Jan 29 07:13:42 2012 +0000
+++ b/sys/ufs/ufs/ufs_extern.h Sun Jan 29 07:14:38 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_extern.h,v 1.69 2012/01/29 06:36:07 dholland Exp $ */
+/* $NetBSD: ufs_extern.h,v 1.70 2012/01/29 07:14:38 dholland Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -148,7 +148,7 @@
void ufsquota_free(struct inode *);
int chkdq(struct inode *, int64_t, kauth_cred_t, int);
int chkiq(struct inode *, int32_t, kauth_cred_t, int);
-int quota_handle_cmd(struct mount *, struct lwp *, int,
+int quota_handle_cmd(struct mount *, struct lwp *,
struct vfs_quotactl_args *);
Home |
Main Index |
Thread Index |
Old Index