+2003-09-16 Ion Badulescu <ionut@moisil.badula.org>
+
+ * NEWS: webnfs support
+
+ * amd/srvr_nfs.c (find_nfs_srvr): set MFF_WEBNFS if the "webnfs"
+ (former "ignore_portmapper") mount option is present
+
+ * amd/ops_nfs.c (prime_nfs_fhandle_cache): generate a public
+ filehandle (all zeros) if MFF_WEBNFS is set
+ (nfs_umounted): don't talk to mountd if MFF_WEBNFS is set
+
+ * amd/amd.h (MFF_WEBNFS): new flag, obvious meaning
+
2003-09-13 Ion Badulescu <ionut@moisil.badula.org>
* amd/srvr_nfs.c: renamed np_xid to global_xid; sanitized the
- speed up the recovery of inherited (restarted) filesystems by using the
proper waiting channels
+- added support for mounting webnfs filesystems, see entry below. It doesn't
+ do any probing currently, so it will default to v2/UDP unless another
+ version and/or protocol is explicitly specified.
+
+- pseudo-mount option "ignore_portmapper" renamed to "webnfs"
+
- bugs fixed:
* properly time out autofs filesystems on Linux
* link mounts with relative targets weren't working on autofs
* SUCH DAMAGE.
*
*
- * $Id: amd.h,v 1.45 2003/09/13 23:07:56 ib42 Exp $
+ * $Id: amd.h,v 1.46 2003/09/16 04:14:37 ib42 Exp $
*
*/
#define MFF_IS_AUTOFS 0x0400 /* this filesystem is of type autofs */
#define MFF_NFS_SCALEDOWN 0x0800 /* the mount failed, retry with v2/UDP */
#define MFF_ON_AUTOFS 0x1000 /* autofs has a lofs/link to this f/s */
+#define MFF_WEBNFS 0x2000 /* use public filehandle */
/*
* macros for struct fserver.
* SUCH DAMAGE.
*
*
- * $Id: ops_nfs.c,v 1.30 2003/09/13 23:07:56 ib42 Exp $
+ * $Id: ops_nfs.c,v 1.31 2003/09/16 04:14:37 ib42 Exp $
*
*/
fp->fh_fs = dup_srvr(fs);
fp->fh_path = strdup(path);
+ if (mf->mf_flags & MFF_WEBNFS) {
+ dlog("Using public filehandle for '%s'", mf->mf_info);
+ memset(&fp->fh_nfs_handle, 0, sizeof(fp->fh_nfs_handle));
+ if (fhbuf) {
+#ifdef HAVE_FS_NFS3
+ if (fp->fh_nfs_version == NFS_VERSION3)
+ memmove((voidp) &(fhbuf->v3), (voidp) &(fp->fh_nfs_handle.v3),
+ sizeof(fp->fh_nfs_handle.v3));
+ else
+#endif /* HAVE_FS_NFS3 */
+ memmove((voidp) &(fhbuf->v2), (voidp) &(fp->fh_nfs_handle.v2),
+ sizeof(fp->fh_nfs_handle.v2));
+ }
+ wakeup(get_mntfs_wchan(mf));
+ fp->fh_error = 0;
+ return 0;
+ }
+
error = call_mountd(fp, MOUNTPROC_MNT, got_nfs_fh, get_mntfs_wchan(mf));
if (error) {
/*
if (mf->mf_error || mf->mf_refc > 1)
return;
- fs = mf->mf_server;
+ if (mf->mf_flags & MFF_WEBNFS)
+ return;
/*
* Call the mount daemon on the server to announce that we are not using
* flushed from the cache, and a reference held to the cached entry while
* the fs is mounted...
*/
+ fs = mf->mf_server;
colon = path = strchr(mf->mf_info, ':');
if (fs && colon) {
fh_cache f;
* SUCH DAMAGE.
*
*
- * $Id: srvr_nfs.c,v 1.29 2003/09/13 23:07:57 ib42 Exp $
+ * $Id: srvr_nfs.c,v 1.30 2003/09/16 04:14:37 ib42 Exp $
*
*/
#endif /* not HAVE_FS_NFS3 */
- if (amu_hasmntopt(&mnt, "ignore_portmapper")) {
- plog(XLOG_INFO, "ignore_portmapper option used, NOT contacting the portmapper on %s", host);
+ if (amu_hasmntopt(&mnt, "webnfs")) {
+ plog(XLOG_INFO, "webnfs option used, NOT contacting the portmapper on %s", host);
+ mf->mf_flags |= MFF_WEBNFS;
if (!nfs_version) {
plog(XLOG_INFO, "No NFS version specified, will use NFSv2");
nfs_version = NFS_VERSION;