diff options
author | ae <ae@FreeBSD.org> | 2012-02-20 06:35:52 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2012-02-20 06:35:52 +0000 |
commit | d92d49e46ff76221696726808ab335f46d55247b (patch) | |
tree | 9f5f48cb80154fca7d073ad22dfbd726db876698 /sys/geom | |
parent | db69f3b1ae4d02428f02a7600eba04dc11988edd (diff) | |
download | FreeBSD-src-d92d49e46ff76221696726808ab335f46d55247b.zip FreeBSD-src-d92d49e46ff76221696726808ab335f46d55247b.tar.gz |
If nested scheme allows dump kernel to its partition, we may allow
dump for the parent partition too.
MFC after: 2 weeks
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/part/g_part.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index b183e14..dd4d1a8b4 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -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", |