2006-06-16 03:30:48

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH 0 / 1] Move NFS mount code from util-linux to nfs-utils - take2

On Monday June 12, [email protected] wrote:
>
>
> AG
> --
> May the source be with you.
> http://www.cis.ksu.edu/~gud
>
> Moves the NFS mount code out of util-linux to nfs-utils. The primary reason being ease of maintainability, and keeping util-linux away from all the filesystem-specifc worries.
>
> Adds a new directory 'mount' under utils. Creates a binary mount.nfs. Three symbolic links are created to this binary - mount.nfs4, umount.nfs and umount.nfs4. It is simpler and avoids code duplication (or overhead of fork->exec) by keeping umount code in a single binary along with the mount code. Mount code uses umount to handle certain fail cases. It also makes sense to keep single binary for all the versions of the NFS, as opposed to having seperate binaries mount.nfs and mount.nfs4, since the code falls back to lower version if mounting with v4 fails. Adds two man pages - mount.nfs(8) and umount.nfs(8).
>
> Patches are split into two parts:
> [1/2] nfsmount-migration-to-nfsutils-v2.patch
> [2/2] nfsmount-migration-to-nfsutils-support-v2.patch
>
> After applying the patches before configuring and compiling, do:
> $ rpcgen -c utils/mount/nfsmount.x > utils/mount/nfsmount_xdr.c
> $ rpcgen -h utils/mount/nfsmount.x > utils/mount/nfsmount.h
> $ sh autogen.sh

The 'rpcgen' should be done by the Makefile. I have added a patch
which does this.
However there are now two slightly different nfsmount.x files in the
tree

./support/export/mount.x
./utils/mount/nfsmount.x

If they could be unified (leave the one in support/export, but merge
in any changes you want from nfsmount.x) and then use the libexport.a
library to get the nfsmount_clnt.o etc, that would be really good.

You can see the current code at
git://linux-nfs.org/nfs-utils

Further patches against that would be great.

Also, it seems really odd that you need
./configure --without-mount
it you want it to compile the mount client.
Surely it should be --with-mount!!!
What is the reasoning there?

NeilBrown


_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2006-06-16 03:42:15

by Amit Gud

[permalink] [raw]
Subject: Re: [PATCH 0 / 1] Move NFS mount code from util-linux to nfs-utils - take2

Neil Brown wrote:
> On Monday June 12, [email protected] wrote:
>>
>> AG
>> --
>> May the source be with you.
>> http://www.cis.ksu.edu/~gud
>>
>> Moves the NFS mount code out of util-linux to nfs-utils. The primary reason being ease of maintainability, and keeping util-linux away from all the filesystem-specifc worries.
>>
>> Adds a new directory 'mount' under utils. Creates a binary mount.nfs. Three symbolic links are created to this binary - mount.nfs4, umount.nfs and umount.nfs4. It is simpler and avoids code duplication (or overhead of fork->exec) by keeping umount code in a single binary along with the mount code. Mount code uses umount to handle certain fail cases. It also makes sense to keep single binary for all the versions of the NFS, as opposed to having seperate binaries mount.nfs and mount.nfs4, since the code falls back to lower version if mounting with v4 fails. Adds two man pages - mount.nfs(8) and umount.nfs(8).
>>
>> Patches are split into two parts:
>> [1/2] nfsmount-migration-to-nfsutils-v2.patch
>> [2/2] nfsmount-migration-to-nfsutils-support-v2.patch
>>
>> After applying the patches before configuring and compiling, do:
>> $ rpcgen -c utils/mount/nfsmount.x > utils/mount/nfsmount_xdr.c
>> $ rpcgen -h utils/mount/nfsmount.x > utils/mount/nfsmount.h
>> $ sh autogen.sh
>
> The 'rpcgen' should be done by the Makefile. I have added a patch
> which does this.
> However there are now two slightly different nfsmount.x files in the
> tree
>
> ./support/export/mount.x
> ./utils/mount/nfsmount.x
>
> If they could be unified (leave the one in support/export, but merge
> in any changes you want from nfsmount.x) and then use the libexport.a
> library to get the nfsmount_clnt.o etc, that would be really good.

sounds good.

> You can see the current code at
> git://linux-nfs.org/nfs-utils
>
> Further patches against that would be great.
>
> Also, it seems really odd that you need
> ./configure --without-mount
> it you want it to compile the mount client.
> Surely it should be --with-mount!!!
> What is the reasoning there?

I went with the GNU Autoconf Manual ;),
http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html#SEC130,
which says --with-foo, when external program foo is to be used, and
--without-foo otherwise. But I know, it sounds rather odd. I think, I'II
change it to --with-mount.


AG
--
May the source be with you.
http://www.cis.ksu.edu/~gud



_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs