Bug 116849 - [patch] dump(8) fails to dump UFS filesystems when nullfs filesyste present
Summary: [patch] dump(8) fails to dump UFS filesystems when nullfs filesyste present
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-03 02:00 UTC by Cy Schubert
Modified: 2009-03-02 04:20 UTC (History)
0 users

See Also:


Attachments
file.diff (529 bytes, patch)
2007-10-03 02:00 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer freebsd_triage 2007-10-03 02:00:03 UTC
Example fstab:

/dev/ad3s1g             /dsk01          ufs     rw 1 2
    [...]
/dsk01                  /stable5/dsk01          nullfs  rw,noauto 0 0

# dump 0f /dev/null /dsk01
dump: unknown filesystem /dsk01
#

How-To-Repeat: See above
Comment 1 shurd 2009-02-28 00:03:53 UTC
Still there in 7.1 and there's a patch... ping?
Comment 2 Cy Schubert 2009-02-28 15:52:08 UTC
In message <1BB65751E91EA64EA8436124B779A8BC3FA05F1EA2@IRVEXCHCCR01.corp.ad.
bro
adcom.com>, "Stephen Hurd" writes:
> Still there in 7.1 and there's a patch... ping?

No one has picked this PR up. As I'm a ports committer, not a src 
committer, I'll need to find someone to champion this for us for find 
someone to mentor me in the src tree.


-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

			e**(i*pi)+1=0
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2009-03-02 02:52:00 UTC
Responsible Changed
From-To: freebsd-bugs->cy-bugs

kib has given me approval to commit this.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2009-03-02 02:57:52 UTC
Responsible Changed
From-To: cy-bugs->cy

Fix typo as to my id from from cy-bugs to cy.
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2009-03-02 03:09:00 UTC
State Changed
From-To: open->closed

Committed with the approval of kib.
Comment 6 dfilter service freebsd_committer freebsd_triage 2009-03-02 03:09:02 UTC
Author: cy (ports committer)
Date: Mon Mar  2 03:08:46 2009
New Revision: 189267
URL: http://svn.freebsd.org/changeset/base/189267

Log:
  Verify that the filesystem being referenced in fstab is indeed a UFS
  filesystem. This avoids confusion with nullfs and unionfs filesystems
  which reference the root of a UFS filesystem as a target.
  
  PR:		116849
  Approved by:	kib

Modified:
  head/sbin/dump/optr.c

Modified: head/sbin/dump/optr.c
==============================================================================
--- head/sbin/dump/optr.c	Mon Mar  2 02:51:52 2009	(r189266)
+++ head/sbin/dump/optr.c	Mon Mar  2 03:08:46 2009	(r189267)
@@ -318,9 +318,10 @@ dump_getfstab(void)
 		return;
 	}
 	while ((fs = getfsent()) != NULL) {
-		if (strcmp(fs->fs_type, FSTAB_RW) &&
+		if ((strcmp(fs->fs_type, FSTAB_RW) &&
 		    strcmp(fs->fs_type, FSTAB_RO) &&
-		    strcmp(fs->fs_type, FSTAB_RQ))
+		    strcmp(fs->fs_type, FSTAB_RQ)) ||
+		    strcmp(fs->fs_vfstype, "ufs"))
 			continue;
 		fs = allocfsent(fs);
 		if ((pf = (struct pfstab *)malloc(sizeof (*pf))) == NULL)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 Cy Schubert 2009-03-02 04:10:15 UTC
In message <1BB65751E91EA64EA8436124B779A8BC3FA05F1EA2@IRVEXCHCCR01.corp.ad.
bro
adcom.com>, "Stephen Hurd" writes:
> Still there in 7.1 and there's a patch... ping?

Hi Stephen,

I've committed the patch to head (8.0-CURRENT) with the permission of kib@. I expect it to mature there for a while before it's merged into stable/7.

Thanks for reminding us of the patch. Even though I've had it running on my systems since October 2007 and as I use an automated patch application script during my build process here at home and at work, I forgot about it (that's how well my automated patch script works -- fire and forget kind of thing). Anyhow, it's in.


-- 
Cheers,
Cy Schubert <Cy.Schubert@komquats.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

			e**(i*pi)+1=0