Re: svn commit: r339672 - in head/sys: fs/nfsclient kern sys tools

2018-10-24 Thread Cy Schubert
In message <20181024145649.gc5...@kib.kiev.ua>, Konstantin Belousov 
writes:
> On Wed, Oct 24, 2018 at 07:19:33AM -0700, Cy Schubert wrote:
> > In message <201810241159.w9obxfwg013...@slippy.cwsent.com>, Cy Schubert 
> > writes:
> > > In message <201810232143.w9nlhfek087...@repo.freebsd.org>, Konstantin 
> > > Belousov
> > > writes:
> > > > Author: kib
> > > > Date: Tue Oct 23 21:43:41 2018
> > > > New Revision: 339672
> > > > URL: https://svnweb.freebsd.org/changeset/base/339672
> > > >
> > > > Log:
> > > >   Only call sigdeferstop() for NFS.
> > > >   
> > > >   Use bypass to catch any NFS VOP dispatch and route it through the
> > > >   wrapper which does sigdeferstop() and then dispatches original
> > > >   VOP. NFS does not need a bypass below it, which is not supported.
> > > >   
> > > >   The vop offset in the vop_vector is added since otherwise it is
> > > >   impossible to get vop_op_t from the internal table, and I did not
> > > >   wanted to create the layered fs only to wrap NFS VOPs.
> > > >   
> > > >   VFS_OP()s wrap is straightforward.
> > > >   
> > > >   Requested and reviewed by:mjg (previous version)
> > > >   Tested by:pho
> > > >   Sponsored by: The FreeBSD Foundation
> > > >   Differential revision:https://reviews.freebsd.org/D17658
> > > >
> > > > Modified:
> > > >   head/sys/fs/nfsclient/nfs_clvnops.c
> > > >   head/sys/kern/vfs_default.c
> > > >   head/sys/kern/vfs_init.c
> > > >   head/sys/kern/vfs_mount.c
> > > >   head/sys/sys/mount.h
> > > >   head/sys/sys/vnode.h
> > > >   head/sys/tools/vnode_if.awk
> > > >
> > >
> > > Unfortunately this broke amd(8).
> > 
> > I should have included this.
> > 
> > Oct 24 00:34:13 slippy amd[2741]: '/home': mount: Operation not 
> > supported
> > Oct 24 00:34:13 slippy amd[2742]: '/vol': mount: Operation not supported
> > Oct 24 00:34:13 slippy amd[2743]: '/net': mount: Operation not supported
> > Oct 24 00:34:14 slippy amd[2742]: '/vol': mount: Operation not supported
> > Oct 24 00:34:14 slippy amd[2741]: '/home': mount: Operation not 
> > supported
> > Oct 24 00:34:14 slippy amd[2742]: amfs_toplvl_mount: amfs_mount failed: 
> > Operation not supported
>
> Try this.
>
> diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
> index 8d98cb199ec..74bfe733100 100644
> --- a/sys/kern/vfs_mount.c
> +++ b/sys/kern/vfs_mount.c
> @@ -808,8 +808,10 @@ sys_mount(struct thread *td, struct mount_args *uap)
>   free(fstype, M_TEMP);
>   if (vfsp == NULL)
>   return (ENOENT);
> - if (vfsp->vfc_vfsops->vfs_cmount == NULL || ((vfsp->vfc_flags &
> - VFCF_SBDRY) != 0 && (vfsp->vfc_vfsops_sd->vfs_cmount == NULL)))
> + if (((vfsp->vfc_flags & VFCF_SBDRY) != 0 &&
> + vfsp->vfc_vfsops_sd->vfs_cmount == NULL) ||
> + ((vfsp->vfc_flags & VFCF_SBDRY) == 0 &&
> + vfsp->vfc_vfsops->vfs_cmount == NULL))
>   return (EOPNOTSUPP);
>  
>   ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN);


Yes, that fixes it. Thank you.
-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339672 - in head/sys: fs/nfsclient kern sys tools

