Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src The fsync hypercall is now used only with close, so get rid ...
details: https://anonhg.NetBSD.org/src/rev/80b0d385d2a5
branches: trunk
changeset: 786482:80b0d385d2a5
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Apr 29 15:40:38 2013 +0000
description:
The fsync hypercall is now used only with close, so get rid of it.
rumpuser_bio() should do the necessary syncing.
diffstat:
lib/librumpuser/rumpuser.c | 17 ++++++++---------
sys/rump/include/rump/rumpuser.h | 6 ++----
sys/rump/librump/rumpvfs/rumpblk.c | 5 ++---
3 files changed, 12 insertions(+), 16 deletions(-)
diffs (93 lines):
diff -r 52801486ec9c -r 80b0d385d2a5 lib/librumpuser/rumpuser.c
--- a/lib/librumpuser/rumpuser.c Mon Apr 29 15:20:05 2013 +0000
+++ b/lib/librumpuser/rumpuser.c Mon Apr 29 15:40:38 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser.c,v 1.41 2013/04/29 14:51:39 pooka Exp $ */
+/* $NetBSD: rumpuser.c,v 1.42 2013/04/29 15:40:38 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.41 2013/04/29 14:51:39 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.42 2013/04/29 15:40:38 pooka Exp $");
#endif /* !lint */
#include <sys/ioctl.h>
@@ -309,15 +309,14 @@
int
rumpuser_close(int fd, int *error)
{
-
- DOCALL(int, close(fd));
-}
+ int nlocks;
-int
-rumpuser_fsync(int fd, int *error)
-{
+ rumpkern_unsched(&nlocks, NULL);
+ fsync(fd);
+ close(fd);
+ rumpkern_sched(nlocks, NULL);
- DOCALL_KLOCK(int, fsync(fd));
+ return 0;
}
ssize_t
diff -r 52801486ec9c -r 80b0d385d2a5 sys/rump/include/rump/rumpuser.h
--- a/sys/rump/include/rump/rumpuser.h Mon Apr 29 15:20:05 2013 +0000
+++ b/sys/rump/include/rump/rumpuser.h Mon Apr 29 15:40:38 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser.h,v 1.93 2013/04/29 14:51:40 pooka Exp $ */
+/* $NetBSD: rumpuser.h,v 1.94 2013/04/29 15:40:38 pooka Exp $ */
/*
* Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved.
@@ -85,6 +85,7 @@
#define RUMPUSER_OPEN_EXCL 0x0008 /* exclusive open */
#define RUMPUSER_OPEN_BIO 0x0010 /* open device for block i/o */
int rumpuser_open(const char *, int, int *);
+int rumpuser_close(int, int *);
#define RUMPUSER_FT_OTHER 0
#define RUMPUSER_FT_DIR 1
@@ -93,9 +94,6 @@
#define RUMPUSER_FT_CHR 4
int rumpuser_getfileinfo(const char *, uint64_t *, int *, int *);
-int rumpuser_close(int, int *);
-int rumpuser_fsync(int, int *);
-
#define RUMPUSER_BIO_READ 0x01
#define RUMPUSER_BIO_WRITE 0x02
#define RUMPUSER_BIO_SYNC 0x04
diff -r 52801486ec9c -r 80b0d385d2a5 sys/rump/librump/rumpvfs/rumpblk.c
--- a/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 29 15:20:05 2013 +0000
+++ b/sys/rump/librump/rumpvfs/rumpblk.c Mon Apr 29 15:40:38 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpblk.c,v 1.50 2013/04/29 13:07:37 pooka Exp $ */
+/* $NetBSD: rumpblk.c,v 1.51 2013/04/29 15:40:39 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.50 2013/04/29 13:07:37 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.51 2013/04/29 15:40:39 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -347,7 +347,6 @@
{
int dummy;
- rumpuser_fsync(rblk->rblk_fd, &dummy);
rumpuser_close(rblk->rblk_fd, &dummy);
rblk->rblk_fd = -1;
Home |
Main Index |
Thread Index |
Old Index