From owner-svn-src-stable@FreeBSD.ORG Mon Mar 5 04:53:49 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D771065674; Mon, 5 Mar 2012 04:53:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE4988FC12; Mon, 5 Mar 2012 04:53:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254rnoA067565; Mon, 5 Mar 2012 04:53:49 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254rnEx067563; Mon, 5 Mar 2012 04:53:49 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203050453.q254rnEx067563@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 5 Mar 2012 04:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232536 - stable/9/sys/geom/part X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 04:53:49 -0000 Author: ae Date: Mon Mar 5 04:53:49 2012 New Revision: 232536 URL: http://svn.freebsd.org/changeset/base/232536 Log: MFC r231929: If nested scheme allows dump kernel to its partition, we may allow dump for the parent partition too. Modified: stable/9/sys/geom/part/g_part.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Mon Mar 5 04:51:22 2012 (r232535) +++ stable/9/sys/geom/part/g_part.c Mon Mar 5 04:53:49 2012 (r232536) @@ -2112,9 +2112,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",