freebsd problems and newwalk() problem & solution

Assar Westerlund assar at sics.se
Mon Jul 13 16:58:26 CEST 1998


"Alec Wolman" <wolman at cs.washington.edu> writes:
> I'm trying to setup arla-0.7.2 with a FreeBSD 2.2.6 system.
> I can't seem to get through the INSTALL directions.  The first
> problem I ran into is that when I use the modload command to install
> the xfs module, it doesn't tell me what the major device number
> is.  I fixed that problem (I've appended my one-line patch below),
> but I still get an error when I attempt to mount the afs filesystem.

You should get that output on your console (and in your
/var/log/messages), do you?

> miles# /usr/arla/bin/mount_xfs /dev/xfs0 /afs
> mount_xfs: mount: Operation not supported by device

This can be due to a number of reasons, the most common being using
the wrong major number for /dev/xfs0.  Have you double-checked that
it's correct?

Otherwise, I suggest applying the appended patch and see if it gives
you any better hint as to what could be wrong.

> Also, a while back I reported a problem with using arlad in test mode.
> I finally got around to fixing the newwalk() routine so that it
> works much better now.  Here is my patch:

Thanks for your patch.  I have installed it.

/assar


Index: xfs/bsd/xfs_vfsops.c
===================================================================
RCS file: /usr/local/cvsroot/arla/xfs/bsd/xfs_vfsops.c,v
retrieving revision 1.15
diff -u -w -u -w -r1.15 xfs_vfsops.c
--- xfs_vfsops.c	1998/04/19 06:09:12	1.15
+++ xfs_vfsops.c	1998/07/13 14:47:42
@@ -90,6 +90,7 @@
     devvp = ndp->ni_vp;
 
     if (devvp->v_type != VCHR) {
+	XFSDEB(XDEBVFOPS, ("xfs_mount: %s not a cdev\n", data));
 	vput(devvp);
 	return ENXIO;
     }
@@ -102,17 +103,27 @@
     vput(devvp);
 
     /* Check that this device really is an xfs_dev */
-    if (major(dev) < 0 || nchrdev < major(dev))
+    if (major(dev) < 0 || nchrdev < major(dev)) {
+	XFSDEB(XDEBVFOPS, ("xfs_mount: bad major: %u [0,%u)\n",
+			   major(dev), nchrdev));
 	return ENXIO;
-    if (minor(dev) < 0 || NXFS < minor(dev))
+    }
+    if (minor(dev) < 0 || NXFS < minor(dev)) {
+	XFSDEB(XDEBVFOPS, ("xfs_mount: bad minor: %u [0,%u)\n",
+			   minor(dev), NXFS));
 	return ENXIO;
+    }
 #if defined(__NetBSD__) || defined(__OpenBSD__)
-    if (cdevsw[major(dev)].d_open != xfs_devopen)
+    if (cdevsw[major(dev)].d_open != xfs_devopen) {
+	XFSDEB(XDEBVFOPS, ("xfs_mount: not xfs dev_open\n"));
 	return ENXIO;
+    }
 #elif defined(__FreeBSD__)
     if (cdevsw[major(dev)] == NULL
-	|| cdevsw[major(dev)]->d_open != xfs_devopen)
+	|| cdevsw[major(dev)]->d_open != xfs_devopen) {
+	XFSDEB(XDEBVFOPS, ("xfs_mount: not xfs dev_open\n"));
 	return ENXIO;
+    }
 #endif
 
     if (xfs[minor(dev)].status & XFS_MOUNTED)





More information about the Arla-drinkers mailing list