Subject: Re: dump bug?
To: None <netbsd-help@NetBSD.ORG, current-users@NetBSD.ORG>
From: Brook Milligan <brook@trillium.NMSU.Edu>
List: current-users
Date: 01/14/1997 14:46:18
   QUESTION:  Is there a reason for dump to construct its data structure
   representing /etc/fstab in reverse order?

   Have I missed something obvious here?

I should have realized what I was missing (but a question still
remains).  Of course, the last /etc/fstab entry is the one most
recently mounted and therefore the one in use and to be backed up.
Hence the reverse order linked list.  OK.

But, shouldn't union mounts be disregarded altogether since they are
only namespace manipulations and not actual device mounts?  I.e.,
shouldn't dump skip over union mounts in constructing its internal
version of /etc/fstab so that it only matches "real" filesystem
entries?

Now what am I missing?

One patch to skip union mounts is the following:

*** ./src/sbin/dump/optr.c.orig Sat May 18 10:16:17 1996
--- ./src/sbin/dump/optr.c      Tue Jan 14 14:29:46 1997
***************
*** 444,449 ****
--- 444,451 ----
                    strcmp(fs->fs_type, FSTAB_RO) &&
                    strcmp(fs->fs_type, FSTAB_RQ))
                        continue;
+               if (strcmp(fs->fs_vfstype, "union") == 0)
+                       continue;
                fs = allocfsent(fs);
                if ((pf = (struct pfstab *)malloc(sizeof (*pf))) == NULL)
                        quit("%s\n", strerror(errno));

Thanks again for your help.

Cheers,
Brook