svn commit: r241924 - in user/andre/tcp_workqueue/sys: cam/ctl cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs compat/linprocfs compat/linux comp...
Andre Oppermann
andre at FreeBSD.org
Tue Oct 23 09:59:47 UTC 2012
Author: andre
Date: Tue Oct 23 09:59:46 2012
New Revision: 241924
URL: http://svn.freebsd.org/changeset/base/241924
Log:
Integrate from HEAD @241923.
Modified:
user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c
user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c
user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h
user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c
user/andre/tcp_workqueue/sys/compat/linux/linux_file.c
user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c
user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c
user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c
user/andre/tcp_workqueue/sys/conf/NOTES
user/andre/tcp_workqueue/sys/conf/options
user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c
user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c
user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c
user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c
user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c
user/andre/tcp_workqueue/sys/dev/md/md.c
user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c
user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c
user/andre/tcp_workqueue/sys/dev/xen/blkback/blkback.c
user/andre/tcp_workqueue/sys/fs/nfs/nfs_commonport.c
user/andre/tcp_workqueue/sys/fs/nfsserver/nfs_nfsdport.c
user/andre/tcp_workqueue/sys/fs/procfs/procfs_map.c
user/andre/tcp_workqueue/sys/fs/unionfs/union_subr.c
user/andre/tcp_workqueue/sys/geom/geom_vfs.c
user/andre/tcp_workqueue/sys/geom/journal/g_journal.c
user/andre/tcp_workqueue/sys/i386/ibcs2/ibcs2_misc.c
user/andre/tcp_workqueue/sys/kern/imgact_elf.c
user/andre/tcp_workqueue/sys/kern/kern_acct.c
user/andre/tcp_workqueue/sys/kern/kern_alq.c
user/andre/tcp_workqueue/sys/kern/kern_ctf.c
user/andre/tcp_workqueue/sys/kern/kern_descrip.c
user/andre/tcp_workqueue/sys/kern/kern_exec.c
user/andre/tcp_workqueue/sys/kern/kern_exit.c
user/andre/tcp_workqueue/sys/kern/kern_gzio.c
user/andre/tcp_workqueue/sys/kern/kern_jail.c
user/andre/tcp_workqueue/sys/kern/kern_ktrace.c
user/andre/tcp_workqueue/sys/kern/kern_linker.c
user/andre/tcp_workqueue/sys/kern/kern_proc.c
user/andre/tcp_workqueue/sys/kern/kern_sig.c
user/andre/tcp_workqueue/sys/kern/link_elf.c
user/andre/tcp_workqueue/sys/kern/link_elf_obj.c
user/andre/tcp_workqueue/sys/kern/sys_process.c
user/andre/tcp_workqueue/sys/kern/uipc_syscalls.c
user/andre/tcp_workqueue/sys/kern/uipc_usrreq.c
user/andre/tcp_workqueue/sys/kern/vfs_acl.c
user/andre/tcp_workqueue/sys/kern/vfs_aio.c
user/andre/tcp_workqueue/sys/kern/vfs_bio.c
user/andre/tcp_workqueue/sys/kern/vfs_cache.c
user/andre/tcp_workqueue/sys/kern/vfs_default.c
user/andre/tcp_workqueue/sys/kern/vfs_extattr.c
user/andre/tcp_workqueue/sys/kern/vfs_init.c
user/andre/tcp_workqueue/sys/kern/vfs_lookup.c
user/andre/tcp_workqueue/sys/kern/vfs_mount.c
user/andre/tcp_workqueue/sys/kern/vfs_mountroot.c
user/andre/tcp_workqueue/sys/kern/vfs_subr.c
user/andre/tcp_workqueue/sys/kern/vfs_syscalls.c
user/andre/tcp_workqueue/sys/kern/vfs_vnops.c
user/andre/tcp_workqueue/sys/mips/conf/RT305X
user/andre/tcp_workqueue/sys/net/if_gre.c
user/andre/tcp_workqueue/sys/net/if_stf.c
user/andre/tcp_workqueue/sys/netgraph/ng_ipfw.c
user/andre/tcp_workqueue/sys/netinet/igmp.c
user/andre/tcp_workqueue/sys/netinet/in.h
user/andre/tcp_workqueue/sys/netinet/in_gif.c
user/andre/tcp_workqueue/sys/netinet/ip_carp.c
user/andre/tcp_workqueue/sys/netinet/ip_divert.c
user/andre/tcp_workqueue/sys/netinet/ip_gre.c
user/andre/tcp_workqueue/sys/netinet/ip_icmp.c
user/andre/tcp_workqueue/sys/netinet/ip_input.c
user/andre/tcp_workqueue/sys/netinet/ip_ipsec.c
user/andre/tcp_workqueue/sys/netinet/ip_mroute.c
user/andre/tcp_workqueue/sys/netinet/ip_options.c
user/andre/tcp_workqueue/sys/netinet/ip_output.c
user/andre/tcp_workqueue/sys/netinet/raw_ip.c
user/andre/tcp_workqueue/sys/netinet/sctp_input.c
user/andre/tcp_workqueue/sys/netinet/sctp_output.c
user/andre/tcp_workqueue/sys/netinet/sctp_uio.h
user/andre/tcp_workqueue/sys/netinet/sctp_usrreq.c
user/andre/tcp_workqueue/sys/netinet/sctp_var.h
user/andre/tcp_workqueue/sys/netinet/sctputil.c
user/andre/tcp_workqueue/sys/netinet/siftr.c
user/andre/tcp_workqueue/sys/netinet/tcp_debug.c
user/andre/tcp_workqueue/sys/netinet/tcp_input.c
user/andre/tcp_workqueue/sys/netinet/tcp_output.c
user/andre/tcp_workqueue/sys/netinet/tcp_subr.c
user/andre/tcp_workqueue/sys/netinet/tcp_syncache.c
user/andre/tcp_workqueue/sys/netinet/tcp_timewait.c
user/andre/tcp_workqueue/sys/netinet/udp_usrreq.c
user/andre/tcp_workqueue/sys/netinet6/icmp6.c
user/andre/tcp_workqueue/sys/netinet6/in6.c
user/andre/tcp_workqueue/sys/netinet6/in6.h
user/andre/tcp_workqueue/sys/netinet6/in6_gif.h
user/andre/tcp_workqueue/sys/netinet6/in6_ifattach.h
user/andre/tcp_workqueue/sys/netinet6/in6_pcb.h
user/andre/tcp_workqueue/sys/netinet6/in6_src.c
user/andre/tcp_workqueue/sys/netinet6/in6_var.h
user/andre/tcp_workqueue/sys/netinet6/ip6_ipsec.c
user/andre/tcp_workqueue/sys/netinet6/ip6_output.c
user/andre/tcp_workqueue/sys/netinet6/ip6_var.h
user/andre/tcp_workqueue/sys/netinet6/ip6protosw.h
user/andre/tcp_workqueue/sys/netinet6/nd6.c
user/andre/tcp_workqueue/sys/netinet6/nd6.h
user/andre/tcp_workqueue/sys/netinet6/nd6_rtr.c
user/andre/tcp_workqueue/sys/netinet6/pim6_var.h
user/andre/tcp_workqueue/sys/netinet6/scope6_var.h
user/andre/tcp_workqueue/sys/netinet6/sctp6_var.h
user/andre/tcp_workqueue/sys/netinet6/tcp6_var.h
user/andre/tcp_workqueue/sys/netipsec/ipsec.c
user/andre/tcp_workqueue/sys/netipsec/ipsec_input.c
user/andre/tcp_workqueue/sys/netipsec/ipsec_output.c
user/andre/tcp_workqueue/sys/netipsec/xform_ah.c
user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_dn_io.c
user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw2.c
user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_dynamic.c
user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_nat.c
user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_pfil.c
user/andre/tcp_workqueue/sys/netpfil/pf/if_pfsync.c
user/andre/tcp_workqueue/sys/netpfil/pf/pf.c
user/andre/tcp_workqueue/sys/nfsserver/nfs.h
user/andre/tcp_workqueue/sys/nfsserver/nfs_serv.c
user/andre/tcp_workqueue/sys/nfsserver/nfs_srvsubs.c
user/andre/tcp_workqueue/sys/nlm/nlm_prot_impl.c
user/andre/tcp_workqueue/sys/powerpc/conf/WII
user/andre/tcp_workqueue/sys/security/audit/audit_arg.c
user/andre/tcp_workqueue/sys/security/audit/audit_syscalls.c
user/andre/tcp_workqueue/sys/security/audit/audit_worker.c
user/andre/tcp_workqueue/sys/security/mac/mac_process.c
user/andre/tcp_workqueue/sys/security/mac/mac_syscalls.c
user/andre/tcp_workqueue/sys/sys/buf.h
user/andre/tcp_workqueue/sys/sys/bufobj.h
user/andre/tcp_workqueue/sys/sys/mount.h
user/andre/tcp_workqueue/sys/sys/namei.h
user/andre/tcp_workqueue/sys/sys/param.h
user/andre/tcp_workqueue/sys/ufs/ffs/ffs_alloc.c
user/andre/tcp_workqueue/sys/ufs/ffs/ffs_softdep.c
user/andre/tcp_workqueue/sys/ufs/ufs/ufs_quota.c
user/andre/tcp_workqueue/sys/vm/vm_fault.c
user/andre/tcp_workqueue/sys/vm/vm_mmap.c
user/andre/tcp_workqueue/sys/vm/vm_object.c
user/andre/tcp_workqueue/sys/vm/vm_pageout.c
user/andre/tcp_workqueue/sys/vm/vnode_pager.c
Directory Properties:
user/andre/tcp_workqueue/sys/ (props changed)
user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/ (props changed)
user/andre/tcp_workqueue/sys/conf/ (props changed)
Modified: user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cam/ctl/ctl_backend_block.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -594,14 +594,12 @@ ctl_be_block_flush_file(struct ctl_be_bl
{
union ctl_io *io;
struct mount *mountpoint;
- int vfs_is_locked, error, lock_flags;
+ int error, lock_flags;
DPRINTF("entered\n");
io = beio->io;
- vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
-
(void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT);
if (MNT_SHARED_WRITES(mountpoint)
@@ -621,8 +619,6 @@ ctl_be_block_flush_file(struct ctl_be_bl
vn_finished_write(mountpoint);
- VFS_UNLOCK_GIANT(vfs_is_locked);
-
if (error == 0)
ctl_set_success(&io->scsiio);
else {
@@ -648,7 +644,7 @@ ctl_be_block_dispatch_file(struct ctl_be
union ctl_io *io;
struct uio xuio;
struct iovec *xiovec;
- int vfs_is_locked, flags;
+ int flags;
int error, i;
DPRINTF("entered\n");
@@ -681,7 +677,6 @@ ctl_be_block_dispatch_file(struct ctl_be
xiovec->iov_len = beio->sg_segs[i].len;
}
- vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
if (beio->bio_cmd == BIO_READ) {
vn_lock(be_lun->vn, LK_SHARED | LK_RETRY);
@@ -754,7 +749,6 @@ ctl_be_block_dispatch_file(struct ctl_be
vn_finished_write(mountpoint);
}
- VFS_UNLOCK_GIANT(vfs_is_locked);
/*
* If we got an error, set the sense data to "MEDIUM ERROR" and
@@ -1478,7 +1472,6 @@ ctl_be_block_close(struct ctl_be_block_l
DROP_GIANT();
if (be_lun->vn) {
int flags = FREAD | FWRITE;
- int vfs_is_locked = 0;
switch (be_lun->dev_type) {
case CTL_BE_BLOCK_DEV:
@@ -1490,7 +1483,6 @@ ctl_be_block_close(struct ctl_be_block_l
}
break;
case CTL_BE_BLOCK_FILE:
- vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
break;
case CTL_BE_BLOCK_NONE:
default:
@@ -1505,7 +1497,6 @@ ctl_be_block_close(struct ctl_be_block_l
case CTL_BE_BLOCK_DEV:
break;
case CTL_BE_BLOCK_FILE:
- VFS_UNLOCK_GIANT(vfs_is_locked);
if (be_lun->backend.file.cred != NULL) {
crfree(be_lun->backend.file.cred);
be_lun->backend.file.cred = NULL;
@@ -1529,7 +1520,6 @@ ctl_be_block_open(struct ctl_be_block_so
struct nameidata nd;
int flags;
int error;
- int vfs_is_locked;
/*
* XXX KDM allow a read-only option?
@@ -1587,8 +1577,6 @@ ctl_be_block_open(struct ctl_be_block_so
return (error);
}
- vfs_is_locked = NDHASGIANT(&nd);
-
NDFREE(&nd, NDF_ONLY_PNBUF);
be_lun->vn = nd.ni_vp;
@@ -1604,7 +1592,6 @@ ctl_be_block_open(struct ctl_be_block_so
"%s is not a disk or file", be_lun->dev_path);
}
VOP_UNLOCK(be_lun->vn, 0);
- VFS_UNLOCK_GIANT(vfs_is_locked);
if (error != 0) {
ctl_be_block_close(be_lun);
@@ -2090,7 +2077,7 @@ ctl_be_block_modify(struct ctl_be_block_
{
struct ctl_lun_modify_params *params;
struct ctl_be_block_lun *be_lun;
- int vfs_is_locked, error;
+ int error;
params = &req->reqdata.modify;
@@ -2120,7 +2107,6 @@ ctl_be_block_modify(struct ctl_be_block_
}
}
- vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount);
vn_lock(be_lun->vn, LK_SHARED | LK_RETRY);
if (be_lun->vn->v_type == VREG)
@@ -2129,7 +2115,6 @@ ctl_be_block_modify(struct ctl_be_block_
error = ctl_be_block_modify_dev(be_lun, req);
VOP_UNLOCK(be_lun->vn, 0);
- VFS_UNLOCK_GIANT(vfs_is_locked);
if (error != 0)
goto bailout_error;
Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c
==============================================================================
--- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -69,7 +69,7 @@ kobj_open_file_vnode(const char *file)
struct thread *td = curthread;
struct filedesc *fd;
struct nameidata nd;
- int error, flags, vfslocked;
+ int error, flags;
fd = td->td_proc->p_fd;
FILEDESC_XLOCK(fd);
@@ -84,15 +84,13 @@ kobj_open_file_vnode(const char *file)
FILEDESC_XUNLOCK(fd);
flags = FREAD | O_NOFOLLOW;
- NDINIT(&nd, LOOKUP, MPSAFE, UIO_SYSSPACE, file, td);
+ NDINIT(&nd, LOOKUP, 0, UIO_SYSSPACE, file, td);
error = vn_open_cred(&nd, &flags, 0, 0, curthread->td_ucred, NULL);
if (error != 0)
return (NULL);
- vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
/* We just unlock so we hold a reference. */
VOP_UNLOCK(nd.ni_vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
return (nd.ni_vp);
}
@@ -130,15 +128,13 @@ kobj_get_filesize_vnode(struct _buf *fil
{
struct vnode *vp = file->ptr;
struct vattr va;
- int error, vfslocked;
+ int error;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_GETATTR(vp, &va, curthread->td_ucred);
VOP_UNLOCK(vp, 0);
if (error == 0)
*size = (uint64_t)va.va_size;
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -171,7 +167,7 @@ kobj_read_file_vnode(struct _buf *file,
struct thread *td = curthread;
struct uio auio;
struct iovec aiov;
- int error, vfslocked;
+ int error;
bzero(&aiov, sizeof(aiov));
bzero(&auio, sizeof(auio));
@@ -187,11 +183,9 @@ kobj_read_file_vnode(struct _buf *file,
auio.uio_resid = size;
auio.uio_td = td;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred);
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
return (error != 0 ? -1 : size - auio.uio_resid);
}
@@ -221,14 +215,7 @@ void
kobj_close_file(struct _buf *file)
{
- if (file->mounted) {
- struct vnode *vp = file->ptr;
- struct thread *td = curthread;
- int vfslocked;
-
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
- vn_close(vp, FREAD, td->td_ucred, td);
- VFS_UNLOCK_GIANT(vfslocked);
- }
+ if (file->mounted)
+ vn_close(file->ptr, FREAD, curthread->td_ucred, curthread);
kmem_free(file, sizeof(*file));
}
Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c
==============================================================================
--- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -54,7 +54,7 @@ lookupnameat(char *dirname, enum uio_seg
vref(startvp);
ltype = VOP_ISLOCKED(startvp);
VOP_UNLOCK(startvp, 0);
- NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | MPSAFE | follow, seg, dirname,
+ NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | follow, seg, dirname,
startvp, curthread);
error = namei(&nd);
*compvpp = nd.ni_vp;
Modified: user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h
==============================================================================
--- user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cddl/compat/opensolaris/sys/vnode.h Tue Oct 23 09:59:46 2012 (r241924)
@@ -193,7 +193,7 @@ vn_openat(char *pnamep, enum uio_seg seg
if (startvp != NULL)
vref(startvp);
- NDINIT_ATVP(&nd, operation, MPSAFE, UIO_SYSSPACE, pnamep, startvp, td);
+ NDINIT_ATVP(&nd, operation, 0, UIO_SYSSPACE, pnamep, startvp, td);
filemode |= O_NOFOLLOW;
error = vn_open_cred(&nd, &filemode, createmode, 0, td->td_ucred, NULL);
NDFREE(&nd, NDF_ONLY_PNBUF);
@@ -223,13 +223,12 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp,
ssize_t *residp)
{
struct thread *td = curthread;
- int error, vfslocked;
+ int error;
ssize_t resid;
ASSERT(ioflag == 0);
ASSERT(ulimit == RLIM64_INFINITY);
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (rw == UIO_WRITE) {
ioflag = IO_SYNC;
} else {
@@ -237,7 +236,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp,
}
error = vn_rdwr(rw, vp, base, len, offset, seg, ioflag, cr, NOCRED,
&resid, td);
- VFS_UNLOCK_GIANT(vfslocked);
if (residp != NULL)
*residp = (ssize_t)resid;
return (error);
@@ -249,11 +247,10 @@ static __inline int
zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr)
{
struct mount *mp;
- int error, vfslocked;
+ int error;
ASSERT(flag == FSYNC);
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
goto drop;
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
@@ -261,7 +258,6 @@ zfs_vop_fsync(vnode_t *vp, int flag, cre
VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
drop:
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
#define VOP_FSYNC(vp, flag, cr, ct) zfs_vop_fsync((vp), (flag), (cr))
@@ -269,14 +265,12 @@ drop:
static __inline int
zfs_vop_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr)
{
- int error, vfslocked;
+ int error;
ASSERT(count == 1);
ASSERT(offset == 0);
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
error = vn_close(vp, flag, cr, curthread);
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
#define VOP_CLOSE(vp, oflags, count, offset, cr, ct) \
Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
==============================================================================
--- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -54,7 +54,7 @@ vdev_file_open(vdev_t *vd, uint64_t *psi
vdev_file_t *vf;
vnode_t *vp;
vattr_t vattr;
- int error, vfslocked;
+ int error;
/*
* We must have a pathname, and it must be absolute.
@@ -114,11 +114,9 @@ skip_open:
* Determine the physical size of the file.
*/
vattr.va_mask = AT_SIZE;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
error = VOP_GETATTR(vp, &vattr, kcred);
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
if (error) {
(void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL);
vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -1092,14 +1092,12 @@ zfs_get_done(zgd_t *zgd, int error)
{
znode_t *zp = zgd->zgd_private;
objset_t *os = zp->z_zfsvfs->z_os;
- int vfslocked;
if (zgd->zgd_db)
dmu_buf_rele(zgd->zgd_db, zgd);
zfs_range_unlock(zgd->zgd_rl);
- vfslocked = VFS_LOCK_GIANT(zp->z_zfsvfs->z_vfs);
/*
* Release the vnode asynchronously as we currently have the
* txg stopped from syncing.
@@ -1110,7 +1108,6 @@ zfs_get_done(zgd_t *zgd, int error)
zil_add_block(zgd->zgd_zilog, zgd->zgd_bp);
kmem_free(zgd, sizeof (zgd_t));
- VFS_UNLOCK_GIANT(vfslocked);
}
#ifdef DEBUG
@@ -6337,7 +6334,7 @@ vop_getextattr {
}
flags = FREAD;
- NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname,
+ NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname,
xvp, td);
error = vn_open_cred(&nd, &flags, 0, 0, ap->a_cred, NULL);
vp = nd.ni_vp;
@@ -6405,7 +6402,7 @@ vop_deleteextattr {
return (error);
}
- NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF | MPSAFE,
+ NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF,
UIO_SYSSPACE, attrname, xvp, td);
error = namei(&nd);
vp = nd.ni_vp;
@@ -6472,7 +6469,7 @@ vop_setextattr {
}
flags = FFLAGS(O_WRONLY | O_CREAT);
- NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname,
+ NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname,
xvp, td);
error = vn_open_cred(&nd, &flags, 0600, 0, ap->a_cred, NULL);
vp = nd.ni_vp;
@@ -6553,7 +6550,7 @@ vop_listextattr {
return (error);
}
- NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | MPSAFE,
+ NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED,
UIO_SYSSPACE, ".", xvp, td);
error = namei(&nd);
vp = nd.ni_vp;
Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -1404,7 +1404,6 @@ zfs_zinactive(znode_t *zp)
vnode_t *vp = ZTOV(zp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
uint64_t z_id = zp->z_id;
- int vfslocked;
ASSERT(zp->z_sa_hdl);
@@ -1437,9 +1436,7 @@ zfs_zinactive(znode_t *zp)
ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id);
ASSERT(vp->v_count == 0);
vrecycle(vp);
- vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs);
zfs_rmnode(zp);
- VFS_UNLOCK_GIANT(vfslocked);
return;
}
Modified: user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/compat/linprocfs/linprocfs.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -335,7 +335,7 @@ linprocfs_domtab(PFS_FILL_ARGS)
int error;
/* resolve symlinks etc. in the emulation tree prefix */
- NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td);
flep = NULL;
error = namei(&nd);
lep = linux_emul_path;
@@ -343,7 +343,6 @@ linprocfs_domtab(PFS_FILL_ARGS)
if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0)
lep = dlep;
vrele(nd.ni_vp);
- VFS_UNLOCK_GIANT(NDHASGIANT(&nd));
}
lep_len = strlen(lep);
@@ -414,7 +413,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS)
int major, minor;
/* resolve symlinks etc. in the emulation tree prefix */
- NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td);
flep = NULL;
error = namei(&nd);
lep = linux_emul_path;
@@ -422,7 +421,6 @@ linprocfs_dopartitions(PFS_FILL_ARGS)
if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0)
lep = dlep;
vrele(nd.ni_vp);
- VFS_UNLOCK_GIANT(NDHASGIANT(&nd));
}
lep_len = strlen(lep);
@@ -1012,7 +1010,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
int error;
struct vnode *vp;
struct vattr vat;
- int locked;
PROC_LOCK(p);
error = p_candebug(td, p);
@@ -1065,12 +1062,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS)
VM_OBJECT_UNLOCK(obj);
if (vp) {
vn_fullpath(td, vp, &name, &freename);
- locked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_SHARED | LK_RETRY);
VOP_GETATTR(vp, &vat, td->td_ucred);
ino = vat.va_fileid;
vput(vp);
- VFS_UNLOCK_GIANT(locked);
}
} else {
flags = 0;
Modified: user/andre/tcp_workqueue/sys/compat/linux/linux_file.c
==============================================================================
--- user/andre/tcp_workqueue/sys/compat/linux/linux_file.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/compat/linux/linux_file.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -337,7 +337,7 @@ getdents_common(struct thread *td, struc
struct l_dirent64 *linux_dirent64;
int buflen, error, eofflag, nbytes, justone;
u_long *cookies = NULL, *cookiep;
- int ncookies, vfslocked;
+ int ncookies;
nbytes = args->count;
if (nbytes == 1) {
@@ -359,9 +359,7 @@ getdents_common(struct thread *td, struc
off = foffset_lock(fp, 0);
vp = fp->f_vnode;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (vp->v_type != VDIR) {
- VFS_UNLOCK_GIANT(vfslocked);
foffset_unlock(fp, off, 0);
fdrop(fp, td);
return (EINVAL);
@@ -521,7 +519,6 @@ out:
free(cookies, M_TEMP);
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
foffset_unlock(fp, off, 0);
fdrop(fp, td);
free(buf, M_TEMP);
Modified: user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c
==============================================================================
--- user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/compat/linux/linux_misc.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -247,7 +247,7 @@ linux_uselib(struct thread *td, struct l
char *library;
ssize_t aresid;
int error;
- int locked, vfslocked;
+ int locked;
LCONVPATHEXIST(td, args->library, &library);
@@ -257,11 +257,10 @@ linux_uselib(struct thread *td, struct l
#endif
a_out = NULL;
- vfslocked = 0;
locked = 0;
vp = NULL;
- NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1,
+ NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1,
UIO_SYSSPACE, library, td);
error = namei(&ni);
LFREEPATH(library);
@@ -269,7 +268,6 @@ linux_uselib(struct thread *td, struct l
goto cleanup;
vp = ni.ni_vp;
- vfslocked = NDHASGIANT(&ni);
NDFREE(&ni, NDF_ONLY_PNBUF);
/*
@@ -393,7 +391,6 @@ linux_uselib(struct thread *td, struct l
*/
locked = 0;
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
/*
* Check if file_offset page aligned. Currently we cannot handle
@@ -463,10 +460,8 @@ linux_uselib(struct thread *td, struct l
cleanup:
/* Unlock vnode if needed */
- if (locked) {
+ if (locked)
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
- }
/* Release the temporary mapping. */
if (a_out)
Modified: user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c
==============================================================================
--- user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/compat/ndis/subr_ndis.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -2741,7 +2741,7 @@ NdisOpenFile(status, filehandle, filelen
char *afilename = NULL;
struct thread *td = curthread;
struct nameidata nd;
- int flags, error, vfslocked;
+ int flags, error;
struct vattr vat;
struct vattr *vap = &vat;
ndis_fh *fh;
@@ -2821,7 +2821,7 @@ NdisOpenFile(status, filehandle, filelen
if (td->td_proc->p_fd->fd_cdir == NULL)
td->td_proc->p_fd->fd_cdir = rootvnode;
- NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, path, td);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td);
flags = FREAD;
error = vn_open(&nd, &flags, 0, NULL);
@@ -2833,7 +2833,6 @@ NdisOpenFile(status, filehandle, filelen
free(afilename, M_DEVBUF);
return;
}
- vfslocked = NDHASGIANT(&nd);
ExFreePool(path);
@@ -2842,7 +2841,6 @@ NdisOpenFile(status, filehandle, filelen
/* Get the file size. */
VOP_GETATTR(nd.ni_vp, vap, td->td_ucred);
VOP_UNLOCK(nd.ni_vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
fh->nf_vp = nd.ni_vp;
fh->nf_map = NULL;
@@ -2862,7 +2860,7 @@ NdisMapFile(status, mappedbuffer, fileha
struct thread *td = curthread;
linker_file_t lf;
caddr_t kldstart;
- int error, vfslocked;
+ int error;
ssize_t resid;
struct vnode *vp;
@@ -2903,10 +2901,8 @@ NdisMapFile(status, mappedbuffer, fileha
}
vp = fh->nf_vp;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
error = vn_rdwr(UIO_READ, vp, fh->nf_map, fh->nf_maplen, 0,
UIO_SYSSPACE, 0, td->td_ucred, NOCRED, &resid, td);
- VFS_UNLOCK_GIANT(vfslocked);
if (error)
*status = NDIS_STATUS_FAILURE;
@@ -2937,7 +2933,6 @@ NdisCloseFile(filehandle)
{
struct thread *td = curthread;
ndis_fh *fh;
- int vfslocked;
struct vnode *vp;
if (filehandle == NULL)
@@ -2955,9 +2950,7 @@ NdisCloseFile(filehandle)
if (fh->nf_type == NDIS_FH_TYPE_VFS) {
vp = fh->nf_vp;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_close(vp, FREAD, td->td_ucred, td);
- VFS_UNLOCK_GIANT(vfslocked);
}
fh->nf_vp = NULL;
Modified: user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c
==============================================================================
--- user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/compat/svr4/svr4_misc.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -241,7 +241,7 @@ svr4_sys_getdents64(td, uap)
struct iovec aiov;
off_t off;
struct svr4_dirent64 svr4_dirent;
- int buflen, error, eofflag, nbytes, justone, vfslocked;
+ int buflen, error, eofflag, nbytes, justone;
u_long *cookies = NULL, *cookiep;
int ncookies;
@@ -258,9 +258,7 @@ svr4_sys_getdents64(td, uap)
}
vp = fp->f_vnode;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (vp->v_type != VDIR) {
- VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
return (EINVAL);
}
@@ -397,7 +395,6 @@ eof:
td->td_retval[0] = nbytes - resid;
out:
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
if (cookies)
free(cookies, M_TEMP);
@@ -422,7 +419,7 @@ svr4_sys_getdents(td, uap)
struct iovec aiov;
struct svr4_dirent idb;
off_t off; /* true file offset */
- int buflen, error, eofflag, vfslocked;
+ int buflen, error, eofflag;
u_long *cookiebuf = NULL, *cookie;
int ncookies = 0, *retval = td->td_retval;
@@ -439,9 +436,7 @@ svr4_sys_getdents(td, uap)
}
vp = fp->f_vnode;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (vp->v_type != VDIR) {
- VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
return (EINVAL);
}
@@ -534,7 +529,6 @@ eof:
*retval = uap->nbytes - resid;
out:
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
fdrop(fp, td);
if (cookiebuf)
free(cookiebuf, M_TEMP);
@@ -614,7 +608,7 @@ svr4_sys_fchroot(td, uap)
struct filedesc *fdp = td->td_proc->p_fd;
struct vnode *vp;
struct file *fp;
- int error, vfslocked;
+ int error;
if ((error = priv_check(td, PRIV_VFS_FCHROOT)) != 0)
return error;
@@ -624,7 +618,6 @@ svr4_sys_fchroot(td, uap)
vp = fp->f_vnode;
VREF(vp);
fdrop(fp, td);
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = change_dir(vp, td);
if (error)
@@ -637,11 +630,9 @@ svr4_sys_fchroot(td, uap)
VOP_UNLOCK(vp, 0);
error = change_root(vp, td);
vrele(vp);
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
fail:
vput(vp);
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -1652,13 +1643,12 @@ svr4_sys_resolvepath(td, uap)
int error, *retval = td->td_retval;
unsigned int ncopy;
- NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME | MPSAFE, UIO_USERSPACE,
+ NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME, UIO_USERSPACE,
uap->path, td);
if ((error = namei(&nd)) != 0)
return (error);
NDFREE(&nd, NDF_NO_FREE_PNBUF);
- VFS_UNLOCK_GIANT(NDHASGIANT(&nd));
ncopy = min(uap->bufsiz, strlen(nd.ni_cnd.cn_pnbuf) + 1);
if ((error = copyout(nd.ni_cnd.cn_pnbuf, uap->buf, ncopy)) != 0)
Modified: user/andre/tcp_workqueue/sys/conf/NOTES
==============================================================================
--- user/andre/tcp_workqueue/sys/conf/NOTES Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/conf/NOTES Tue Oct 23 09:59:46 2012 (r241924)
@@ -1088,9 +1088,6 @@ options REISERFS
# unsuitable for inclusion on machines with untrusted local users.
options VFS_AIO
-# Enable mounting of non-MPSAFE filesystems.
-options VFS_ALLOW_NONMPSAFE
-
# Cryptographically secure random number generator; /dev/random
device random
Modified: user/andre/tcp_workqueue/sys/conf/options
==============================================================================
--- user/andre/tcp_workqueue/sys/conf/options Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/conf/options Tue Oct 23 09:59:46 2012 (r241924)
@@ -188,7 +188,6 @@ SW_WATCHDOG opt_watchdog.h
TURNSTILE_PROFILING
UMTX_PROFILING
VFS_AIO
-VFS_ALLOW_NONMPSAFE
VERBOSE_SYSINIT opt_global.h
WLCACHE opt_wavelan.h
WLDEBUG opt_wavelan.h
Modified: user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/e1000/if_lem.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -390,11 +390,6 @@ lem_attach(device_t dev)
INIT_DEBUGOUT("lem_attach: begin");
- if (resource_disabled("lem", device_get_unit(dev))) {
- device_printf(dev, "Disabled by device hint\n");
- return (ENXIO);
- }
-
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));
Modified: user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/etherswitch/arswitch/arswitch_reg.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -72,10 +72,17 @@ arswitch_split_setpage(device_t dev, uin
*phy = (((addr) >> 6) & 0x07) | 0x10;
*reg = ((addr) >> 1) & 0x1f;
- if (sc->page != page) {
- MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page);
- sc->page = page;
- }
+ /*
+ * The earlier code would only switch the page
+ * over if the page were different. Experiments have
+ * shown that this is unstable.
+ *
+ * Hence, the page is always set here.
+ *
+ * See PR kern/172968
+ */
+ MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page);
+ sc->page = page;
}
/*
Modified: user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/hwpmc/hwpmc_mod.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -1632,7 +1632,6 @@ pmc_log_kernel_mappings(struct pmc *pm)
static void
pmc_log_process_mappings(struct pmc_owner *po, struct proc *p)
{
- int locked;
vm_map_t map;
struct vnode *vp;
struct vmspace *vm;
@@ -1742,9 +1741,7 @@ pmc_log_process_mappings(struct pmc_owne
pmc_getfilename(vp, &fullpath, &freepath);
last_vp = vp;
- locked = VFS_LOCK_GIANT(vp->v_mount);
vrele(vp);
- VFS_UNLOCK_GIANT(locked);
vp = NULL;
pmclog_process_map_in(po, p->p_pid, start_addr, fullpath);
Modified: user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/ixgbe/ixgbe.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -401,11 +401,6 @@ ixgbe_attach(device_t dev)
INIT_DEBUGOUT("ixgbe_attach: begin");
- if (resource_disabled("ixgbe", device_get_unit(dev))) {
- device_printf(dev, "Disabled by device hint\n");
- return (ENXIO);
- }
-
/* Allocate, clear, and link in our adapter structure */
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
Modified: user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/ixgbe/ixv.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -299,11 +299,6 @@ ixv_attach(device_t dev)
INIT_DEBUGOUT("ixv_attach: begin");
- if (resource_disabled("ixgbe", device_get_unit(dev))) {
- device_printf(dev, "Disabled by device hint\n");
- return (ENXIO);
- }
-
/* Allocate, clear, and link in our adapter structure */
adapter = device_get_softc(dev);
adapter->dev = adapter->osdep.dev = dev;
Modified: user/andre/tcp_workqueue/sys/dev/md/md.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/md/md.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/md/md.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -512,7 +512,7 @@ mdstart_preload(struct md_s *sc, struct
static int
mdstart_vnode(struct md_s *sc, struct bio *bp)
{
- int error, vfslocked;
+ int error;
struct uio auio;
struct iovec aiov;
struct mount *mp;
@@ -542,13 +542,11 @@ mdstart_vnode(struct md_s *sc, struct bi
*/
if (bp->bio_cmd == BIO_FLUSH) {
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
(void) vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vp, MNT_WAIT, td);
VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -570,7 +568,6 @@ mdstart_vnode(struct md_s *sc, struct bi
auio.uio_rw = UIO_WRITE;
auio.uio_td = td;
end = bp->bio_offset + bp->bio_length;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
(void) vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = 0;
@@ -588,7 +585,6 @@ mdstart_vnode(struct md_s *sc, struct bi
VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
bp->bio_resid = end - auio.uio_offset;
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
@@ -610,7 +606,6 @@ mdstart_vnode(struct md_s *sc, struct bi
* When reading set IO_DIRECT to try to avoid double-caching
* the data. When writing IO_DIRECT is not optimal.
*/
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
if (bp->bio_cmd == BIO_READ) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_READ(vp, &auio, IO_DIRECT, sc->cred);
@@ -623,7 +618,6 @@ mdstart_vnode(struct md_s *sc, struct bi
VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
}
- VFS_UNLOCK_GIANT(vfslocked);
bp->bio_resid = auio.uio_resid;
return (error);
}
@@ -957,7 +951,7 @@ mdcreate_vnode(struct md_s *sc, struct m
struct vattr vattr;
struct nameidata nd;
char *fname;
- int error, flags, vfslocked;
+ int error, flags;
/*
* Kernel-originated requests must have the filename appended
@@ -976,11 +970,10 @@ mdcreate_vnode(struct md_s *sc, struct m
* set the FWRITE mask before trying to open the backing store.
*/
flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE);
- NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, sc->file, td);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td);
error = vn_open(&nd, &flags, 0, NULL);
if (error != 0)
return (error);
- vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
if (nd.ni_vp->v_type != VREG) {
error = EINVAL;
@@ -1016,19 +1009,16 @@ mdcreate_vnode(struct md_s *sc, struct m
nd.ni_vp->v_vflag &= ~VV_MD;
goto bad;
}
- VFS_UNLOCK_GIANT(vfslocked);
return (0);
bad:
VOP_UNLOCK(nd.ni_vp, 0);
(void)vn_close(nd.ni_vp, flags, td->td_ucred, td);
- VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
static int
mddestroy(struct md_s *sc, struct thread *td)
{
- int vfslocked;
if (sc->gp) {
sc->gp->softc = NULL;
@@ -1050,13 +1040,11 @@ mddestroy(struct md_s *sc, struct thread
mtx_unlock(&sc->queue_mtx);
mtx_destroy(&sc->queue_mtx);
if (sc->vnode != NULL) {
- vfslocked = VFS_LOCK_GIANT(sc->vnode->v_mount);
vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY);
sc->vnode->v_vflag &= ~VV_MD;
VOP_UNLOCK(sc->vnode, 0);
(void)vn_close(sc->vnode, sc->flags & MD_READONLY ?
FREAD : (FREAD|FWRITE), sc->cred, td);
- VFS_UNLOCK_GIANT(vfslocked);
}
if (sc->cred != NULL)
crfree(sc->cred);
Modified: user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/nand/nandsim_swap.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -142,9 +142,9 @@ static int
swap_file_open(struct chip_swap *swap, const char *swap_file)
{
struct nameidata nd;
- int vfslocked, flags, error;
+ int flags, error;
- NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, swap_file,
+ NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, swap_file,
curthread);
flags = FWRITE | FREAD | O_NOFOLLOW | O_CREAT | O_TRUNC;
@@ -157,12 +157,10 @@ swap_file_open(struct chip_swap *swap, c
}
swap->swap_cred = crhold(curthread->td_ucred);
- vfslocked = NDHASGIANT(&nd);
NDFREE(&nd, NDF_ONLY_PNBUF);
/* We just unlock so we hold a reference */
VOP_UNLOCK(nd.ni_vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
swap->swap_vp = nd.ni_vp;
@@ -192,7 +190,6 @@ swap_file_write(struct chip_swap *swap,
struct vnode *vp;
struct uio auio;
struct iovec aiov;
- int vfslocked;
if (swap == NULL || blk_state == NULL)
return (-1);
@@ -222,13 +219,11 @@ swap_file_write(struct chip_swap *swap,
auio.uio_resid = swap->blk_size;
auio.uio_td = td;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_start_write(vp, &mp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_WRITE(vp, &auio, IO_UNIT, swap->swap_cred);
VOP_UNLOCK(vp, 0);
vn_finished_write(mp);
- VFS_UNLOCK_GIANT(vfslocked);
return (0);
}
@@ -241,7 +236,6 @@ swap_file_read(struct chip_swap *swap, s
struct vnode *vp;
struct uio auio;
struct iovec aiov;
- int vfslocked;
if (swap == NULL || blk_state == NULL)
return (-1);
@@ -267,11 +261,9 @@ swap_file_read(struct chip_swap *swap, s
auio.uio_resid = swap->blk_size;
auio.uio_td = td;
- vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
VOP_READ(vp, &auio, 0, swap->swap_cred);
VOP_UNLOCK(vp, 0);
- VFS_UNLOCK_GIANT(vfslocked);
return (0);
}
Modified: user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c
==============================================================================
--- user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c Tue Oct 23 08:33:13 2012 (r241923)
+++ user/andre/tcp_workqueue/sys/dev/sound/pci/emu10kx.c Tue Oct 23 09:59:46 2012 (r241924)
@@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev)
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list