* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/kern/init_sysent.c,v 1.18 2004/11/23 06:32:32 dillon Exp $
- * created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+ * $DragonFly: src/sys/kern/init_sysent.c,v 1.19 2004/12/24 05:00:17 dillon Exp $
+ * created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
*/
#include "opt_compat.h"
{ AS(exec_sys_register_args), (sy_call_t *)exec_sys_register }, /* 465 = exec_sys_register */
{ AS(exec_sys_unregister_args), (sy_call_t *)exec_sys_unregister }, /* 466 = exec_sys_unregister */
{ AS(sys_checkpoint_args), (sy_call_t *)sys_checkpoint }, /* 467 = sys_checkpoint */
+ { AS(mountctl_args), (sy_call_t *)mountctl }, /* 468 = mountctl */
};
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/kern/syscalls.c,v 1.18 2004/11/23 06:32:32 dillon Exp $
- * created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+ * $DragonFly: src/sys/kern/syscalls.c,v 1.19 2004/12/24 05:00:17 dillon Exp $
+ * created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
*/
char *syscallnames[] = {
"exec_sys_register", /* 465 = exec_sys_register */
"exec_sys_unregister", /* 466 = exec_sys_unregister */
"sys_checkpoint", /* 467 = sys_checkpoint */
+ "mountctl", /* 468 = mountctl */
};
- $DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp $
+ $DragonFly: src/sys/kern/syscalls.master,v 1.14 2004/12/24 05:00:17 dillon Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; $FreeBSD: src/sys/kern/syscalls.master,v 1.72.2.10 2002/07/12 08:22:46 alfred Exp $
465 STD BSD { int exec_sys_register(void *entry); }
466 STD BSD { int exec_sys_unregister(int id); }
467 STD BSD { int sys_checkpoint(int type, int fd, pid_t pid, int retval); }
+468 STD BSD { int mountctl(char *path, int op, const void *ctl, int ctllen, void *buf, int buflen); }
*
*
* $FreeBSD: src/sys/kern/vfs_default.c,v 1.28.2.7 2003/01/10 18:23:26 bde Exp $
- * $DragonFly: src/sys/kern/vfs_default.c,v 1.23 2004/11/18 20:04:24 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_default.c,v 1.24 2004/12/24 05:00:17 dillon Exp $
*/
#include <sys/param.h>
#include <sys/namei.h>
#include <sys/nlookup.h>
#include <sys/poll.h>
+#include <sys/mountctl.h>
#include <machine/limits.h>
{ &vop_nremove_desc, (void *) vop_compat_nremove },
{ &vop_nrmdir_desc, (void *) vop_compat_nrmdir },
{ &vop_nrename_desc, (void *) vop_compat_nrename },
+ { &vop_mountctl_desc, (void *) vop_stdmountctl },
{ NULL, NULL }
};
return (vp->v_object ? 0 : EINVAL);
}
+/*
+ * Standard mount controls. These are overridden when the journal is
+ * installed so we only have to 'bootstrap' the journal installation
+ * operation here.
+ */
+int
+vop_stdmountctl(struct vop_mountctl_args *ap)
+{
+ int error = EOPNOTSUPP;
+
+ switch(ap->a_op) {
+ case MOUNTCTL_INSTALL_VFS_JOURNAL:
+ case MOUNTCTL_INSTALL_BLK_JOURNAL:
+ default:
+ break;
+ }
+ return (error);
+}
+
/*
* vfs default ops
* used to fill the vfs fucntion table to get reasonable default return values.
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/vfs_jops.c,v 1.1 2004/12/17 00:18:07 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_jops.c,v 1.2 2004/12/24 05:00:17 dillon Exp $
*/
#include <sys/param.h>
static struct vnodeopv_entry_desc journal_vnodeop_entries[] = {
{ &vop_default_desc, vop_journal_operate_ap },
+/* { &vop_mountctl_desc, NULL },*/
{ NULL, NULL }
};
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/vfs_journal.c,v 1.1 2004/12/17 00:18:07 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_journal.c,v 1.2 2004/12/24 05:00:17 dillon Exp $
*/
#include <sys/param.h>
static struct vnodeopv_entry_desc journal_vnodeop_entries[] = {
{ &vop_default_desc, vop_journal_operate_ap },
+/* { &vop_mountctl_desc, NULL },*/
{ NULL, NULL }
};
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/vfs_lock.c,v 1.3 2004/11/23 04:05:36 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_lock.c,v 1.4 2004/12/24 05:00:17 dillon Exp $
*/
/*
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.151.2.18 2003/04/04 20:35:58 tegge Exp $
- * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.49 2004/12/17 00:18:07 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.50 2004/12/24 05:00:17 dillon Exp $
*/
#include <sys/param.h>
return (error);
}
+/*
+ * mountctl(char *path, int op, const void *ctl, int ctllen,
+ * void *buf, int buflen)
+ *
+ * This function operates on a mount point and executes the specified
+ * operation using the specified control data, and possibly returns data.
+ *
+ * The actual number of bytes stored in the result buffer is returned, 0
+ * if none, otherwise an error is returned.
+ */
+/* ARGSUSED */
+int
+mountctl(struct mountctl_args *uap)
+{
+ struct thread *td = curthread;
+ struct proc *p = td->td_proc;
+ void *ctl = NULL;
+ void *buf = NULL;
+ char *path = NULL;
+ int error;
+
+ /*
+ * Sanity and permissions checks. We must be root.
+ */
+ KKASSERT(p);
+ if (p->p_ucred->cr_prison != NULL)
+ return (EPERM);
+ if ((error = suser(td)) != 0)
+ return (error);
+
+ /*
+ * Argument length checks
+ */
+ if (uap->ctllen < 0 || uap->ctllen > MAXPATHLEN)
+ return (EINVAL);
+ if (uap->buflen < 0 || uap->buflen > MAXPATHLEN)
+ return (EINVAL);
+ if (uap->path == NULL)
+ return (EINVAL);
+
+ /*
+ * Allocate the necessary buffers and copyin data
+ */
+ path = zalloc(namei_zone);
+ error = copyinstr(uap->path, path, MAXPATHLEN, NULL);
+ if (error)
+ goto done;
+
+ if (uap->ctllen) {
+ ctl = malloc(uap->ctllen + 1, M_TEMP, M_WAITOK|M_ZERO);
+ error = copyin(uap->ctl, ctl, uap->ctllen);
+ if (error)
+ goto done;
+ }
+ if (uap->buflen)
+ buf = malloc(uap->buflen + 1, M_TEMP, M_WAITOK|M_ZERO);
+
+ /*
+ * Execute the internal kernel function and clean up.
+ */
+ error = kern_mountctl(path, uap->op, ctl, uap->ctllen, buf, uap->buflen, &uap->sysmsg_result);
+ if (error == 0 && uap->sysmsg_result > 0)
+ error = copyout(buf, uap->buf, uap->sysmsg_result);
+done:
+ if (path)
+ zfree(namei_zone, path);
+ if (ctl)
+ free(ctl, M_TEMP);
+ if (buf)
+ free(buf, M_TEMP);
+ return (error);
+}
+
+/*
+ * Execute a mount control operation by resolving the path to a mount point
+ * and calling vop_mountctl().
+ */
+int
+kern_mountctl(const char *path, int op, const void *ctl, int ctllen,
+ void *buf, int buflen, int *res)
+{
+ struct thread *td = curthread;
+ struct vnode *vp;
+ struct mount *mp;
+ struct nlookupdata nd;
+ int error;
+
+ *res = 0;
+ vp = NULL;
+ error = nlookup_init(&nd, path, UIO_SYSSPACE, NLC_FOLLOW);
+ if (error == 0)
+ error = nlookup(&nd);
+ if (error == 0)
+ error = cache_vget(nd.nl_ncp, nd.nl_cred, LK_EXCLUSIVE, &vp);
+ nlookup_done(&nd);
+ if (error)
+ return (error);
+
+ mp = vp->v_mount;
+
+ /*
+ * Must be the root of the filesystem
+ */
+ if ((vp->v_flag & VROOT) == 0) {
+ vput(vp);
+ return (EINVAL);
+ }
+ error = vop_mountctl(mp->mnt_vn_use_ops, op, ctl, ctllen,
+ buf, buflen, res);
+ vput(vp);
+ return (error);
+}
+
int
kern_statfs(struct nlookupdata *nd, struct statfs *buf)
{
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.11 2004/12/17 00:18:07 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_vopops.c,v 1.12 2004/12/24 05:00:17 dillon Exp $
*/
#include <sys/param.h>
VNODEOP_DESC_INIT_VP(createvobject);
VNODEOP_DESC_INIT_VP(destroyvobject);
VNODEOP_DESC_INIT_VP(getvobject);
-VNODEOP_DESC_INIT_SIMPLE(vfsset);
+VNODEOP_DESC_INIT_SIMPLE(mountctl);
VNODEOP_DESC_INIT_NCP_CRED(nresolve);
VNODEOP_DESC_INIT_DVP_VPP_CRED(nlookupdotdot);
}
int
-vop_vfsset(struct vop_ops *ops, int op, const char *opstr)
+vop_mountctl(struct vop_ops *ops, int op, const void *ctl, int ctllen, void *buf, int buflen, int *res)
{
- struct vop_vfsset_args ap;
+ struct vop_mountctl_args ap;
int error;
- ap.a_head.a_desc = &vop_vfsset_desc;
+ ap.a_head.a_desc = &vop_mountctl_desc;
ap.a_head.a_ops = ops;
ap.a_op = op;
- ap.a_opstr = opstr;
+ ap.a_ctl = ctl;
+ ap.a_ctllen = ctllen;
+ ap.a_buf = buf;
+ ap.a_buflen = buflen;
+ ap.a_res = res;
- DO_OPS(ops, error, &ap, vop_vfsset);
+ DO_OPS(ops, error, &ap, vop_mountctl);
return(error);
}
}
int
-vop_vfsset_ap(struct vop_vfsset_args *ap)
+vop_mountctl_ap(struct vop_mountctl_args *ap)
{
int error;
- DO_OPS(ap->a_head.a_ops, error, ap, vop_vfsset);
+ DO_OPS(ap->a_head.a_ops, error, ap, vop_mountctl);
return(error);
}
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/sys/kern_syscall.h,v 1.21 2004/11/18 13:09:53 dillon Exp $
+ * $DragonFly: src/sys/sys/kern_syscall.h,v 1.22 2004/12/24 05:00:22 dillon Exp $
*/
#ifndef _SYS_KERN_SYSCALL_H_
int kern_getdirentries(int fd, char *buf, u_int count, long *basep, int *res);
int kern_link(struct nlookupdata *nd, struct nlookupdata *linknd);
int kern_lseek(int fd, off_t offset, int whence, off_t *res);
+int kern_mountctl(const char *path, int op, const void *ctl, int ctllen,
+ void *buf, int buflen, int *res);
int kern_mkdir(struct nlookupdata *nd, int mode);
int kern_mkfifo(struct nlookupdata *nd, int mode);
int kern_mknod(struct nlookupdata *nd, int mode, int dev);
--- /dev/null
+/*
+ * Copyright (c) 2004 The DragonFly Project. All rights reserved.
+ *
+ * This code is derived from software contributed to The DragonFly Project
+ * by Matthew Dillon <dillon@backplane.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of The DragonFly Project nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific, prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $DragonFly: src/sys/sys/mountctl.h,v 1.1 2004/12/24 05:00:22 dillon Exp $
+ */
+
+/*
+ * Data structures for the journaling API
+ */
+
+#define MOUNTCTL_INSTALL_VFS_JOURNAL 1
+#define MOUNTCTL_REMOVE_VFS_JOURNAL 2
+#define MOUNTCTL_RESYNC_VFS_JOURNAL 3
+#define MOUNTCTL_JOURNAL_VFS_STATUS 4
+
+#define MOUNTCTL_INSTALL_BLK_JOURNAL 8
+#define MOUNTCTL_REMOVE_BLK_JOURNAL 9
+#define MOUNTCTL_RESYNC_BLK_JOURNAL 10
+#define MOUNTCTL_JOURNAL_BLK_STATUS 11
+
+struct mountctl_install_journal {
+ int id; /* journal identifier */
+ int flags; /* journaling flags */
+ int fd; /* streaming descriptor (-1 to close) */
+ int unused01;
+ int64_t membufsize; /* backing store */
+ int64_t swapbufsize; /* backing store */
+ int64_t transid; /* starting with specified transaction id */
+ int64_t unused02;
+ int stallwarn; /* stall warning (seconds) */
+ int stallerror; /* stall error (seconds) */
+ int unused03;
+ int unused04;
+};
+
+#define MC_JOURNAL_REVERSABLE 0x00000001 /* reversable log */
+#define MC_JOURNAL_BINARY 0x00000002 /* use binary format */
+#define MC_JOURNAL_UNUSED04 0x00000004
+#define MC_JOURNAL_STREAM_TWO_WAY 0x00000008 /* trans id ack */
+#define MC_JOURNAL_FD_PROVIDED 0x00000100 /* stream desc */
+#define MC_JOURNAL_MBSIZE_PROVIDED 0x00000200 /* data space */
+#define MC_JOURNAL_SWSIZE_PROVIDED 0x00000400 /* data space */
+#define MC_JOURNAL_TRANSID_PROVIDED 0x00000800 /* restart transid */
+#define MC_JOURNAL_STALLWARN_PROVIDED 0x00001000 /* restart transid */
+#define MC_JOURNAL_STALLERROR_PROVIDED 0x00002000 /* restart transid */
+
+struct mountctl_remove_journal {
+ int id;
+ int flags;
+};
+
+#define MC_JOURNAL_REMOVE_TRASH 0x00000001 /* data -> trash */
+#define MC_JOURNAL_REMOVE_ASSYNC 0x00000002 /* asynchronous op */
+
+struct mountctl_journal_status {
+ int id;
+ int flags;
+ int fd;
+ int64_t membufsize;
+ int64_t membufused;
+ int64_t membufqueued;
+ int64_t swapbufsize;
+ int64_t swapbufused;
+ int64_t swapbufqueued;
+ int64_t transidstart;
+ int64_t transidcurrent;
+ int64_t transidqueued;
+ int64_t transidacked;
+ int64_t bytessent;
+ int64_t bytesacked;
+ struct timeval lastack;
+};
+
+#define MC_JOURNAL_STATUS_NEXT 0x80000000 /* find next id */
+
+
# System call argument table.
# DO NOT EDIT-- this file is automatically generated.
-# $DragonFly: src/sys/sys/Attic/syscall-args,v 1.2 2004/11/23 06:32:34 dillon Exp $
+# $DragonFly: src/sys/sys/Attic/syscall-args,v 1.3 2004/12/24 05:00:22 dillon Exp $
-# Created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+# Created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
int syscall nosys nosys_args
void exit sys_exit sys_exit_args int rval
int exec_sys_register exec_sys_register exec_sys_register_args void * entry
int exec_sys_unregister exec_sys_unregister exec_sys_unregister_args int id
int sys_checkpoint sys_checkpoint sys_checkpoint_args int type int fd pid_t pid int retval
+int mountctl mountctl mountctl_args char * path int op const void * ctl int ctllen void * buf int buflen
* System call hiders.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/sys/syscall-hide.h,v 1.19 2004/11/23 06:32:34 dillon Exp $
- * created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+ * $DragonFly: src/sys/sys/syscall-hide.h,v 1.20 2004/12/24 05:00:22 dillon Exp $
+ * created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
*/
HIDE_POSIX(fork)
HIDE_BSD(exec_sys_register)
HIDE_BSD(exec_sys_unregister)
HIDE_BSD(sys_checkpoint)
+HIDE_BSD(mountctl)
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/sys/syscall.h,v 1.19 2004/11/23 06:32:34 dillon Exp $
- * created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+ * $DragonFly: src/sys/sys/syscall.h,v 1.20 2004/12/24 05:00:22 dillon Exp $
+ * created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
*/
#define SYS_syscall 0
#define SYS_exec_sys_register 465
#define SYS_exec_sys_unregister 466
#define SYS_sys_checkpoint 467
-#define SYS_MAXSYSCALL 468
+#define SYS_mountctl 468
+#define SYS_MAXSYSCALL 469
# DragonFly system call names.
# DO NOT EDIT-- this file is automatically generated.
-# $DragonFly: src/sys/sys/syscall.mk,v 1.19 2004/11/23 06:32:34 dillon Exp $
-# created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+# $DragonFly: src/sys/sys/syscall.mk,v 1.20 2004/12/24 05:00:22 dillon Exp $
+# created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
MIASM = \
syscall.o \
exit.o \
caps_sys_setgen.o \
exec_sys_register.o \
exec_sys_unregister.o \
- sys_checkpoint.o
+ sys_checkpoint.o \
+ mountctl.o
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/sys/sysproto.h,v 1.19 2004/11/23 06:32:34 dillon Exp $
- * created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+ * $DragonFly: src/sys/sys/sysproto.h,v 1.20 2004/12/24 05:00:22 dillon Exp $
+ * created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
*/
#ifndef _SYS_SYSPROTO_H_
pid_t pid; char pid_[PAD_(pid_t)];
int retval; char retval_[PAD_(int)];
};
+struct mountctl_args {
+#ifdef _KERNEL
+ struct sysmsg sysmsg;
+#endif
+ union usrmsg usrmsg;
+ char * path; char path_[PAD_(char *)];
+ int op; char op_[PAD_(int)];
+ const void * ctl; char ctl_[PAD_(const void *)];
+ int ctllen; char ctllen_[PAD_(int)];
+ void * buf; char buf_[PAD_(void *)];
+ int buflen; char buflen_[PAD_(int)];
+};
#ifdef _KERNEL
int exec_sys_register (struct exec_sys_register_args *);
int exec_sys_unregister (struct exec_sys_unregister_args *);
int sys_checkpoint (struct sys_checkpoint_args *);
+int mountctl (struct mountctl_args *);
#endif /* _KERNEL */
* Union of syscall args for messaging.
*
* DO NOT EDIT-- this file is automatically generated.
- * $DragonFly: src/sys/sys/sysunion.h,v 1.16 2004/11/23 06:32:34 dillon Exp $
- * created from DragonFly: src/sys/kern/syscalls.master,v 1.12 2004/03/06 22:14:09 dillon Exp
+ * $DragonFly: src/sys/sys/sysunion.h,v 1.17 2004/12/24 05:00:22 dillon Exp $
+ * created from DragonFly: src/sys/kern/syscalls.master,v 1.13 2004/11/23 06:32:32 dillon Exp
*/
union sysunion {
struct exec_sys_register_args exec_sys_register;
struct exec_sys_unregister_args exec_sys_unregister;
struct sys_checkpoint_args sys_checkpoint;
+ struct mountctl_args mountctl;
};
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/sys/sys/vfsops.h,v 1.10 2004/12/17 00:18:09 dillon Exp $
+ * $DragonFly: src/sys/sys/vfsops.h,v 1.11 2004/12/24 05:00:22 dillon Exp $
*/
/*
struct vm_object **a_objpp;
};
-struct vop_vfsset_args {
+struct vop_mountctl_args {
struct vop_generic_args a_head;
int a_op;
- const char *a_opstr;
+ const void *a_ctl;
+ int a_ctllen;
+ void *a_buf;
+ int a_buflen;
+ int *a_res;
};
/*
int (*vop_createvobject)(struct vop_createvobject_args *);
int (*vop_destroyvobject)(struct vop_destroyvobject_args *);
int (*vop_getvobject)(struct vop_getvobject_args *);
- int (*vop_vfsset)(struct vop_vfsset_args *);
+ int (*vop_mountctl)(struct vop_mountctl_args *);
int (*vop_nresolve)(struct vop_nresolve_args *);
int (*vop_nlookupdotdot)(struct vop_nlookupdotdot_args *);
#define VVF_SUIDDIR 0x0080 /* FUTURE */
/*
- * vop_vfsset() operations
+ * vop_mountctl() operations
*/
#define VFSSET_DETACH 0
#define VFSSET_ATTACH 1
struct vop_createvobject_args vu_createvobject;
struct vop_destroyvobject_args vu_destroyvobject;
struct vop_getvobject_args vu_getvobject;
- struct vop_vfsset_args vu_vfsset;
+ struct vop_mountctl_args vu_mountctl;
struct vop_nresolve_args vu_nresolve;
struct vop_nlookupdotdot_args vu_nlookupdotdot;
int vop_destroyvobject(struct vop_ops *ops, struct vnode *vp);
int vop_getvobject(struct vop_ops *ops,
struct vnode *vp, struct vm_object **objpp);
-int vop_vfsset(struct vop_ops *ops, int op, const char *opstr);
+int vop_mountctl(struct vop_ops *ops, int op, const void *ctl, int ctllen, void *buf, int buflen, int *res);
int vop_nresolve(struct vop_ops *ops, struct namecache *ncp,
struct ucred *cred);
int vop_createvobject_ap(struct vop_createvobject_args *ap);
int vop_destroyvobject_ap(struct vop_destroyvobject_args *ap);
int vop_getvobject_ap(struct vop_getvobject_args *ap);
-int vop_vfsset_ap(struct vop_vfsset_args *ap);
+int vop_mountctl_ap(struct vop_mountctl_args *ap);
int vop_nresolve_ap(struct vop_nresolve_args *ap);
int vop_nlookupdotdot_ap(struct vop_nlookupdotdot_args *ap);
extern struct vnodeop_desc vop_createvobject_desc;
extern struct vnodeop_desc vop_destroyvobject_desc;
extern struct vnodeop_desc vop_getvobject_desc;
-extern struct vnodeop_desc vop_vfsset_desc;
+extern struct vnodeop_desc vop_mountctl_desc;
extern struct vnodeop_desc vop_nresolve_desc;
extern struct vnodeop_desc vop_nlookupdotdot_desc;
*
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
* $FreeBSD: src/sys/sys/vnode.h,v 1.111.2.19 2002/12/29 18:19:53 dillon Exp $
- * $DragonFly: src/sys/sys/vnode.h,v 1.28 2004/12/17 00:18:09 dillon Exp $
+ * $DragonFly: src/sys/sys/vnode.h,v 1.29 2004/12/24 05:00:22 dillon Exp $
*/
#ifndef _SYS_VNODE_H_
int vop_stdbwrite (struct vop_bwrite_args *ap);
int vop_stdislocked (struct vop_islocked_args *ap);
int vop_stdlock (struct vop_lock_args *ap);
+int vop_stdmountctl (struct vop_mountctl_args *ap);
int vop_stdrlock (struct vop_lock_args *ap);
int vop_stdunlock (struct vop_unlock_args *ap);
int vop_nopoll (struct vop_poll_args *ap);