sparc64/161764: [patch] Support dumping to Solaris swap partitions

Peter Jeremy peterjeremy at acm.org
Tue Oct 18 09:00:24 UTC 2011


>Number:         161764
>Category:       sparc64
>Synopsis:       [patch] Support dumping to Solaris swap partitions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-sparc64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 18 09:00:22 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 10-CURRENT sparc64
>Organization:
n/a
>Environment:
System: FreeBSD [10-current r226167 - full details not immediately available]

>Description:
	FreeBSD currently only allows dumping onto either unused or
	FreeBSD swap partitions.  Where systems are shared between
	FreeBSD and Solaris, it makes sense to allow both OSs to share
	common swap partitions.  FreeBSD already allows swapping onto
	Solaris swap partitions - it just refuses to allow crashdumps.
	The attached patch fixes this.

>How-To-Repeat:
	Attempt to dumpon(8) a Solaris swap partition.  Kernel reports:
GEOM_PART: Partition 'da0b' not suitable for kernel dumps (wrong type?)

>Fix:

Index: sys/geom/part/g_part_vtoc8.c
===================================================================
RCS file: /usr/ncvs/src/sys/geom/part/g_part_vtoc8.c,v
retrieving revision 1.12
diff -u -r1.12 g_part_vtoc8.c
--- sys/geom/part/g_part_vtoc8.c	8 May 2011 12:28:13 -0000	1.12
+++ sys/geom/part/g_part_vtoc8.c	17 Oct 2011 01:27:27 -0000
@@ -274,7 +274,8 @@
 	 */
 	table = (struct g_part_vtoc8_table *)basetable;
 	tag = be16dec(&table->vtoc.part[entry->gpe_index - 1].tag);
-	return ((tag == 0 || tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0);
+	return ((tag == 0 || tag == VTOC_TAG_SWAP ||
+		tag == VTOC_TAG_FREEBSD_SWAP) ? 1 : 0);
 }
 
 static int



>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-sparc64 mailing list