Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-uio_vmspace]: src/sys/ufs convert the rest of ufs.
details: https://anonhg.NetBSD.org/src/rev/4b6f4524cf17
branches: yamt-uio_vmspace
changeset: 586700:4b6f4524cf17
user: yamt <yamt%NetBSD.org@localhost>
date: Sun Jan 15 10:24:52 2006 +0000
description:
convert the rest of ufs.
diffstat:
sys/ufs/ext2fs/ext2fs_lookup.c | 9 ++++-----
sys/ufs/ext2fs/ext2fs_readwrite.c | 8 ++++----
sys/ufs/ufs/ufs_extattr.c | 22 ++++++++--------------
3 files changed, 16 insertions(+), 23 deletions(-)
diffs (163 lines):
diff -r 82434992d22d -r 4b6f4524cf17 sys/ufs/ext2fs/ext2fs_lookup.c
--- a/sys/ufs/ext2fs/ext2fs_lookup.c Sun Jan 15 10:02:36 2006 +0000
+++ b/sys/ufs/ext2fs/ext2fs_lookup.c Sun Jan 15 10:24:52 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_lookup.c,v 1.39 2005/12/11 12:25:25 christos Exp $ */
+/* $NetBSD: ext2fs_lookup.c,v 1.39.2.1 2006/01/15 10:24:52 yamt Exp $ */
/*
* Modified for NetBSD 1.2E
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_lookup.c,v 1.39 2005/12/11 12:25:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_lookup.c,v 1.39.2.1 2006/01/15 10:24:52 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -162,9 +162,9 @@
auio = *uio;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
- auio.uio_segflg = UIO_SYSSPACE;
aiov.iov_len = e2fs_count;
auio.uio_resid = e2fs_count;
+ UIO_SETUP_SYSSPACE(&auio);
MALLOC(dirbuf, caddr_t, e2fs_count, M_TEMP, M_WAITOK);
if (ap->a_ncookies) {
nc = ncookies = e2fs_count / 16;
@@ -818,8 +818,7 @@
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_rw = UIO_WRITE;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_lwp = NULL;
+ UIO_SETUP_SYSSPACE(&auio);
error = VOP_WRITE(dvp, &auio, IO_SYNC, cnp->cn_cred);
if (dirblksiz > dvp->v_mount->mnt_stat.f_bsize)
/* XXX should grow with balloc() */
diff -r 82434992d22d -r 4b6f4524cf17 sys/ufs/ext2fs/ext2fs_readwrite.c
--- a/sys/ufs/ext2fs/ext2fs_readwrite.c Sun Jan 15 10:02:36 2006 +0000
+++ b/sys/ufs/ext2fs/ext2fs_readwrite.c Sun Jan 15 10:24:52 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_readwrite.c,v 1.40.2.1 2006/01/15 10:03:04 yamt Exp $ */
+/* $NetBSD: ext2fs_readwrite.c,v 1.40.2.2 2006/01/15 10:24:52 yamt Exp $ */
/*-
* Copyright (c) 1993
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.40.2.1 2006/01/15 10:03:04 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.40.2.2 2006/01/15 10:24:52 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -281,7 +281,7 @@
* Maybe this should be above the vnode op call, but so long as
* file servers have no limits, I don't think it matters.
*/
- p = uio->uio_lwp ? uio->uio_lwp->l_proc : NULL;
+ p = curproc;
if (vp->v_type == VREG && p &&
uio->uio_offset + uio->uio_resid >
p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
@@ -399,7 +399,7 @@
VN_KNOTE(vp, NOTE_WRITE | (extended ? NOTE_EXTEND : 0));
if (error) {
(void) ext2fs_truncate(vp, osize, ioflag & IO_SYNC, ap->a_cred,
- uio->uio_lwp == NULL ? NULL : uio->uio_lwp->l_proc);
+ curlwp);
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
} else if (resid > uio->uio_resid && (ioflag & IO_SYNC) == IO_SYNC)
diff -r 82434992d22d -r 4b6f4524cf17 sys/ufs/ufs/ufs_extattr.c
--- a/sys/ufs/ufs/ufs_extattr.c Sun Jan 15 10:02:36 2006 +0000
+++ b/sys/ufs/ufs/ufs_extattr.c Sun Jan 15 10:24:52 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_extattr.c,v 1.6 2005/12/23 23:20:00 rpaulo Exp $ */
+/* $NetBSD: ufs_extattr.c,v 1.6.2.1 2006/01/15 10:24:52 yamt Exp $ */
/*-
* Copyright (c) 1999-2002 Robert N. M. Watson
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: ufs_extattr.c,v 1.6 2005/12/23 23:20:00 rpaulo Exp $");
+__RCSID("$NetBSD: ufs_extattr.c,v 1.6.2.1 2006/01/15 10:24:52 yamt Exp $");
#include "opt_ffs.h"
@@ -377,9 +377,8 @@
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_rw = UIO_READ;
- auio.uio_segflg = UIO_SYSSPACE;
- auio.uio_lwp = l;
auio.uio_offset = 0;
+ UIO_SETUP_SYSSPACE(&auio);
vargs.a_desc = NULL;
vargs.a_vp = dvp;
@@ -633,9 +632,8 @@
aiov.iov_len = sizeof(struct ufs_extattr_fileheader);
auio.uio_resid = sizeof(struct ufs_extattr_fileheader);
auio.uio_offset = (off_t) 0;
- auio.uio_segflg = UIO_SYSSPACE;
auio.uio_rw = UIO_READ;
- auio.uio_lwp = l;
+ UIO_SETUP_SYSSPACE(&auio);
VOP_LEASE(backing_vnode, l, l->l_proc->p_ucred, LEASE_WRITE);
vn_lock(backing_vnode, LK_SHARED | LK_RETRY);
@@ -891,10 +889,9 @@
local_aio.uio_iov = &local_aiov;
local_aio.uio_iovcnt = 1;
local_aio.uio_rw = UIO_READ;
- local_aio.uio_segflg = UIO_SYSSPACE;
- local_aio.uio_lwp = l;
local_aio.uio_offset = base_offset;
local_aio.uio_resid = sizeof(struct ufs_extattr_header);
+ UIO_SETUP_SYSSPACE(&local_aio);
/*
* Acquire locks.
@@ -1113,10 +1110,9 @@
local_aio.uio_iov = &local_aiov;
local_aio.uio_iovcnt = 1;
local_aio.uio_rw = UIO_WRITE;
- local_aio.uio_segflg = UIO_SYSSPACE;
- local_aio.uio_lwp = l;
local_aio.uio_offset = base_offset;
local_aio.uio_resid = sizeof(struct ufs_extattr_header);
+ UIO_SETUP_SYSSPACE(&local_aio);
/*
* Acquire locks.
@@ -1216,10 +1212,9 @@
local_aio.uio_iov = &local_aiov;
local_aio.uio_iovcnt = 1;
local_aio.uio_rw = UIO_READ;
- local_aio.uio_segflg = UIO_SYSSPACE;
- local_aio.uio_lwp = l;
local_aio.uio_offset = base_offset;
local_aio.uio_resid = sizeof(struct ufs_extattr_header);
+ UIO_SETUP_SYSSPACE(&local_aio);
VOP_LEASE(attribute->uele_backing_vnode, l, cred, LEASE_WRITE);
@@ -1272,10 +1267,9 @@
local_aio.uio_iov = &local_aiov;
local_aio.uio_iovcnt = 1;
local_aio.uio_rw = UIO_WRITE;
- local_aio.uio_segflg = UIO_SYSSPACE;
- local_aio.uio_lwp = l;
local_aio.uio_offset = base_offset;
local_aio.uio_resid = sizeof(struct ufs_extattr_header);
+ UIO_SETUP_SYSSPACE(&local_aio);
ioflag = IO_NODELOCKED;
if (ufs_extattr_sync)
Home |
Main Index |
Thread Index |
Old Index