CVS commit: src/usr.sbin/puffs/mount_sysctlfs
Module Name:src Committed By: ryo Date: Sun Apr 2 18:23:02 UTC 2023 Modified Files: src/usr.sbin/puffs/mount_sysctlfs: sysctlfs.c Log Message: add missing '\n' To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c diff -u src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.20 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.21 --- src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c:1.20 Wed Nov 23 17:25:11 2016 +++ src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c Sun Apr 2 18:23:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctlfs.c,v 1.20 2016/11/23 17:25:11 christos Exp $ */ +/* $NetBSD: sysctlfs.c,v 1.21 2023/04/02 18:23:02 ryo Exp $ */ /*- * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: sysctlfs.c,v 1.20 2016/11/23 17:25:11 christos Exp $"); +__RCSID("$NetBSD: sysctlfs.c,v 1.21 2023/04/02 18:23:02 ryo Exp $"); #endif /* !lint */ #include @@ -226,7 +226,7 @@ static void __dead usage(void) { - fprintf(stderr, "Usage: %s [-o ] sysctlfs mountpath", + fprintf(stderr, "Usage: %s [-o ] sysctlfs mountpath\n", getprogname()); exit(1); }
CVS commit: src/usr.sbin/puffs/mount_sysctlfs
Module Name:src Committed By: ryo Date: Sun Apr 2 18:23:02 UTC 2023 Modified Files: src/usr.sbin/puffs/mount_sysctlfs: sysctlfs.c Log Message: add missing '\n' To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Wed Mar 2 07:48:20 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: node.c Log Message: mount_9p: check returned type for Tread To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/puffs/mount_9p/node.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Wed Mar 2 07:48:20 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: node.c Log Message: mount_9p: check returned type for Tread To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/puffs/mount_9p/node.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/node.c diff -u src/usr.sbin/puffs/mount_9p/node.c:1.30 src/usr.sbin/puffs/mount_9p/node.c:1.31 --- src/usr.sbin/puffs/mount_9p/node.c:1.30 Wed Mar 2 04:11:41 2022 +++ src/usr.sbin/puffs/mount_9p/node.c Wed Mar 2 07:48:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: node.c,v 1.30 2022/03/02 04:11:41 ozaki-r Exp $ */ +/* $NetBSD: node.c,v 1.31 2022/03/02 07:48:20 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: node.c,v 1.30 2022/03/02 04:11:41 ozaki-r Exp $"); +__RCSID("$NetBSD: node.c,v 1.31 2022/03/02 07:48:20 ozaki-r Exp $"); #endif /* !lint */ #include @@ -187,6 +187,11 @@ puffs9p_node_readdir(struct puffs_usermo p9pbuf_put_4(pb, *reslen); /* XXX */ GETRESPONSE(pb); + if (p9pbuf_get_type(pb) != P9PROTO_R_READ) { + rv = proto_handle_rerror(pu, pb); + goto out; + } + p9pbuf_get_4(pb, ); /*
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Wed Mar 2 04:11:41 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: node.c Log Message: mount_9p: fix writing to a file opened with write-only mode With the page cache, writing data to a file may demand to read contents from a storage to fill a page in the page cache first. Opening a file with write-only mode by a user lets a mount_9p process open a file with write-only mode too at a 9p server. Thus, a read request to the file from the page cache fails. So we need to open a file always with read mode (internally) even if it is opened with write-only mode by a user. Note that the change doesn't mean that mount_9p allows users to read contents from a file that is opened with write-only mode. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/puffs/mount_9p/node.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Wed Mar 2 04:11:41 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: node.c Log Message: mount_9p: fix writing to a file opened with write-only mode With the page cache, writing data to a file may demand to read contents from a storage to fill a page in the page cache first. Opening a file with write-only mode by a user lets a mount_9p process open a file with write-only mode too at a 9p server. Thus, a read request to the file from the page cache fails. So we need to open a file always with read mode (internally) even if it is opened with write-only mode by a user. Note that the change doesn't mean that mount_9p allows users to read contents from a file that is opened with write-only mode. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/puffs/mount_9p/node.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/node.c diff -u src/usr.sbin/puffs/mount_9p/node.c:1.29 src/usr.sbin/puffs/mount_9p/node.c:1.30 --- src/usr.sbin/puffs/mount_9p/node.c:1.29 Mon Jun 1 13:30:52 2020 +++ src/usr.sbin/puffs/mount_9p/node.c Wed Mar 2 04:11:41 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: node.c,v 1.29 2020/06/01 13:30:52 uwe Exp $ */ +/* $NetBSD: node.c,v 1.30 2022/03/02 04:11:41 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: node.c,v 1.29 2020/06/01 13:30:52 uwe Exp $"); +__RCSID("$NetBSD: node.c,v 1.30 2022/03/02 04:11:41 ozaki-r Exp $"); #endif /* !lint */ #include @@ -274,6 +274,8 @@ puffs9p_node_open(struct puffs_usermount puffs_setback(pcc, PUFFS_SETBACK_INACT_N1); if (pn->pn_va.va_type != VDIR) { + /* Always require read access for page cache */ + mode |= FREAD; if (mode & FREAD && p9n->fid_read == P9P_INVALFID) { nfid = NEXTFID(p9p); error = proto_cc_open(pu, p9n->fid_base, nfid,
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: uwe Date: Fri Feb 11 14:10:13 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: mount_9p(8): Use full month name in previos (oops). To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.16 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.17 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.16 Thu Feb 10 13:05:07 2022 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Fri Feb 11 14:10:12 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.16 2022/02/10 13:05:07 uwe Exp $ +.\" $NetBSD: mount_9p.8,v 1.17 2022/02/11 14:10:12 uwe Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Feb 10, 2022 +.Dd February 10, 2022 .Dt MOUNT_9P 8 .Os .Sh NAME
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: uwe Date: Fri Feb 11 14:10:13 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: mount_9p(8): Use full month name in previos (oops). To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: uwe Date: Thu Feb 10 13:05:07 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: mount_9p(8): document the new -C option. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: uwe Date: Thu Feb 10 13:05:07 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: mount_9p(8): document the new -C option. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.15 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.16 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.15 Sun Jun 14 00:30:20 2020 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Thu Feb 10 13:05:07 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.15 2020/06/14 00:30:20 uwe Exp $ +.\" $NetBSD: mount_9p.8,v 1.16 2022/02/10 13:05:07 uwe Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 30, 2020 +.Dd Feb 10, 2022 .Dt MOUNT_9P 8 .Os .Sh NAME @@ -31,14 +31,14 @@ .Nd mount a file server using the 9P resource sharing protocol .Sh SYNOPSIS .Nm -.Op Fl 46su +.Op Fl 46Csu .Op Fl o Ar options .Op Fl p Ar port .Oo Ar user Ns Li \&@ Oc Ns Ar host Ns Op Li \&: Ns Ar path .Ar mount_point .Nm .Fl c -.Op Fl su +.Op Fl Csu .Op Fl o Ar options .Ar device .Ar mount_point @@ -84,6 +84,10 @@ to use IPv4 addresses only. Forces .Nm to use IPv6 addresses only. +.It Fl C +Permit the kernel to cache pathname components. +By default every time the kernel does a lookup for a component name, +the file server will be consulted. .It Fl c Interpret .Ar special
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Thu Feb 10 09:29:39 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: ninepuffs.c Log Message: mount_9p: don't cache path names by default Caching path names doesn't handle file changes by host, which is not expected for normal usages. So turn it off by default. Instead, -C option is added to turn it on. Patch from k-goda@IIJ with my tweaks To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/puffs/mount_9p/ninepuffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/ninepuffs.c diff -u src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.33 src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.34 --- src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.33 Sun Jun 14 00:30:20 2020 +++ src/usr.sbin/puffs/mount_9p/ninepuffs.c Thu Feb 10 09:29:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ninepuffs.c,v 1.33 2020/06/14 00:30:20 uwe Exp $ */ +/* $NetBSD: ninepuffs.c,v 1.34 2022/02/10 09:29:39 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ninepuffs.c,v 1.33 2020/06/14 00:30:20 uwe Exp $"); +__RCSID("$NetBSD: ninepuffs.c,v 1.34 2022/02/10 09:29:39 ozaki-r Exp $"); #endif /* !lint */ #include @@ -149,6 +149,7 @@ main(int argc, char *argv[]) int detach; int protover; int server; + bool cachename = false; setprogname(argv[0]); @@ -166,7 +167,7 @@ main(int argc, char *argv[]) protover = P9PROTO_VERSION; server = P9P_SERVER_TCP; - while ((ch = getopt(argc, argv, "46co:p:su")) != -1) { + while ((ch = getopt(argc, argv, "46cCo:p:su")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -183,6 +184,9 @@ main(int argc, char *argv[]) case 'c': server = P9P_SERVER_CDEV; break; + case 'C': + cachename = true; + break; case 'o': mp = getmntopts(optarg, puffsmopts, , ); if (mp == NULL) @@ -213,6 +217,9 @@ main(int argc, char *argv[]) detach = 0; pflags |= PUFFS_KFLAG_WTCACHE | PUFFS_KFLAG_IAONDEMAND; + if (!cachename) + pflags |= PUFFS_KFLAG_NOCACHE_NAME; + PUFFSOP_INIT(pops); PUFFSOP_SET(pops, puffs9p, fs, unmount);
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Thu Feb 10 09:29:39 UTC 2022 Modified Files: src/usr.sbin/puffs/mount_9p: ninepuffs.c Log Message: mount_9p: don't cache path names by default Caching path names doesn't handle file changes by host, which is not expected for normal usages. So turn it off by default. Instead, -C option is added to turn it on. Patch from k-goda@IIJ with my tweaks To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/puffs/mount_9p/ninepuffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: msaitoh Date: Sun Dec 5 08:11:40 UTC 2021 Modified Files: src/usr.sbin/puffs/mount_psshfs: psshfs.c Log Message: s/systme/system/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/puffs/mount_psshfs/psshfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_psshfs/psshfs.c diff -u src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.66 src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.67 --- src/usr.sbin/puffs/mount_psshfs/psshfs.c:1.66 Sun Nov 4 22:46:08 2012 +++ src/usr.sbin/puffs/mount_psshfs/psshfs.c Sun Dec 5 08:11:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: psshfs.c,v 1.66 2012/11/04 22:46:08 christos Exp $ */ +/* $NetBSD: psshfs.c,v 1.67 2021/12/05 08:11:39 msaitoh Exp $ */ /* * Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ * psshfs: puffs sshfs * * psshfs implements sshfs functionality on top of puffs making it - * possible to mount a filesystme through the sftp service. + * possible to mount a filesystem through the sftp service. * * psshfs can execute multiple operations in "parallel" by using the * puffs_cc framework for continuations. @@ -41,7 +41,7 @@ #include #ifndef lint -__RCSID("$NetBSD: psshfs.c,v 1.66 2012/11/04 22:46:08 christos Exp $"); +__RCSID("$NetBSD: psshfs.c,v 1.67 2021/12/05 08:11:39 msaitoh Exp $"); #endif /* !lint */ #include
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: msaitoh Date: Sun Dec 5 08:11:40 UTC 2021 Modified Files: src/usr.sbin/puffs/mount_psshfs: psshfs.c Log Message: s/systme/system/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/usr.sbin/puffs/mount_psshfs/psshfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/puffs/mount_9p
> On Aug 30, 2020, at 7:01 PM, Valery Ushakov wrote: > > On Sun, Aug 30, 2020 at 17:12:45 -0400, Christos Zoulas wrote: > >> Module Name: src >> Committed By:christos >> Date:Sun Aug 30 21:12:45 UTC 2020 >> >> Modified Files: >> src/usr.sbin/puffs/mount_9p: Makefile >> >> Log Message: >> include bsd.init.mk to avoid: >> make: Bad conditional expression ` != "no"' in != "no"? -DINET6 : > > This worked and the :? for was specifically used to so that the ugly > early include (required for an ifdef) can be avoided. I don't > remember who pointed out this form to me (joerg@ or mrg@ I'd guess). > We have more forms like this in the tree, so not much. > > Is this a recent regression? Is that fallout from make rototill? Are > other similar :? use cases broken too? I think it is a new warning added with the make changes. We must have more code like this in the tree. I think it is a good practice (for consistency also) to have the bsd.init.mk included first, so that variables used by the rules are defined. christos signature.asc Description: Message signed with OpenPGP
Re: CVS commit: src/usr.sbin/puffs/mount_9p
On Sun, Aug 30, 2020 at 17:12:45 -0400, Christos Zoulas wrote: > Module Name: src > Committed By: christos > Date: Sun Aug 30 21:12:45 UTC 2020 > > Modified Files: > src/usr.sbin/puffs/mount_9p: Makefile > > Log Message: > include bsd.init.mk to avoid: > make: Bad conditional expression ` != "no"' in != "no"? -DINET6 : This worked and the :? for was specifically used to so that the ugly early include (required for an ifdef) can be avoided. I don't remember who pointed out this form to me (joerg@ or mrg@ I'd guess). We have more forms like this in the tree, so not much. Is this a recent regression? Is that fallout from make rototill? Are other similar :? use cases broken too? -uwe
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: wiz Date: Mon Oct 28 13:42:28 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Sort SEE ALSO. "file system" police. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.11 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.12 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.11 Mon Oct 28 02:59:25 2019 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Mon Oct 28 13:42:28 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.11 2019/10/28 02:59:25 ozaki-r Exp $ +.\" $NetBSD: mount_9p.8,v 1.12 2019/10/28 13:42:28 wiz Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -60,7 +60,7 @@ must be an absolute path. .Pp The .Fl c -opiton enables to mount a filesystem exported by a VM host through +opiton enables to mount a file system exported by a VM host through a character device file .Ar devfile backed by the @@ -92,8 +92,8 @@ environments. .Sh SEE ALSO .Xr puffs 3 , .Xr puffs 4 , -.Xr mount 8 , -.Xr vio9p 4 +.Xr vio9p 4 , +.Xr mount 8 .Rs .%T RFC and standards documents relating the 9P protocol .%U http://ericvh.github.io/9p-rfc/
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: wiz Date: Mon Oct 28 13:42:28 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Sort SEE ALSO. "file system" police. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Mon Oct 28 02:59:25 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 ninebuf.c ninepuffs.c ninepuffs.h Log Message: mount_9p: enable to communicate with vio9p via its character device file With this feature, we can mount an exported filesystem by a VM host via virtio-9p. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/puffs/mount_9p/mount_9p.8 cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/puffs/mount_9p/ninebuf.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/puffs/mount_9p/ninepuffs.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/puffs/mount_9p/ninepuffs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.10 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.11 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.10 Fri Jun 7 05:34:34 2019 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Mon Oct 28 02:59:25 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.10 2019/06/07 05:34:34 ozaki-r Exp $ +.\" $NetBSD: mount_9p.8,v 1.11 2019/10/28 02:59:25 ozaki-r Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 7, 2019 +.Dd October 24, 2019 .Dt MOUNT_9P 8 .Os .Sh NAME @@ -36,6 +36,12 @@ .Op Fl p Ar port .Ar [user@]host[:path] .Ar mount_point +.Nm +.Fl c +.Op Fl su +.Op Fl o Ar mntopts +.Ar devfile +.Ar mount_point .Sh DESCRIPTION The .Nm @@ -52,6 +58,18 @@ is supplied, it is used as the mount roo .Ar path must be an absolute path. .Pp +The +.Fl c +opiton enables to mount a filesystem exported by a VM host through +a character device file +.Ar devfile +backed by the +.Xr vio9p 4 +driver. +See +.Xr vio9p 4 +for more information. +.Pp By default .Nm runs in the background with @@ -74,7 +92,8 @@ environments. .Sh SEE ALSO .Xr puffs 3 , .Xr puffs 4 , -.Xr mount 8 +.Xr mount 8 , +.Xr vio9p 4 .Rs .%T RFC and standards documents relating the 9P protocol .%U http://ericvh.github.io/9p-rfc/ @@ -87,6 +106,11 @@ utility first appeared in .Pp Experimental 9P2000.u support appeared in .Nx 9.0 . +.Pp +The +.Fl c +option appeared in +.Nx 10.0 . .Sh CAVEATS Permissions are not handled well. .Pp Index: src/usr.sbin/puffs/mount_9p/ninebuf.c diff -u src/usr.sbin/puffs/mount_9p/ninebuf.c:1.8 src/usr.sbin/puffs/mount_9p/ninebuf.c:1.9 --- src/usr.sbin/puffs/mount_9p/ninebuf.c:1.8 Sun Nov 4 22:38:19 2012 +++ src/usr.sbin/puffs/mount_9p/ninebuf.c Mon Oct 28 02:59:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ninebuf.c,v 1.8 2012/11/04 22:38:19 christos Exp $ */ +/* $NetBSD: ninebuf.c,v 1.9 2019/10/28 02:59:25 ozaki-r Exp $ */ /* * Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ninebuf.c,v 1.8 2012/11/04 22:38:19 christos Exp $"); +__RCSID("$NetBSD: ninebuf.c,v 1.9 2019/10/28 02:59:25 ozaki-r Exp $"); #endif /* !lint */ #include @@ -138,7 +138,7 @@ p9pbuf_write(struct puffs_usermount *pu, winlen = howmuch; if (puffs_framebuf_getwindow(pb, CUROFF(pb), , )==-1) return errno; - n = send(fd, win, winlen, MSG_NOSIGNAL); + n = write(fd, win, winlen); switch (n) { case 0: return ECONNRESET; Index: src/usr.sbin/puffs/mount_9p/ninepuffs.c diff -u src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.26 src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.27 --- src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.26 Mon May 20 08:55:31 2019 +++ src/usr.sbin/puffs/mount_9p/ninepuffs.c Mon Oct 28 02:59:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ninepuffs.c,v 1.26 2019/05/20 08:55:31 ozaki-r Exp $ */ +/* $NetBSD: ninepuffs.c,v 1.27 2019/10/28 02:59:25 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ninepuffs.c,v 1.26 2019/05/20 08:55:31 ozaki-r Exp $"); +__RCSID("$NetBSD: ninepuffs.c,v 1.27 2019/10/28 02:59:25 ozaki-r Exp $"); #endif /* !lint */ #include @@ -60,6 +60,8 @@ usage(void) fprintf(stderr, "usage: %s [-su] [-o mntopts] [-p port] " "[user@]server[:path] mountpoint\n", getprogname()); + fprintf(stderr, " %s -c [-su] [-o mntopts] devfile mountpoint\n", + getprogname()); exit(1); } @@ -72,7 +74,7 @@ serverconnect(const char *addr, unsigned { struct sockaddr_in mysin; struct hostent *he; - int s; + int s, ret, opt; he = gethostbyname2(addr, AF_INET); if (he == NULL) { @@ -84,6 +86,11 @@ serverconnect(const char *addr, unsigned if (s == -1) err(1, "socket"); + opt = 1; + ret = setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, , sizeof(opt)); + if (ret == -1) + err(1, "setsockopt(SO_NOSIGPIPE)"); + memset(, 0, sizeof(struct sockaddr_in)); mysin.sin_family = AF_INET; mysin.sin_port = htons(port); @@ -95,6
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Mon Oct 28 02:59:25 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 ninebuf.c ninepuffs.c ninepuffs.h Log Message: mount_9p: enable to communicate with vio9p via its character device file With this feature, we can mount an exported filesystem by a VM host via virtio-9p. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/puffs/mount_9p/mount_9p.8 cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/puffs/mount_9p/ninebuf.c cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/puffs/mount_9p/ninepuffs.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/puffs/mount_9p/ninepuffs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/rump_lfs
Module Name:src Committed By: brad Date: Fri Aug 30 23:41:48 UTC 2019 Modified Files: src/usr.sbin/puffs/rump_lfs: rump_lfs.c Log Message: The cleaner is compiled into rump_lfs and executed as a thread. Pass in the raw device using the new -J option. This avoids the use of getdiskrawname which is not particularly rump safe in this context and insures that the rump container device is used for cleaning, not the outer device. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/puffs/rump_lfs/rump_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/rump_lfs/rump_lfs.c diff -u src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.18 src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.19 --- src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.18 Sun Aug 2 18:11:57 2015 +++ src/usr.sbin/puffs/rump_lfs/rump_lfs.c Fri Aug 30 23:41:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_lfs.c,v 1.18 2015/08/02 18:11:57 dholland Exp $ */ +/* $NetBSD: rump_lfs.c,v 1.19 2019/08/30 23:41:48 brad Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -43,16 +43,20 @@ #include "mount_lfs.h" +#define RUMPRAWDEVICE "/dev/rrumpy0" + static void * cleaner(void *arg) { - const char *the_argv[7]; + const char *the_argv[9]; the_argv[0] = "megamaid"; the_argv[1] = "-D"; /* don't fork() & detach */ - the_argv[2] = arg; + the_argv[2] = "-J"; /* treat arg as a device */ + the_argv[3] = RUMPRAWDEVICE; + the_argv[4] = arg; - lfs_cleaner_main(3, __UNCONST(the_argv)); + lfs_cleaner_main(5, __UNCONST(the_argv)); return NULL; } @@ -93,7 +97,7 @@ main(int argc, char *argv[]) * XXX: this particular piece inspired by the cleaner code. * obviously FIXXXME along with the cleaner. */ - sprintf(rawdev, "/dev/r%s", canon_dev+5); + strlcpy(rawdev, RUMPRAWDEVICE, MAXPATHLEN); rump_pub_etfs_register(rawdev, canon_dev, RUMP_ETFS_CHR); /*
CVS commit: src/usr.sbin/puffs/rump_lfs
Module Name:src Committed By: brad Date: Fri Aug 30 23:41:48 UTC 2019 Modified Files: src/usr.sbin/puffs/rump_lfs: rump_lfs.c Log Message: The cleaner is compiled into rump_lfs and executed as a thread. Pass in the raw device using the new -J option. This avoids the use of getdiskrawname which is not particularly rump safe in this context and insures that the rump container device is used for cleaning, not the outer device. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/puffs/rump_lfs/rump_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri Jun 7 05:34:34 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 nineproto.c ninepuffs.h node.c subr.c Log Message: Handle Rerror and return errno correctly (only for 9P2000.u for now) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/mount_9p/mount_9p.8 cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/puffs/mount_9p/nineproto.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/mount_9p/ninepuffs.h cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/puffs/mount_9p/node.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/mount_9p/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.9 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.10 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.9 Fri May 17 08:56:12 2019 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Fri Jun 7 05:34:34 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.9 2019/05/17 08:56:12 wiz Exp $ +.\" $NetBSD: mount_9p.8,v 1.10 2019/06/07 05:34:34 ozaki-r Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 15, 2019 +.Dd June 7, 2019 .Dt MOUNT_9P 8 .Os .Sh NAME @@ -92,7 +92,7 @@ Permissions are not handled well. .Pp Authentication support is missing. .Pp -Error code handling is missing. +Error code handling is missing for 9P2000. .Pp Under construction. .Pp Index: src/usr.sbin/puffs/mount_9p/nineproto.c diff -u src/usr.sbin/puffs/mount_9p/nineproto.c:1.10 src/usr.sbin/puffs/mount_9p/nineproto.c:1.11 --- src/usr.sbin/puffs/mount_9p/nineproto.c:1.10 Fri May 17 08:48:04 2019 +++ src/usr.sbin/puffs/mount_9p/nineproto.c Fri Jun 7 05:34:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nineproto.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $ */ +/* $NetBSD: nineproto.c,v 1.11 2019/06/07 05:34:34 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: nineproto.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $"); +__RCSID("$NetBSD: nineproto.c,v 1.11 2019/06/07 05:34:34 ozaki-r Exp $"); #endif /* !lint */ #include @@ -188,6 +188,49 @@ proto_getstat(struct puffs_usermount *pu return 0; } +static int +proto_rerror(struct puffs_usermount *pu, struct puffs_framebuf *pb, +uint32_t *_errno) +{ + struct puffs9p *p9p = puffs_getspecific(pu); + uint16_t size; + int rv; + char *name; + + /* Skip size[4] Rerror tag[2] */ + rv = puffs_framebuf_seekset(pb, + sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t)); + if (rv == -1) + return EPROTO; + + rv = p9pbuf_get_str(pb, , ); + if (rv != 0) + return rv; + if (p9p->protover == P9PROTO_VERSION_U) { + rv = p9pbuf_get_4(pb, _errno); + } else { + /* TODO Convert error string to errno */ + rv = EPROTO; + } + + return rv; +} + +int +proto_handle_rerror(struct puffs_usermount *pu, struct puffs_framebuf *pb) +{ + int rv; + uint32_t _errno; + + if (p9pbuf_get_type(pb) != P9PROTO_R_ERROR) + return EPROTO; + + rv = proto_rerror(pu, pb, &_errno); + if (rv == 0) + rv = _errno; + return rv; +} + int proto_cc_dupfid(struct puffs_usermount *pu, p9pfid_t oldfid, p9pfid_t newfid) { @@ -206,7 +249,7 @@ proto_cc_dupfid(struct puffs_usermount * p9pbuf_put_2(pb, 0); GETRESPONSE(pb); - rv = proto_expect_walk_nqids(pb, ); + rv = proto_expect_walk_nqids(pu, pb, ); if (rv == 0 && qids != 0) rv = EPROTO; @@ -232,7 +275,7 @@ proto_cc_clunkfid(struct puffs_usermount if (waitforit) { if (puffs_framev_enqueue_cc(pcc, p9p->servsock, pb, 0) == 0) { if (p9pbuf_get_type(pb) != P9PROTO_R_CLUNK) -rv = EPROTO; +rv = proto_handle_rerror(pu, pb); } else { rv = errno; } @@ -269,7 +312,7 @@ proto_cc_open(struct puffs_usermount *pu p9pbuf_put_1(pb, mode); GETRESPONSE(pb); if (p9pbuf_get_type(pb) != P9PROTO_R_OPEN) - rv = EPROTO; + rv = proto_handle_rerror(pu, pb); out: puffs_framebuf_destroy(pb); @@ -349,20 +392,22 @@ proto_make_stat(struct puffs_usermount * } int -proto_expect_walk_nqids(struct puffs_framebuf *pb, uint16_t *nqids) +proto_expect_walk_nqids(struct puffs_usermount *pu, struct puffs_framebuf *pb, +uint16_t *nqids) { if (p9pbuf_get_type(pb) != P9PROTO_R_WALK) - return EPROTO; + return proto_handle_rerror(pu, pb); return p9pbuf_get_2(pb, nqids); } int -proto_expect_qid(struct puffs_framebuf *pb, uint8_t op, struct qid9p *qid) +proto_expect_qid(struct puffs_usermount *pu, struct puffs_framebuf *pb, +uint8_t op, struct qid9p *qid) { if (p9pbuf_get_type(pb) != op) - return EPROTO; + return proto_handle_rerror(pu, pb); return proto_getqid(pb, qid); } @@ -374,7 +419,7 @@ proto_expect_stat(struct puffs_usermount int rv; if (p9pbuf_get_type(pb) !=
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri Jun 7 05:34:34 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 nineproto.c ninepuffs.h node.c subr.c Log Message: Handle Rerror and return errno correctly (only for 9P2000.u for now) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/mount_9p/mount_9p.8 cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/puffs/mount_9p/nineproto.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/puffs/mount_9p/ninepuffs.h cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/puffs/mount_9p/node.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/mount_9p/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Mon May 20 08:55:31 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: ninepuffs.c Log Message: mount_9p: add missing -u option to the help message To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/puffs/mount_9p/ninepuffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/ninepuffs.c diff -u src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.25 src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.26 --- src/usr.sbin/puffs/mount_9p/ninepuffs.c:1.25 Fri May 17 08:48:04 2019 +++ src/usr.sbin/puffs/mount_9p/ninepuffs.c Mon May 20 08:55:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ninepuffs.c,v 1.25 2019/05/17 08:48:04 ozaki-r Exp $ */ +/* $NetBSD: ninepuffs.c,v 1.26 2019/05/20 08:55:31 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: ninepuffs.c,v 1.25 2019/05/17 08:48:04 ozaki-r Exp $"); +__RCSID("$NetBSD: ninepuffs.c,v 1.26 2019/05/20 08:55:31 ozaki-r Exp $"); #endif /* !lint */ #include @@ -58,7 +58,7 @@ __dead static void usage(void) { - fprintf(stderr, "usage: %s [-s] [-o mntopts] [-p port] " + fprintf(stderr, "usage: %s [-su] [-o mntopts] [-p port] " "[user@]server[:path] mountpoint\n", getprogname()); exit(1); }
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Mon May 20 08:55:31 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: ninepuffs.c Log Message: mount_9p: add missing -u option to the help message To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/puffs/mount_9p/ninepuffs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: wiz Date: Fri May 17 08:56:12 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Merge single-letter options in SYNOPSIS. Add an article. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.8 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.9 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.8 Fri May 17 08:48:04 2019 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Fri May 17 08:56:12 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.8 2019/05/17 08:48:04 ozaki-r Exp $ +.\" $NetBSD: mount_9p.8,v 1.9 2019/05/17 08:56:12 wiz Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -31,8 +31,7 @@ .Nd mount a file server using the 9P resource sharing protocol .Sh SYNOPSIS .Nm -.Op Fl s -.Op Fl u +.Op Fl su .Op Fl o Ar mntopts .Op Fl p Ar port .Ar [user@]host[:path] @@ -66,7 +65,7 @@ runs in the forground. By default .Nm follows the 9P2000 protocol. -With +With the .Fl u option .Nm
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: wiz Date: Fri May 17 08:56:12 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Merge single-letter options in SYNOPSIS. Add an article. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri May 17 08:48:04 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: fs.c mount_9p.8 nineproto.c nineproto.h ninepuffs.c ninepuffs.h node.c Log Message: mount_9p: add initial support for 9P2000.u The implementation enables to work with a server talking 9P2000.u. However, it doesn't use the extended fields yet; it just ignores those of received messages and sets "please ignore" values to those of sending messages such as zero-length strings and maximum unsigned values. The feature is enabled by the -u option. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/mount_9p/fs.c \ src/usr.sbin/puffs/mount_9p/nineproto.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/puffs/mount_9p/mount_9p.8 cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/puffs/mount_9p/nineproto.h cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/puffs/mount_9p/ninepuffs.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/puffs/mount_9p/ninepuffs.h cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/puffs/mount_9p/node.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri May 17 08:48:04 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: fs.c mount_9p.8 nineproto.c nineproto.h ninepuffs.c ninepuffs.h node.c Log Message: mount_9p: add initial support for 9P2000.u The implementation enables to work with a server talking 9P2000.u. However, it doesn't use the extended fields yet; it just ignores those of received messages and sets "please ignore" values to those of sending messages such as zero-length strings and maximum unsigned values. The feature is enabled by the -u option. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/puffs/mount_9p/fs.c \ src/usr.sbin/puffs/mount_9p/nineproto.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/puffs/mount_9p/mount_9p.8 cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/puffs/mount_9p/nineproto.h cvs rdiff -u -r1.24 -r1.25 src/usr.sbin/puffs/mount_9p/ninepuffs.c cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/puffs/mount_9p/ninepuffs.h cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/puffs/mount_9p/node.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/fs.c diff -u src/usr.sbin/puffs/mount_9p/fs.c:1.9 src/usr.sbin/puffs/mount_9p/fs.c:1.10 --- src/usr.sbin/puffs/mount_9p/fs.c:1.9 Wed Jun 22 04:03:23 2011 +++ src/usr.sbin/puffs/mount_9p/fs.c Fri May 17 08:48:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: fs.c,v 1.9 2011/06/22 04:03:23 mrg Exp $ */ +/* $NetBSD: fs.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fs.c,v 1.9 2011/06/22 04:03:23 mrg Exp $"); +__RCSID("$NetBSD: fs.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $"); #endif /* !lint */ #include @@ -48,6 +48,17 @@ __RCSID("$NetBSD: fs.c,v 1.9 2011/06/22 rv = fname(a1, a2, a3, a4); \ if (rv) errx(1, "p9p_handshake io failed %d, %d", rv, *a4) +static const char * +p9p_ver2str(int version) +{ + + switch (version) { + case P9PROTO_VERSION: return P9PROTO_VERSTR; + case P9PROTO_VERSION_U: return P9PROTO_VERSTR_U; + } + return NULL; +} + struct puffs_node * p9p_handshake(struct puffs_usermount *pu, const char *username, const char *path) @@ -63,13 +74,15 @@ p9p_handshake(struct puffs_usermount *pu const char *p; uint8_t type; int rv, done, x = 1, ncomp; + uint16_t strsize; + char *str; /* send initial handshake */ pb = p9pbuf_makeout(); p9pbuf_put_1(pb, P9PROTO_T_VERSION); p9pbuf_put_2(pb, P9PROTO_NOTAG); p9pbuf_put_4(pb, p9p->maxreq); - p9pbuf_put_str(pb, P9PROTO_VERSION); + p9pbuf_put_str(pb, p9p_ver2str(p9p->protover)); DO_IO(p9pbuf_write, pu, pb, p9p->servsock, , rv); puffs_framebuf_recycle(pb); @@ -89,6 +102,13 @@ p9p_handshake(struct puffs_usermount *pu "%d vs. %d", P9P_MINREQLEN, maxreq); p9p->maxreq = maxreq; + if (p9pbuf_get_str(pb, , )) + errx(1, "server invalid response: no version"); + if (strncmp(str, p9p_ver2str(p9p->protover), P9PROTO_VERSTR_MAXLEN) != 0) { + errx(1, "server doesn't support %s", p9p_ver2str(p9p->protover)); + /* Should downgrade from 9P2000.u to 9P2000 if the server request? */ + } + /* tell the server we don't support authentication */ p9pbuf_recycleout(pb); tagid = NEXTTAG(p9p); @@ -97,6 +117,8 @@ p9p_handshake(struct puffs_usermount *pu p9pbuf_put_4(pb, P9PROTO_NOFID); p9pbuf_put_str(pb, username); p9pbuf_put_str(pb, ""); + if (p9p->protover == P9PROTO_VERSION_U) + p9pbuf_put_4(pb, P9PROTO_NUNAME_UNSPECIFIED); /* n_uname[4] */ DO_IO(p9pbuf_write, pu, pb, p9p->servsock, , rv); puffs_framebuf_recycle(pb); @@ -117,6 +139,8 @@ p9p_handshake(struct puffs_usermount *pu p9pbuf_put_4(pb, P9PROTO_NOFID); p9pbuf_put_str(pb, username); p9pbuf_put_str(pb, ""); + if (p9p->protover == P9PROTO_VERSION_U) + p9pbuf_put_4(pb, P9PROTO_NUNAME_UNSPECIFIED); /* n_uname[4] */ DO_IO(p9pbuf_write, pu, pb, p9p->servsock, , rv); puffs_framebuf_recycle(pb); @@ -213,7 +237,7 @@ p9p_handshake(struct puffs_usermount *pu errx(1, "server invalid tag: %d vs. %d", tagid, rtagid); if (p9pbuf_get_2(pb, )) errx(1, "couldn't get stat len parameter"); - if (proto_getstat(pb, , NULL, NULL)) + if (proto_getstat(pu, pb, , NULL, NULL)) errx(1, "could not parse root attributes"); puffs_framebuf_destroy(pb); Index: src/usr.sbin/puffs/mount_9p/nineproto.c diff -u src/usr.sbin/puffs/mount_9p/nineproto.c:1.9 src/usr.sbin/puffs/mount_9p/nineproto.c:1.10 --- src/usr.sbin/puffs/mount_9p/nineproto.c:1.9 Fri Nov 30 19:02:38 2007 +++ src/usr.sbin/puffs/mount_9p/nineproto.c Fri May 17 08:48:04 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nineproto.c,v 1.9 2007/11/30 19:02:38 pooka Exp $ */ +/* $NetBSD: nineproto.c,v 1.10 2019/05/17 08:48:04 ozaki-r Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include #ifndef lint -__RCSID("$NetBSD: nineproto.c,v 1.9
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: wiz Date: Fri May 17 08:26:20 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Add missing .Re. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.6 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.7 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.6 Fri May 17 07:50:49 2019 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Fri May 17 08:26:20 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.6 2019/05/17 07:50:49 ozaki-r Exp $ +.\" $NetBSD: mount_9p.8,v 1.7 2019/05/17 08:26:20 wiz Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -68,6 +68,7 @@ runs in the forground. .Rs .%T RFC and standards documents relating the 9P protocol .%U http://ericvh.github.io/9p-rfc/ +.Re .Sh HISTORY The .Nm
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: wiz Date: Fri May 17 08:26:20 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Add missing .Re. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri May 17 07:50:49 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Refer the current official page To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.5 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.6 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.5 Fri May 17 07:50:09 2019 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Fri May 17 07:50:49 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.5 2019/05/17 07:50:09 ozaki-r Exp $ +.\" $NetBSD: mount_9p.8,v 1.6 2019/05/17 07:50:49 ozaki-r Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -65,6 +65,9 @@ runs in the forground. .Xr puffs 3 , .Xr puffs 4 , .Xr mount 8 +.Rs +.%T RFC and standards documents relating the 9P protocol +.%U http://ericvh.github.io/9p-rfc/ .Sh HISTORY The .Nm
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri May 17 07:50:09 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Document the -s option To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri May 17 07:50:09 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Document the -s option To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/mount_9p/mount_9p.8 diff -u src/usr.sbin/puffs/mount_9p/mount_9p.8:1.4 src/usr.sbin/puffs/mount_9p/mount_9p.8:1.5 --- src/usr.sbin/puffs/mount_9p/mount_9p.8:1.4 Sun Dec 2 21:03:32 2007 +++ src/usr.sbin/puffs/mount_9p/mount_9p.8 Fri May 17 07:50:09 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_9p.8,v 1.4 2007/12/02 21:03:32 wiz Exp $ +.\" $NetBSD: mount_9p.8,v 1.5 2019/05/17 07:50:09 ozaki-r Exp $ .\" .\" Copyright (c) 2007 Antti Kantee. All rights reserved. .\" @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 8, 2007 +.Dd May 15, 2019 .Dt MOUNT_9P 8 .Os .Sh NAME @@ -51,6 +51,16 @@ If is supplied, it is used as the mount rootpath on the remote host. .Ar path must be an absolute path. +.Pp +By default +.Nm +runs in the background with +.Xr daemon 3 . +With the +.Fl s +option +.Nm +runs in the forground. .Sh SEE ALSO .Xr puffs 3 , .Xr puffs 4 ,
CVS commit: src/usr.sbin/puffs/mount_9p
Module Name:src Committed By: ozaki-r Date: Fri May 17 07:50:49 UTC 2019 Modified Files: src/usr.sbin/puffs/mount_9p: mount_9p.8 Log Message: Refer the current official page To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/mount_9p/mount_9p.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/rump_nqmfs
Module Name:src Committed By: pooka Date: Mon Mar 8 12:46:34 UTC 2010 Added Files: src/usr.sbin/puffs/rump_nqmfs: Makefile rump_nqmfs.c Log Message: Not Quite MFS Instead of copulating with newfs to produce a new FFS image into memory, mmap() a given existing image and pass that as the backing store. If -s is given, mmap is done with MAP_SHARED and changes are kept across mounts, else MAP_COPY (i.e. MAP_PRIVATE for us) is done and changes are lost when the server exits. Note: -s does not guarantee any kind of file system safety whatsoever and in case of kill, crash, exit or other form of elusion, everything will be, according to our theme, quite screwed. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.sbin/puffs/rump_nqmfs/Makefile \ src/usr.sbin/puffs/rump_nqmfs/rump_nqmfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs
Module Name:src Committed By: pooka Date: Mon Mar 8 12:48:31 UTC 2010 Modified Files: src/usr.sbin/puffs: Makefile Log Message: add commented out nqmfs To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/puffs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/Makefile diff -u src/usr.sbin/puffs/Makefile:1.11 src/usr.sbin/puffs/Makefile:1.12 --- src/usr.sbin/puffs/Makefile:1.11 Sat Dec 5 20:11:18 2009 +++ src/usr.sbin/puffs/Makefile Mon Mar 8 12:48:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2009/12/05 20:11:18 pooka Exp $ +# $NetBSD: Makefile,v 1.12 2010/03/08 12:48:31 pooka Exp $ SUBDIR= mount_9p mount_psshfs mount_sysctlfs @@ -14,4 +14,7 @@ # and is therefore not useful for the average user #SUBDIR+=rump_fdesc +# rump_mqmfs is just another ffs, useful mainly for debugging +#SUBDIR+=rump_nqmfs + .include bsd.subdir.mk
CVS commit: src/usr.sbin/puffs/rump_lfs
Module Name:src Committed By: pooka Date: Wed Mar 3 17:37:01 UTC 2010 Modified Files: src/usr.sbin/puffs/rump_lfs: rump_lfs.c Log Message: Give usage() a chance. XXX: UKFS_DEVICE_ARGVPROBE() interface To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/rump_lfs/rump_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/puffs/rump_lfs/rump_lfs.c diff -u src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.15 src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.16 --- src/usr.sbin/puffs/rump_lfs/rump_lfs.c:1.15 Tue Jan 12 18:43:37 2010 +++ src/usr.sbin/puffs/rump_lfs/rump_lfs.c Wed Mar 3 17:37:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_lfs.c,v 1.15 2010/01/12 18:43:37 pooka Exp $ */ +/* $NetBSD: rump_lfs.c,v 1.16 2010/03/03 17:37:01 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -73,9 +73,12 @@ puffs_unmountonsignal(SIGINT, true); puffs_unmountonsignal(SIGTERM, true); - UKFS_DEVICE_ARGVPROBE(part); - if (part != ukfs_part_none) { - errx(1, lfs does not currently support embedded partitions); + if (argc = 3) { + UKFS_DEVICE_ARGVPROBE(part); + if (part != ukfs_part_none) { + errx(1, lfs does not currently support + embedded partitions); + } } mount_lfs_parseargs(argc, argv, args, mntflags, canon_dev, canon_dir);
CVS commit: src/usr.sbin/puffs/rump_lfs
Module Name:src Committed By: pooka Date: Wed Mar 3 17:37:01 UTC 2010 Modified Files: src/usr.sbin/puffs/rump_lfs: rump_lfs.c Log Message: Give usage() a chance. XXX: UKFS_DEVICE_ARGVPROBE() interface To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/rump_lfs/rump_lfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Wed Feb 17 15:50:54 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: psshfs.c Log Message: Bump the initial rootdir link count guess to a ludicrous value. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/puffs/mount_psshfs/psshfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Wed Feb 3 17:16:29 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: mount_psshfs.8 Log Message: Give credit: psshfs was inspired by FUSE sshfs. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/puffs/mount_psshfs/mount_psshfs.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs
Module Name:src Committed By: pooka Date: Mon Jan 25 15:55:37 UTC 2010 Modified Files: src/usr.sbin/puffs: Makefile.inc src/usr.sbin/puffs/rump_cd9660: Makefile src/usr.sbin/puffs/rump_efs: Makefile src/usr.sbin/puffs/rump_ext2fs: Makefile src/usr.sbin/puffs/rump_ffs: Makefile src/usr.sbin/puffs/rump_hfs: Makefile src/usr.sbin/puffs/rump_lfs: Makefile src/usr.sbin/puffs/rump_msdos: Makefile src/usr.sbin/puffs/rump_ntfs: Makefile src/usr.sbin/puffs/rump_udf: Makefile Log Message: Define concept disk based file system and flag appropriate file systems as such. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/puffs/Makefile.inc cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/puffs/rump_cd9660/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/puffs/rump_efs/Makefile cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_ext2fs/Makefile cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/puffs/rump_ffs/Makefile cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_hfs/Makefile cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/puffs/rump_lfs/Makefile cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/puffs/rump_msdos/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/puffs/rump_ntfs/Makefile cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/puffs/rump_udf/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Fri Jan 8 10:53:32 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: psbuf.c Log Message: Fix compilation with -Wsign-compare. Apparently 5.0 doesn't have -Wsign-compare enabled, which explains a thing or two ... pointed out by gson To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/puffs/mount_psshfs/psbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Thu Jan 7 21:05:50 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: mount_psshfs.8 node.c psbuf.c psshfs.c psshfs.h subr.c Log Message: Add -u and -g, which allow to remap one (local,remote) uidgid, i.e. umapfs without the fuss. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/puffs/mount_psshfs/mount_psshfs.8 cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/puffs/mount_psshfs/node.c cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/puffs/mount_psshfs/psbuf.c cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/puffs/mount_psshfs/psshfs.c cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/puffs/mount_psshfs/psshfs.h cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/puffs/mount_psshfs/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Thu Jan 7 21:19:45 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: psbuf.c Log Message: Fix chgrp (and don't rely on VNOVAL being -1, however unlikely that is to be broken). To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/puffs/mount_psshfs/psbuf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Thu Jan 7 21:23:10 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: psshfs.c Log Message: Don't allow mangling of uid or gid -1, since they have a special meaning in the sftp protocol. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/usr.sbin/puffs/mount_psshfs/psshfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/puffs/mount_psshfs
Module Name:src Committed By: pooka Date: Thu Jan 7 21:26:49 UTC 2010 Modified Files: src/usr.sbin/puffs/mount_psshfs: psshfs.c Log Message: errx() already contains progname ... To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/puffs/mount_psshfs/psshfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.sbin/puffs/rump_smbfs
On Thu, Sep 17, 2009 at 09:05:38AM +0100, Nick Hudson wrote: People are most welcome to fix this ugliness properly by helping to get rid of link sets in the kernel. I'm glad you agree that link sets are ugly. On the matter of a getting rid of them I did offer to discuss a solution, but was ignored. Like all things they have their place, but overuse can be a problem. For instance they could solve the problem of getting an intial entry point (code or data) into a kernel 'module' that has being linked into a kernel with 'ld -r'. (when modules are loaded it is possibly to do a symbol lookup...) There are probably other places where it is difficult to call an explicit initialiser. It is all rather similar to the proliferation of memory pools - for things where 'malloc' would be fine. David -- David Laight: da...@l8s.co.uk
Re: CVS commit: src/usr.sbin/puffs/rump_smbfs
On Sep 18, 2009, at 9:10 AM, David Laight wrote: It is all rather similar to the proliferation of memory pools - for things where 'malloc' would be fine. The old-school kernel malloc was almost never fine ... but pools have another advantage -- use of a direct-mapped segment on architectures so-equipped. And for those not so-equipped, greatly reduced pressure on kmem_map. Now, if we could only get rid of kmem_map / kernel malloc completely (which requires making it illegal to allocate memory in interrupt context). -- thorpej
Re: CVS commit: src/usr.sbin/puffs/rump_smbfs
On Fri Sep 11 2009 at 06:48:50 +, Nick Hudson wrote: Module Name: src Committed By: skrll Date: Fri Sep 11 06:48:50 UTC 2009 Modified Files: src/usr.sbin/puffs/rump_smbfs: Makefile Log Message: Allow this to build while link sets and rump are broken. Hi Nick, In the future if you run across a problem which you are unable to understand, debug and fix on your own, please ask for assistance. Commits with handwavy and incorrect information make it more difficult to track down and fix the real issues. The binutils regression is that between 2.16 and 2.19 __start_sectname for orphaned sections was changed to use PROVIDE instead of define and hence those symbols are not available anymore in library components produced with ld. I have provided a quick workaround which allows the build to work with both with 2.16 and 2.19 while not silently breaking functionality like in your model. Please revert all of your incorrect commits. thanks