Date: Mon, 24 Jan 2005 21:38:43 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 69640 for review Message-ID: <200501242138.j0OLchjN082522@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> ==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#37 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <sys/cdefs.h> -__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 <sys/param.h> #include <sys/systm.h> @@ -61,6 +61,7 @@ #include <sys/bio.h> #include <sys/buf.h> #include <sys/vmmeter.h> +#include <sys/limits.h> #include <sys/conf.h> #include <sys/sf_buf.h> @@ -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 ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501242138.j0OLchjN082522>