svn commit: r231929 - head/sys/geom/part

Andrey V. Elsukov ae at FreeBSD.org
Mon Feb 20 06:35:53 UTC 2012


Author: ae
Date: Mon Feb 20 06:35:52 2012
New Revision: 231929
URL: http://svn.freebsd.org/changeset/base/231929

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

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

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Mon Feb 20 05:48:57 2012	(r231928)
+++ head/sys/geom/part/g_part.c	Mon Feb 20 06:35:52 2012	(r231929)
@@ -2113,9 +2113,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