Bug 161764 - [patch] Support dumping to Solaris swap partitions
Summary: [patch] Support dumping to Solaris swap partitions
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: sparc64 (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marius Strobl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 10:00 UTC by Peter Jeremy
Modified: 2011-10-30 12:44 UTC (History)
0 users

See Also:


Attachments
file.diff (645 bytes, patch)
2011-10-18 10:00 UTC, Peter Jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jeremy 2011-10-18 10:00:22 UTC
	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?)
Comment 1 dfilter service freebsd_committer freebsd_triage 2011-10-18 21:16:15 UTC
Author: marius
Date: Tue Oct 18 20:16:02 2011
New Revision: 226522
URL: http://svn.freebsd.org/changeset/base/226522

Log:
  Allow to dump on Solaris swap partitions.
  
  PR:		161764
  Submitted by:	Peter Jeremy

Modified:
  head/sys/geom/part/g_part_vtoc8.c

Modified: head/sys/geom/part/g_part_vtoc8.c
==============================================================================
--- head/sys/geom/part/g_part_vtoc8.c	Tue Oct 18 18:52:22 2011	(r226521)
+++ head/sys/geom/part/g_part_vtoc8.c	Tue Oct 18 20:16:02 2011	(r226522)
@@ -274,7 +274,8 @@ g_part_vtoc8_dumpto(struct g_part_table 
 	 */
 	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_FREEBSD_SWAP ||
+	    tag == VTOC_TAG_SWAP) ? 1 : 0);
 }
 
 static int
_______________________________________________
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 2 Eitan Adler freebsd_committer freebsd_triage 2011-10-19 02:26:32 UTC
State Changed
From-To: open->patched

fix committed in head 


Comment 3 Eitan Adler freebsd_committer freebsd_triage 2011-10-19 02:26:32 UTC
Responsible Changed
From-To: freebsd-sparc64->marius

fix committed in head
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-10-30 12:23:19 UTC
Author: marius
Date: Sun Oct 30 12:23:00 2011
New Revision: 226934
URL: http://svn.freebsd.org/changeset/base/226934

Log:
  MFC: r226522
  
  Allow to dump on Solaris swap partitions.
  
  PR:		161764
  Submitted by:	Peter Jeremy
  Approved by:	re (kib)

Modified:
  stable/9/sys/geom/part/g_part_vtoc8.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/geom/part/g_part_vtoc8.c
==============================================================================
--- stable/9/sys/geom/part/g_part_vtoc8.c	Sun Oct 30 12:11:12 2011	(r226933)
+++ stable/9/sys/geom/part/g_part_vtoc8.c	Sun Oct 30 12:23:00 2011	(r226934)
@@ -274,7 +274,8 @@ g_part_vtoc8_dumpto(struct g_part_table 
 	 */
 	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_FREEBSD_SWAP ||
+	    tag == VTOC_TAG_SWAP) ? 1 : 0);
 }
 
 static int
_______________________________________________
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 5 dfilter service freebsd_committer freebsd_triage 2011-10-30 12:23:24 UTC
Author: marius
Date: Sun Oct 30 12:23:04 2011
New Revision: 226935
URL: http://svn.freebsd.org/changeset/base/226935

Log:
  MFC: r226522
  
  Allow to dump on Solaris swap partitions.
  
  PR:		161764
  Submitted by:	Peter Jeremy

Modified:
  stable/8/sys/geom/part/g_part_vtoc8.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/geom/part/g_part_vtoc8.c
==============================================================================
--- stable/8/sys/geom/part/g_part_vtoc8.c	Sun Oct 30 12:23:00 2011	(r226934)
+++ stable/8/sys/geom/part/g_part_vtoc8.c	Sun Oct 30 12:23:04 2011	(r226935)
@@ -271,7 +271,8 @@ g_part_vtoc8_dumpto(struct g_part_table 
 	 */
 	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_FREEBSD_SWAP ||
+	    tag == VTOC_TAG_SWAP) ? 1 : 0);
 }
 
 static int
_______________________________________________
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 6 dfilter service freebsd_committer freebsd_triage 2011-10-30 12:23:40 UTC
Author: marius
Date: Sun Oct 30 12:23:06 2011
New Revision: 226936
URL: http://svn.freebsd.org/changeset/base/226936

Log:
  MFC: r226522
  
  Allow to dump on Solaris swap partitions.
  
  PR:		161764
  Submitted by:	Peter Jeremy

Modified:
  stable/7/sys/geom/part/g_part_vtoc8.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/geom/part/g_part_vtoc8.c
==============================================================================
--- stable/7/sys/geom/part/g_part_vtoc8.c	Sun Oct 30 12:23:04 2011	(r226935)
+++ stable/7/sys/geom/part/g_part_vtoc8.c	Sun Oct 30 12:23:06 2011	(r226936)
@@ -272,7 +272,8 @@ g_part_vtoc8_dumpto(struct g_part_table 
 	 */
 	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_FREEBSD_SWAP ||
+	    tag == VTOC_TAG_SWAP) ? 1 : 0);
 }
 
 static int
_______________________________________________
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 Marius Strobl freebsd_committer freebsd_triage 2011-10-30 12:43:56 UTC
State Changed
From-To: patched->closed

close