Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Regen for VOP_FALLOCATE/VOP_FDISCARD.
details: https://anonhg.NetBSD.org/src/rev/9ce9baae971f
branches: trunk
changeset: 330905:9ce9baae971f
user: dholland <dholland%NetBSD.org@localhost>
date: Fri Jul 25 08:18:50 2014 +0000
description:
Regen for VOP_FALLOCATE/VOP_FDISCARD.
diffstat:
sys/kern/vnode_if.c | 72 +++++++++++++++++++++++-
sys/rump/include/rump/rumpvnode_if.h | 6 +-
sys/rump/librump/rumpvfs/rumpvnode_if.c | 34 ++++++++++-
sys/sys/vnode_if.h | 98 +++++++++++++++++++-------------
4 files changed, 163 insertions(+), 47 deletions(-)
diffs (truncated from 562 to 300 lines):
diff -r 01a288bcac7d -r 9ce9baae971f sys/kern/vnode_if.c
--- a/sys/kern/vnode_if.c Fri Jul 25 08:16:47 2014 +0000
+++ b/sys/kern/vnode_if.c Fri Jul 25 08:18:50 2014 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: vnode_if.c,v 1.92 2014/02/07 15:29:22 hannken Exp $ */
+/* $NetBSD: vnode_if.c,v 1.93 2014/07/25 08:18:50 dholland Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
* (Modifications made here may easily be lost!)
*
* Created from the file:
- * NetBSD: vnode_if.src,v 1.66 2014/02/07 15:26:42 hannken Exp
+ * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp
* by the script:
* NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp
*/
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.92 2014/02/07 15:29:22 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnode_if.c,v 1.93 2014/07/25 08:18:50 dholland Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -432,6 +432,70 @@
return error;
}
+const int vop_fallocate_vp_offsets[] = {
+ VOPARG_OFFSETOF(struct vop_fallocate_args,a_vp),
+ VDESC_NO_OFFSET
+};
+const struct vnodeop_desc vop_fallocate_desc = {
+ VOP_FALLOCATE_DESCOFFSET,
+ "vop_fallocate",
+ 0,
+ vop_fallocate_vp_offsets,
+ VDESC_NO_OFFSET,
+ VDESC_NO_OFFSET,
+ VDESC_NO_OFFSET,
+};
+int
+VOP_FALLOCATE(struct vnode *vp,
+ off_t pos,
+ off_t len)
+{
+ int error;
+ bool mpsafe;
+ struct vop_fallocate_args a;
+ a.a_desc = VDESC(vop_fallocate);
+ a.a_vp = vp;
+ a.a_pos = pos;
+ a.a_len = len;
+ mpsafe = (vp->v_vflag & VV_MPSAFE);
+ if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
+ error = (VCALL(vp, VOFFSET(vop_fallocate), &a));
+ if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
+ return error;
+}
+
+const int vop_fdiscard_vp_offsets[] = {
+ VOPARG_OFFSETOF(struct vop_fdiscard_args,a_vp),
+ VDESC_NO_OFFSET
+};
+const struct vnodeop_desc vop_fdiscard_desc = {
+ VOP_FDISCARD_DESCOFFSET,
+ "vop_fdiscard",
+ 0,
+ vop_fdiscard_vp_offsets,
+ VDESC_NO_OFFSET,
+ VDESC_NO_OFFSET,
+ VDESC_NO_OFFSET,
+};
+int
+VOP_FDISCARD(struct vnode *vp,
+ off_t pos,
+ off_t len)
+{
+ int error;
+ bool mpsafe;
+ struct vop_fdiscard_args a;
+ a.a_desc = VDESC(vop_fdiscard);
+ a.a_vp = vp;
+ a.a_pos = pos;
+ a.a_len = len;
+ mpsafe = (vp->v_vflag & VV_MPSAFE);
+ if (!mpsafe) { KERNEL_LOCK(1, curlwp); }
+ error = (VCALL(vp, VOFFSET(vop_fdiscard), &a));
+ if (!mpsafe) { KERNEL_UNLOCK_ONE(curlwp); }
+ return error;
+}
+
const int vop_ioctl_vp_offsets[] = {
VOPARG_OFFSETOF(struct vop_ioctl_args,a_vp),
VDESC_NO_OFFSET
@@ -1652,6 +1716,8 @@
&vop_setattr_desc,
&vop_read_desc,
&vop_write_desc,
+ &vop_fallocate_desc,
+ &vop_fdiscard_desc,
&vop_ioctl_desc,
&vop_fcntl_desc,
&vop_poll_desc,
diff -r 01a288bcac7d -r 9ce9baae971f sys/rump/include/rump/rumpvnode_if.h
--- a/sys/rump/include/rump/rumpvnode_if.h Fri Jul 25 08:16:47 2014 +0000
+++ b/sys/rump/include/rump/rumpvnode_if.h Fri Jul 25 08:18:50 2014 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: rumpvnode_if.h,v 1.16 2014/02/07 15:29:22 hannken Exp $ */
+/* $NetBSD: rumpvnode_if.h,v 1.17 2014/07/25 08:18:50 dholland Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
* (Modifications made here may easily be lost!)
*
* Created from the file:
- * NetBSD: vnode_if.src,v 1.66 2014/02/07 15:26:42 hannken Exp
+ * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp
* by the script:
* NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp
*/
@@ -64,6 +64,8 @@
int RUMP_VOP_SETATTR(struct vnode *, struct vattr *, struct kauth_cred *);
int RUMP_VOP_READ(struct vnode *, struct uio *, int, struct kauth_cred *);
int RUMP_VOP_WRITE(struct vnode *, struct uio *, int, struct kauth_cred *);
+int RUMP_VOP_FALLOCATE(struct vnode *, off_t, off_t);
+int RUMP_VOP_FDISCARD(struct vnode *, off_t, off_t);
int RUMP_VOP_IOCTL(struct vnode *, u_long, void *, int, struct kauth_cred *);
int RUMP_VOP_FCNTL(struct vnode *, u_int, void *, int, struct kauth_cred *);
int RUMP_VOP_POLL(struct vnode *, int);
diff -r 01a288bcac7d -r 9ce9baae971f sys/rump/librump/rumpvfs/rumpvnode_if.c
--- a/sys/rump/librump/rumpvfs/rumpvnode_if.c Fri Jul 25 08:16:47 2014 +0000
+++ b/sys/rump/librump/rumpvfs/rumpvnode_if.c Fri Jul 25 08:18:50 2014 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: rumpvnode_if.c,v 1.15 2014/02/07 15:29:23 hannken Exp $ */
+/* $NetBSD: rumpvnode_if.c,v 1.16 2014/07/25 08:18:50 dholland Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
* (Modifications made here may easily be lost!)
*
* Created from the file:
- * NetBSD: vnode_if.src,v 1.66 2014/02/07 15:26:42 hannken Exp
+ * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp
* by the script:
* NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp
*/
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.15 2014/02/07 15:29:23 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpvnode_if.c,v 1.16 2014/07/25 08:18:50 dholland Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -208,6 +208,34 @@
}
int
+RUMP_VOP_FALLOCATE(struct vnode *vp,
+ off_t pos,
+ off_t len)
+{
+ int error;
+
+ rump_schedule();
+ error = VOP_FALLOCATE(vp, pos, len);
+ rump_unschedule();
+
+ return error;
+}
+
+int
+RUMP_VOP_FDISCARD(struct vnode *vp,
+ off_t pos,
+ off_t len)
+{
+ int error;
+
+ rump_schedule();
+ error = VOP_FDISCARD(vp, pos, len);
+ rump_unschedule();
+
+ return error;
+}
+
+int
RUMP_VOP_IOCTL(struct vnode *vp,
u_long command,
void *data,
diff -r 01a288bcac7d -r 9ce9baae971f sys/sys/vnode_if.h
--- a/sys/sys/vnode_if.h Fri Jul 25 08:16:47 2014 +0000
+++ b/sys/sys/vnode_if.h Fri Jul 25 08:18:50 2014 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: vnode_if.h,v 1.87 2014/02/07 15:29:23 hannken Exp $ */
+/* $NetBSD: vnode_if.h,v 1.88 2014/07/25 08:18:50 dholland Exp $ */
/*
* Warning: DO NOT EDIT! This file is automatically generated!
* (Modifications made here may easily be lost!)
*
* Created from the file:
- * NetBSD: vnode_if.src,v 1.66 2014/02/07 15:26:42 hannken Exp
+ * NetBSD: vnode_if.src,v 1.67 2014/07/25 08:16:47 dholland Exp
* by the script:
* NetBSD: vnode_if.sh,v 1.60 2014/01/13 12:07:55 hannken Exp
*/
@@ -165,7 +165,27 @@
extern const struct vnodeop_desc vop_write_desc;
int VOP_WRITE(struct vnode *, struct uio *, int, kauth_cred_t);
-#define VOP_IOCTL_DESCOFFSET 12
+#define VOP_FALLOCATE_DESCOFFSET 12
+struct vop_fallocate_args {
+ const struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ off_t a_pos;
+ off_t a_len;
+};
+extern const struct vnodeop_desc vop_fallocate_desc;
+int VOP_FALLOCATE(struct vnode *, off_t, off_t);
+
+#define VOP_FDISCARD_DESCOFFSET 13
+struct vop_fdiscard_args {
+ const struct vnodeop_desc *a_desc;
+ struct vnode *a_vp;
+ off_t a_pos;
+ off_t a_len;
+};
+extern const struct vnodeop_desc vop_fdiscard_desc;
+int VOP_FDISCARD(struct vnode *, off_t, off_t);
+
+#define VOP_IOCTL_DESCOFFSET 14
struct vop_ioctl_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -177,7 +197,7 @@
extern const struct vnodeop_desc vop_ioctl_desc;
int VOP_IOCTL(struct vnode *, u_long, void *, int, kauth_cred_t);
-#define VOP_FCNTL_DESCOFFSET 13
+#define VOP_FCNTL_DESCOFFSET 15
struct vop_fcntl_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -189,7 +209,7 @@
extern const struct vnodeop_desc vop_fcntl_desc;
int VOP_FCNTL(struct vnode *, u_int, void *, int, kauth_cred_t);
-#define VOP_POLL_DESCOFFSET 14
+#define VOP_POLL_DESCOFFSET 16
struct vop_poll_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -198,7 +218,7 @@
extern const struct vnodeop_desc vop_poll_desc;
int VOP_POLL(struct vnode *, int);
-#define VOP_KQFILTER_DESCOFFSET 15
+#define VOP_KQFILTER_DESCOFFSET 17
struct vop_kqfilter_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -207,7 +227,7 @@
extern const struct vnodeop_desc vop_kqfilter_desc;
int VOP_KQFILTER(struct vnode *, struct knote *);
-#define VOP_REVOKE_DESCOFFSET 16
+#define VOP_REVOKE_DESCOFFSET 18
struct vop_revoke_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -216,7 +236,7 @@
extern const struct vnodeop_desc vop_revoke_desc;
int VOP_REVOKE(struct vnode *, int);
-#define VOP_MMAP_DESCOFFSET 17
+#define VOP_MMAP_DESCOFFSET 19
struct vop_mmap_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -226,7 +246,7 @@
extern const struct vnodeop_desc vop_mmap_desc;
int VOP_MMAP(struct vnode *, vm_prot_t, kauth_cred_t);
-#define VOP_FSYNC_DESCOFFSET 18
+#define VOP_FSYNC_DESCOFFSET 20
struct vop_fsync_args {
const struct vnodeop_desc *a_desc;
struct vnode *a_vp;
@@ -238,7 +258,7 @@
extern const struct vnodeop_desc vop_fsync_desc;
int VOP_FSYNC(struct vnode *, kauth_cred_t, int, off_t, off_t);
-#define VOP_SEEK_DESCOFFSET 19
+#define VOP_SEEK_DESCOFFSET 21
struct vop_seek_args {
Home |
Main Index |
Thread Index |
Old Index