From owner-p4-projects@FreeBSD.ORG Mon Jan 24 21:38:44 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2EFAB16A4D0; Mon, 24 Jan 2005 21:38:44 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4F8216A4CE for ; Mon, 24 Jan 2005 21:38:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68D1043D31 for ; Mon, 24 Jan 2005 21:38:43 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0OLch4C082525 for ; Mon, 24 Jan 2005 21:38:43 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0OLchjN082522 for perforce@freebsd.org; Mon, 24 Jan 2005 21:38:43 GMT (envelope-from sam@freebsd.org) Date: Mon, 24 Jan 2005 21:38:43 GMT Message-Id: <200501242138.j0OLchjN082522@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 69640 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2005 21:38:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=69640 Change 69640 by sam@sam_ebb on 2005/01/24 21:38:09 IFC @ 69639 Affected files ... .. //depot/projects/wifi/lib/libarchive/libarchive-formats.5#3 integrate .. //depot/projects/wifi/lib/libarchive/tar.5#2 integrate .. //depot/projects/wifi/lib/libautofs/libautofs.3#2 integrate .. //depot/projects/wifi/sbin/mount_autofs/mount_autofs.8#2 integrate .. //depot/projects/wifi/share/man/man5/autofs.5#2 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#74 integrate .. //depot/projects/wifi/sys/dev/ath/if_athvar.h#30 integrate .. //depot/projects/wifi/sys/kern/vfs_default.c#11 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#49 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_output.c#37 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#25 integrate .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#16 integrate .. //depot/projects/wifi/sys/sys/vnode.h#14 integrate .. //depot/projects/wifi/sys/vm/vnode_pager.c#11 integrate .. //depot/projects/wifi/sys/vm/vnode_pager.h#3 integrate .. //depot/projects/wifi/usr.bin/lsvfs/lsvfs.1#2 integrate Differences ... ==== //depot/projects/wifi/lib/libarchive/libarchive-formats.5#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/libarchive-formats.5,v 1.3 2004/12/22 17:31:28 wollman Exp $ +.\" $FreeBSD: src/lib/libarchive/libarchive-formats.5,v 1.4 2005/01/24 19:58:05 charnier Exp $ .\" .Dd April 27, 2004 .Dt libarchive-formats 3 @@ -36,7 +36,7 @@ library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series of .Dq entries . -Each entry stores a single filesystem object, such as a file, directory, +Each entry stores a single file system object, such as a file, directory, or symbolic link. .Pp The following provides a brief description of each format supported @@ -196,7 +196,7 @@ A .Dq shell archive is a shell script that, when executed on a POSIX-compliant -system, will recreate a collection of filesystem objects. +system, will recreate a collection of file system objects. The libarchive library can write two different kinds of shar archives: .Bl -tag -width indent .It Cm shar ==== //depot/projects/wifi/lib/libarchive/tar.5#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/tar.5,v 1.9 2004/08/07 17:24:50 kientzle Exp $ +.\" $FreeBSD: src/lib/libarchive/tar.5,v 1.10 2005/01/24 19:58:05 charnier Exp $ .\" .Dd May 20, 2004 .Dt TAR 5 @@ -34,7 +34,7 @@ The .Nm archive format collects any number of files, directories, and other -filesystem objects (symbolic links, device nodes, etc.) into a single +file system objects (symbolic links, device nodes, etc.) into a single stream of bytes. The format was originally designed to be used with tape drives that operate with fixed-size blocks, but is widely used as @@ -43,7 +43,7 @@ A .Nm archive consists of a series of 512-byte records. -Each filesystem object requires a header record which stores basic metadata +Each file system object requires a header record which stores basic metadata (pathname, owner, permissions, etc.) and zero or more records containing any file data. The end of the archive is indicated by two records consisting ==== //depot/projects/wifi/lib/libautofs/libautofs.3#2 (text+ko) ==== @@ -23,13 +23,13 @@ .\" SUCH DAMAGE. .\" .\" $Id: libautofs.3,v 1.4 2004/09/08 08:12:21 bright Exp $ -.\" $FreeBSD: src/lib/libautofs/libautofs.3,v 1.5 2004/09/09 10:54:08 alfred Exp $ +.\" $FreeBSD: src/lib/libautofs/libautofs.3,v 1.6 2005/01/24 20:01:28 charnier Exp $ .Dd September 9, 2004 .Dt LIBAUTOFS 3 .Os .Sh NAME .Nm libautofs -.Nd "procedural interface to managing an autofs filesystem" +.Nd "procedural interface to managing an autofs file system" .Sh SYNOPSIS .In libautofs.h .Ft int @@ -81,7 +81,7 @@ .Nm libautofs libarary provides a "mostly" stable interface to the .Xr autofs 9 -filesystem. +file system. .Pp The inteface to .Xr autofs 9 @@ -97,7 +97,7 @@ .Fn autoh_get function returns a handle to an .Xr autofs 9 -filesystem based on the +file system based on the .Fa path parameter. The handle returned should be freed via the @@ -108,7 +108,7 @@ .Fn autoh_getall function returns an array of handles to all mounted .Xr autofs 9 -filesystems, each of which should be released via the +file systems, each of which should be released via the .Fn autoh_free function or released en-mass via the .Fn autoh_freeall @@ -136,7 +136,7 @@ .Pp The .Fn autoh_mp -function returns the path to the autofs filesystem that the +function returns the path to the autofs file system that the .Fa hndl is derived from. .Pp @@ -253,5 +253,5 @@ utility first appeared in .Fx 6.0 . .Sh AUTHORS -This manual page and the autofs filesystem suite were written by +This manual page and the autofs file system suite were written by .An Alfred Perlstein . ==== //depot/projects/wifi/sbin/mount_autofs/mount_autofs.8#2 (text+ko) ==== @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $Id: mount_autofs.8,v 1.3 2004/09/08 08:12:21 bright Exp $ -.\" $FreeBSD: src/sbin/mount_autofs/mount_autofs.8,v 1.2 2004/09/08 08:44:14 alfred Exp $ +.\" $FreeBSD: src/sbin/mount_autofs/mount_autofs.8,v 1.3 2005/01/24 20:03:04 charnier Exp $ .Dd August 30, 2004 .Dt MOUNT_AUTOFS 8 .Os @@ -67,5 +67,5 @@ utility first appeared in .Fx 6.0 . .Sh AUTHORS -This manual page and the autofs filesystem suite were written by +This manual page and the autofs file system suite were written by .An Alfred Perlstein . ==== //depot/projects/wifi/share/man/man5/autofs.5#2 (text+ko) ==== @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $Id: autofs.5,v 1.1 2004/08/31 16:05:39 bright Exp $ -.\" $FreeBSD: src/share/man/man5/autofs.5,v 1.1 2004/08/31 16:26:00 alfred Exp $ +.\" $FreeBSD: src/share/man/man5/autofs.5,v 1.2 2005/01/24 20:04:41 charnier Exp $ .Dd August 30, 2004 .Dt AUTOFS 5 .Os @@ -37,7 +37,7 @@ .Sh DESCRIPTION The auto file system, or .Nm , -provides a method to dynamically graft mountpoints into the filesystem +provides a method to dynamically graft mountpoints into the file system namespace. .Sh SEE ALSO .Xr mount_autofs 8 ==== //depot/projects/wifi/sys/dev/ath/if_ath.c#74 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.75 2005/01/24 20:05:03 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.76 2005/01/24 20:31:24 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. ==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#30 (text+ko) ==== @@ -33,7 +33,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.19 2005/01/18 19:42:17 sam Exp $ + * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.20 2005/01/24 20:31:24 sam Exp $ */ /* ==== //depot/projects/wifi/sys/kern/vfs_default.c#11 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_default.c,v 1.115 2005/01/24 13:13:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_default.c,v 1.116 2005/01/24 21:21:58 phk Exp $"); #include #include @@ -370,57 +370,8 @@ struct thread *td; } */ *ap; { - struct vnode *vp = ap->a_vp; - struct ucred *cred = ap->a_cred; - struct thread *td = ap->a_td; - struct vattr vat; - vm_object_t object; - int error = 0; - vm_ooffset_t size; - if (!vn_isdisk(vp, NULL) && vn_canvmio(vp) == FALSE) - return (0); - - while ((object = vp->v_object) != NULL) { - VM_OBJECT_LOCK(object); - if (!(object->flags & OBJ_DEAD)) { - VM_OBJECT_UNLOCK(object); - break; - } - VOP_UNLOCK(vp, 0, td); - vm_object_set_flag(object, OBJ_DISCONNECTWNT); - msleep(object, VM_OBJECT_MTX(object), PDROP | PVM, "vodead", 0); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); - } - - if (object == NULL) { - if (vn_isdisk(vp, NULL)) { - /* - * This simply allocates the biggest object possible - * for a disk vnode. This should be fixed, but doesn't - * cause any problems (yet). - */ - size = IDX_TO_OFF(INT_MAX); - } else { - if ((error = VOP_GETATTR(vp, &vat, cred, td)) != 0) - return (error); - size = vat.va_size; - } - - object = vnode_pager_alloc(vp, size, 0, 0); - /* - * Dereference the reference we just created. This assumes - * that the object is associated with the vp. - */ - VM_OBJECT_LOCK(object); - object->ref_count--; - VM_OBJECT_UNLOCK(object); - vrele(vp); - } - - KASSERT(vp->v_object != NULL, ("vop_stdcreatevobject: NULL object")); - - return (error); + return (vnode_create_vobject(ap->a_vp, 0, ap->a_td)); } /* Destroy the VM system object associated with this vnode */ ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#49 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.41 2005/01/24 19:32:09 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.42 2005/01/24 20:50:20 sam Exp $"); #include #include ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#37 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.16 2005/01/22 20:33:37 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.18 2005/01/24 20:50:20 sam Exp $"); #include "opt_inet.h" ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#25 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.14 2005/01/24 19:32:09 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.15 2005/01/24 20:39:29 sam Exp $"); /* * IEEE 802.11 protocol support. ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#16 (text+ko) ==== @@ -29,7 +29,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/net80211/ieee80211_proto.h,v 1.8 2004/12/31 22:42:38 sam Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_proto.h,v 1.9 2005/01/24 20:38:26 sam Exp $ */ #ifndef _NET80211_IEEE80211_PROTO_H_ #define _NET80211_IEEE80211_PROTO_H_ ==== //depot/projects/wifi/sys/sys/vnode.h#14 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)vnode.h 8.7 (Berkeley) 2/4/94 - * $FreeBSD: src/sys/sys/vnode.h,v 1.271 2005/01/24 13:58:08 phk Exp $ + * $FreeBSD: src/sys/sys/vnode.h,v 1.272 2005/01/24 21:21:58 phk Exp $ */ #ifndef _SYS_VNODE_H_ @@ -688,6 +688,7 @@ void vbusy(struct vnode *vp); void v_addpollinfo(struct vnode *vp); +int vnode_create_vobject(struct vnode *vp, size_t size, struct thread *td); extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; ==== //depot/projects/wifi/sys/vm/vnode_pager.c#11 (text+ko) ==== @@ -51,7 +51,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vnode_pager.c,v 1.210 2005/01/24 13:13:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vnode_pager.c,v 1.211 2005/01/24 21:21:59 phk Exp $"); #include #include @@ -61,6 +61,7 @@ #include #include #include +#include #include #include @@ -81,6 +82,7 @@ static int vnode_pager_getpages(vm_object_t, vm_page_t *, int, int); static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *); static boolean_t vnode_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); +static vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t); struct pagerops vnodepagerops = { .pgo_init = vnode_pager_init, @@ -100,6 +102,54 @@ vnode_pbuf_freecnt = nswbuf / 2 + 1; } +/* Create the VM system backing object for this vnode */ +int +vnode_create_vobject(struct vnode *vp, size_t isize, struct thread *td) +{ + vm_object_t object; + vm_ooffset_t size = isize; + struct vattr va; + + if (!vn_isdisk(vp, NULL) && vn_canvmio(vp) == FALSE) + return (0); + + while ((object = vp->v_object) != NULL) { + VM_OBJECT_LOCK(object); + if (!(object->flags & OBJ_DEAD)) { + VM_OBJECT_UNLOCK(object); + return (0); + } + VOP_UNLOCK(vp, 0, td); + vm_object_set_flag(object, OBJ_DISCONNECTWNT); + msleep(object, VM_OBJECT_MTX(object), PDROP | PVM, "vodead", 0); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + } + + if (size == 0) { + if (vn_isdisk(vp, NULL)) { + size = IDX_TO_OFF(INT_MAX); + } else { + if (VOP_GETATTR(vp, &va, td->td_ucred, td) != 0) + return (0); + size = va.va_size; + } + } + + object = vnode_pager_alloc(vp, size, 0, 0); + /* + * Dereference the reference we just created. This assumes + * that the object is associated with the vp. + */ + VM_OBJECT_LOCK(object); + object->ref_count--; + VM_OBJECT_UNLOCK(object); + vrele(vp); + + KASSERT(vp->v_object != NULL, ("vnode_create_vobject: NULL object")); + + return (0); +} + /* * Allocate (or lookup) pager for a vnode. * Handle is a vnode pointer. ==== //depot/projects/wifi/sys/vm/vnode_pager.h#3 (text+ko) ==== @@ -32,14 +32,13 @@ * SUCH DAMAGE. * * @(#)vnode_pager.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/vm/vnode_pager.h,v 1.19 2005/01/07 02:29:27 imp Exp $ + * $FreeBSD: src/sys/vm/vnode_pager.h,v 1.20 2005/01/24 21:21:59 phk Exp $ */ #ifndef _VNODE_PAGER_ #define _VNODE_PAGER_ 1 #ifdef _KERNEL -vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t); struct vnode *vnode_pager_lock(vm_object_t); /* ==== //depot/projects/wifi/usr.bin/lsvfs/lsvfs.1#2 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/usr.bin/lsvfs/lsvfs.1,v 1.12 2004/07/02 22:22:27 ru Exp $ +.\" $FreeBSD: src/usr.bin/lsvfs/lsvfs.1,v 1.13 2005/01/24 20:06:16 charnier Exp $ .\" Garrett A. Wollman, September 1994 .\" This file is in the public domain. .\" @@ -7,7 +7,7 @@ .Os .Sh NAME .Nm lsvfs -.Nd list installed virtual filesystems +.Nd list installed virtual file systems .Sh SYNOPSIS .Nm .Op Ar vfsname Ar ...