Module Name: src Committed By: pooka Date: Wed May 15 14:58:24 UTC 2013
Modified Files: src/lib/librumpuser: rumpuser.3 rumpuser.c rumpuser_bio.c src/sys/rump/include/rump: rumpuser.h Log Message: Pass off_t over the hypercall interface as int64_t to avoid potential problems in setups where off_t doesn't want to be 64bit. I'm already excitedly waiting for 128bit off_t and _LARGE_LARGE_FILES To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/librumpuser/rumpuser.3 cvs rdiff -u -r1.51 -r1.52 src/lib/librumpuser/rumpuser.c cvs rdiff -u -r1.6 -r1.7 src/lib/librumpuser/rumpuser_bio.c cvs rdiff -u -r1.105 -r1.106 src/sys/rump/include/rump/rumpuser.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librumpuser/rumpuser.3 diff -u src/lib/librumpuser/rumpuser.3:1.11 src/lib/librumpuser/rumpuser.3:1.12 --- src/lib/librumpuser/rumpuser.3:1.11 Wed May 15 14:52:49 2013 +++ src/lib/librumpuser/rumpuser.3 Wed May 15 14:58:24 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: rumpuser.3,v 1.11 2013/05/15 14:52:49 pooka Exp $ +.\" $NetBSD: rumpuser.3,v 1.12 2013/05/15 14:58:24 pooka Exp $ .\" .\" Copyright (c) 2013 Antti Kantee. All rights reserved. .\" @@ -197,7 +197,7 @@ respectively. .Pp .Ft void .Fo rumpuser_bio -.Fa "int fd" "int op" "void *data" "size_t dlen" "off_t off" +.Fa "int fd" "int op" "void *data" "size_t dlen" "int64_t off" .Fa "rump_biodone_fn biodone" "void *donearg" .Fc .Pp @@ -238,13 +238,13 @@ opaque arg that must be passed to .Ft int .Fo rumpuser_iovread .Fa "int fd" "struct rumpuser_iovec *ruiov" "size_t iovlen" -.Fa "off_t off" "size_t *retv" +.Fa "int64_t off" "size_t *retv" .Fc .Pp .Ft int .Fo rumpuser_iovwrite .Fa "int fd" "struct rumpuser_iovec *ruiov" "size_t iovlen" -.Fa "off_t off" "size_t *retv" +.Fa "int64_t off" "size_t *retv" .Fc .Pp These routines perform scatter-gather I/O which is not Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.51 src/lib/librumpuser/rumpuser.c:1.52 --- src/lib/librumpuser/rumpuser.c:1.51 Wed May 15 14:52:49 2013 +++ src/lib/librumpuser/rumpuser.c Wed May 15 14:58:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.51 2013/05/15 14:52:49 pooka Exp $ */ +/* $NetBSD: rumpuser.c,v 1.52 2013/05/15 14:58:24 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.51 2013/05/15 14:52:49 pooka Exp $"); +__RCSID("$NetBSD: rumpuser.c,v 1.52 2013/05/15 14:58:24 pooka Exp $"); #endif /* !lint */ #include <sys/ioctl.h> @@ -332,9 +332,10 @@ rumpuser_close(int fd) */ int rumpuser_iovread(int fd, struct rumpuser_iovec *ruiov, size_t iovlen, - off_t off, size_t *retp) + int64_t roff, size_t *retp) { struct iovec *iov = (struct iovec *)ruiov; + off_t off = (off_t)roff; ssize_t nn; int rv; @@ -364,9 +365,10 @@ rumpuser_iovread(int fd, struct rumpuser int rumpuser_iovwrite(int fd, const struct rumpuser_iovec *ruiov, size_t iovlen, - off_t off, size_t *retp) + int64_t roff, size_t *retp) { const struct iovec *iov = (const struct iovec *)ruiov; + off_t off = (off_t)roff; ssize_t nn; int rv; Index: src/lib/librumpuser/rumpuser_bio.c diff -u src/lib/librumpuser/rumpuser_bio.c:1.6 src/lib/librumpuser/rumpuser_bio.c:1.7 --- src/lib/librumpuser/rumpuser_bio.c:1.6 Tue May 7 15:18:35 2013 +++ src/lib/librumpuser/rumpuser_bio.c Wed May 15 14:58:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_bio.c,v 1.6 2013/05/07 15:18:35 pooka Exp $ */ +/* $NetBSD: rumpuser_bio.c,v 1.7 2013/05/15 14:58:24 pooka Exp $ */ /*- * Copyright (c) 2013 Antti Kantee. All Rights Reserved. @@ -127,7 +127,7 @@ biothread(void *arg) } void -rumpuser_bio(int fd, int op, void *data, size_t dlen, off_t doff, +rumpuser_bio(int fd, int op, void *data, size_t dlen, int64_t doff, rump_biodone_fn biodone, void *bioarg) { struct rumpuser_bio bio; @@ -163,7 +163,7 @@ rumpuser_bio(int fd, int op, void *data, bio.bio_op = op; bio.bio_data = data; bio.bio_dlen = dlen; - bio.bio_off = doff; + bio.bio_off = (off_t)doff; bio.bio_done = biodone; bio.bio_donearg = bioarg; Index: src/sys/rump/include/rump/rumpuser.h diff -u src/sys/rump/include/rump/rumpuser.h:1.105 src/sys/rump/include/rump/rumpuser.h:1.106 --- src/sys/rump/include/rump/rumpuser.h:1.105 Wed May 15 14:52:49 2013 +++ src/sys/rump/include/rump/rumpuser.h Wed May 15 14:58:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.h,v 1.105 2013/05/15 14:52:49 pooka Exp $ */ +/* $NetBSD: rumpuser.h,v 1.106 2013/05/15 14:58:24 pooka Exp $ */ /* * Copyright (c) 2007-2013 Antti Kantee. All Rights Reserved. @@ -97,7 +97,7 @@ int rumpuser_getfileinfo(const char *, u #define RUMPUSER_BIO_WRITE 0x02 #define RUMPUSER_BIO_SYNC 0x04 typedef void (*rump_biodone_fn)(void *, size_t, int); -void rumpuser_bio(int, int, void *, size_t, off_t, rump_biodone_fn, void *); +void rumpuser_bio(int, int, void *, size_t, int64_t, rump_biodone_fn, void *); /* this one "accidentally" matches the NetBSD kernel ... */ struct rumpuser_iovec { @@ -105,9 +105,9 @@ struct rumpuser_iovec { size_t iov_len; }; #define RUMPUSER_IOV_NOSEEK -1 -int rumpuser_iovread(int, struct rumpuser_iovec *, size_t, off_t, size_t *); +int rumpuser_iovread(int, struct rumpuser_iovec *, size_t, int64_t, size_t *); int rumpuser_iovwrite(int, const struct rumpuser_iovec *, size_t, - off_t, size_t *); + int64_t, size_t *); /* * clock and zzz