2018-10-24 Thread Konstantin Belousov
On Wed, Oct 24, 2018 at 07:19:33AM -0700, Cy Schubert wrote:
> In message <201810241159.w9obxfwg013...@slippy.cwsent.com>, Cy Schubert 
> writes:
> > In message <201810232143.w9nlhfek087...@repo.freebsd.org>, Konstantin 
> > Belousov
> > writes:
> > > Author: kib
> > > Date: Tue Oct 23 21:43:41 2018
> > > New Revision: 339672
> > > URL: https://svnweb.freebsd.org/changeset/base/339672
> > >
> > > Log:
> > >   Only call sigdeferstop() for NFS.
> > >   
> > >   Use bypass to catch any NFS VOP dispatch and route it through the
> > >   wrapper which does sigdeferstop() and then dispatches original
> > >   VOP. NFS does not need a bypass below it, which is not supported.
> > >   
> > >   The vop offset in the vop_vector is added since otherwise it is
> > >   impossible to get vop_op_t from the internal table, and I did not
> > >   wanted to create the layered fs only to wrap NFS VOPs.
> > >   
> > >   VFS_OP()s wrap is straightforward.
> > >   
> > >   Requested and reviewed by:  mjg (previous version)
> > >   Tested by:  pho
> > >   Sponsored by:   The FreeBSD Foundation
> > >   Differential revision:  https://reviews.freebsd.org/D17658
> > >
> > > Modified:
> > >   head/sys/fs/nfsclient/nfs_clvnops.c
> > >   head/sys/kern/vfs_default.c
> > >   head/sys/kern/vfs_init.c
> > >   head/sys/kern/vfs_mount.c
> > >   head/sys/sys/mount.h
> > >   head/sys/sys/vnode.h
> > >   head/sys/tools/vnode_if.awk
> > >
> >
> > Unfortunately this broke amd(8).
> 
> I should have included this.
> 
> Oct 24 00:34:13 slippy amd[2741]: '/home': mount: Operation not 
> supported
> Oct 24 00:34:13 slippy amd[2742]: '/vol': mount: Operation not supported
> Oct 24 00:34:13 slippy amd[2743]: '/net': mount: Operation not supported
> Oct 24 00:34:14 slippy amd[2742]: '/vol': mount: Operation not supported
> Oct 24 00:34:14 slippy amd[2741]: '/home': mount: Operation not 
> supported
> Oct 24 00:34:14 slippy amd[2742]: amfs_toplvl_mount: amfs_mount failed: 
> Operation not supported

Try this.

diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 8d98cb199ec..74bfe733100 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -808,8 +808,10 @@ sys_mount(struct thread *td, struct mount_args *uap)
free(fstype, M_TEMP);
if (vfsp == NULL)
return (ENOENT);
-   if (vfsp->vfc_vfsops->vfs_cmount == NULL || ((vfsp->vfc_flags &
-   VFCF_SBDRY) != 0 && (vfsp->vfc_vfsops_sd->vfs_cmount == NULL)))
+   if (((vfsp->vfc_flags & VFCF_SBDRY) != 0 &&
+   vfsp->vfc_vfsops_sd->vfs_cmount == NULL) ||
+   ((vfsp->vfc_flags & VFCF_SBDRY) == 0 &&
+   vfsp->vfc_vfsops->vfs_cmount == NULL))
return (EOPNOTSUPP);
 
ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339672 - in head/sys: fs/nfsclient kern sys tools

2018-10-24 Thread Cy Schubert
In message <201810241159.w9obxfwg013...@slippy.cwsent.com>, Cy Schubert 
writes:
> In message <201810232143.w9nlhfek087...@repo.freebsd.org>, Konstantin 
> Belousov
> writes:
> > Author: kib
> > Date: Tue Oct 23 21:43:41 2018
> > New Revision: 339672
> > URL: https://svnweb.freebsd.org/changeset/base/339672
> >
> > Log:
> >   Only call sigdeferstop() for NFS.
> >   
> >   Use bypass to catch any NFS VOP dispatch and route it through the
> >   wrapper which does sigdeferstop() and then dispatches original
> >   VOP. NFS does not need a bypass below it, which is not supported.
> >   
> >   The vop offset in the vop_vector is added since otherwise it is
> >   impossible to get vop_op_t from the internal table, and I did not
> >   wanted to create the layered fs only to wrap NFS VOPs.
> >   
> >   VFS_OP()s wrap is straightforward.
> >   
> >   Requested and reviewed by:mjg (previous version)
> >   Tested by:pho
> >   Sponsored by: The FreeBSD Foundation
> >   Differential revision:https://reviews.freebsd.org/D17658
> >
> > Modified:
> >   head/sys/fs/nfsclient/nfs_clvnops.c
> >   head/sys/kern/vfs_default.c
> >   head/sys/kern/vfs_init.c
> >   head/sys/kern/vfs_mount.c
> >   head/sys/sys/mount.h
> >   head/sys/sys/vnode.h
> >   head/sys/tools/vnode_if.awk
> >
>
> Unfortunately this broke amd(8).
-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.

