svn commit: r235074 - stable/8/sys/geom/part

Doug Barton dougb at FreeBSD.org
Sun May 6 08:31:57 UTC 2012


Author: dougb
Date: Sun May  6 08:31:57 2012
New Revision: 235074
URL: http://svn.freebsd.org/changeset/base/235074

Log:
  MFC r231929:
  
  If nested scheme allows dump kernel to its partition, we may allow
  dump for the parent partition too.

Modified:
  stable/8/sys/geom/part/g_part.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/geom/part/g_part.c
==============================================================================
--- stable/8/sys/geom/part/g_part.c	Sun May  6 08:28:08 2012	(r235073)
+++ stable/8/sys/geom/part/g_part.c	Sun May  6 08:31:57 2012	(r235074)
@@ -2048,9 +2048,12 @@ g_part_start(struct bio *bp)
 			/*
 			 * Check that the partition is suitable for kernel
 			 * dumps. Typically only swap partitions should be
-			 * used.
+			 * used. If the request comes from the nested scheme
+			 * we allow dumping there as well.
 			 */
-			if (!G_PART_DUMPTO(table, entry)) {
+			if ((bp->bio_from == NULL ||
+			    bp->bio_from->geom->class != &g_part_class) &&
+			    G_PART_DUMPTO(table, entry) == 0) {
 				g_io_deliver(bp, ENODEV);
 				printf("GEOM_PART: Partition '%s' not suitable"
 				    " for kernel dumps (wrong type?)\n",


More information about the svn-src-all mailing list