>
>
> -- 
> Cheers,
> Cy Schubert 
> FreeBSD UNIX: Web:  http://www.FreeBSD.org
>
>   The need of the many outweighs the greed of the few.
>
>
>


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339672 - in head/sys: fs/nfsclient kern sys tools

2018-10-24 Thread Cy Schubert
In message <201810241159.w9obxfwg013...@slippy.cwsent.com>, Cy Schubert 
writes:
> In message <201810232143.w9nlhfek087...@repo.freebsd.org>, Konstantin 
> Belousov
> writes:
> > Author: kib
> > Date: Tue Oct 23 21:43:41 2018
> > New Revision: 339672
> > URL: https://svnweb.freebsd.org/changeset/base/339672
> >
> > Log:
> >   Only call sigdeferstop() for NFS.
> >   
> >   Use bypass to catch any NFS VOP dispatch and route it through the
> >   wrapper which does sigdeferstop() and then dispatches original
> >   VOP. NFS does not need a bypass below it, which is not supported.
> >   
> >   The vop offset in the vop_vector is added since otherwise it is
> >   impossible to get vop_op_t from the internal table, and I did not
> >   wanted to create the layered fs only to wrap NFS VOPs.
> >   
> >   VFS_OP()s wrap is straightforward.
> >   
> >   Requested and reviewed by:mjg (previous version)
> >   Tested by:pho
> >   Sponsored by: The FreeBSD Foundation
> >   Differential revision:https://reviews.freebsd.org/D17658
> >
> > Modified:
> >   head/sys/fs/nfsclient/nfs_clvnops.c
> >   head/sys/kern/vfs_default.c
> >   head/sys/kern/vfs_init.c
> >   head/sys/kern/vfs_mount.c
> >   head/sys/sys/mount.h
> >   head/sys/sys/vnode.h
> >   head/sys/tools/vnode_if.awk
> >
>
> Unfortunately this broke amd(8).

I should have included this.

Oct 24 00:34:13 slippy amd[2741]: '/home': mount: Operation not 
supported
Oct 24 00:34:13 slippy amd[2742]: '/vol': mount: Operation not supported
Oct 24 00:34:13 slippy amd[2743]: '/net': mount: Operation not supported
Oct 24 00:34:14 slippy amd[2742]: '/vol': mount: Operation not supported
Oct 24 00:34:14 slippy amd[2741]: '/home': mount: Operation not 
supported
Oct 24 00:34:14 slippy amd[2742]: amfs_toplvl_mount: amfs_mount failed: 
Operation not supported


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339672 - in head/sys: fs/nfsclient kern sys tools

2018-10-24 Thread Cy Schubert
In message <201810232143.w9nlhfek087...@repo.freebsd.org>, Konstantin 
Belousov
writes:
> Author: kib
> Date: Tue Oct 23 21:43:41 2018
> New Revision: 339672
> URL: https://svnweb.freebsd.org/changeset/base/339672
>
> Log:
>   Only call sigdeferstop() for NFS.
>   
>   Use bypass to catch any NFS VOP dispatch and route it through the
>   wrapper which does sigdeferstop() and then dispatches original
>   VOP. NFS does not need a bypass below it, which is not supported.
>   
>   The vop offset in the vop_vector is added since otherwise it is
>   impossible to get vop_op_t from the internal table, and I did not
>   wanted to create the layered fs only to wrap NFS VOPs.
>   
>   VFS_OP()s wrap is straightforward.
>   
>   Requested and reviewed by:  mjg (previous version)
>   Tested by:  pho
>   Sponsored by:   The FreeBSD Foundation
>   Differential revision:  https://reviews.freebsd.org/D17658
>
> Modified:
>   head/sys/fs/nfsclient/nfs_clvnops.c
>   head/sys/kern/vfs_default.c
>   head/sys/kern/vfs_init.c
>   head/sys/kern/vfs_mount.c
>   head/sys/sys/mount.h
>   head/sys/sys/vnode.h
>   head/sys/tools/vnode_if.awk
>

Unfortunately this broke amd(8).


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"