summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2020-03-01 03:21:54 +0000
committerriastradh <riastradh@NetBSD.org>2020-03-01 03:21:54 +0000
commitec128796eaa40ec78f60767398299f4b9afb0927 (patch)
tree3d434679858006ea8834722534e820903d900a29 /sys/dev/raidframe
parent8380b245c96ac401f70286cf41ac6290af0b364d (diff)
Add a flag to dk_dump for virtual disk devices.
If a disk is backed by a physical medium other than itself, such as cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion detection for dk_dump. If, however, a device represents a physical medium on its own, such as wd(4), then it passes 0 instead. With this, I can now dump to dk on cgd on dk on wd.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 5379f5e7990..f8886f8ebb0 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.379 2019/11/10 21:16:37 chs Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.380 2020/03/01 03:21:54 riastradh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * from: Utah $Hdr: cd.c 1.6 90/11/28$
+ * from: Utah $Hdr$
*
* @(#)cd.c 8.2 (Berkeley) 11/16/93
*/
@@ -101,7 +101,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.379 2019/11/10 21:16:37 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.380 2020/03/01 03:21:54 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_raid_autoconfig.h"
@@ -662,7 +662,7 @@ raiddump(dev_t dev, daddr_t blkno, void *va, size_t size)
*/
blkno += RF_PROTECTED_SECTORS;
- return dk_dump(dksc, dev, blkno, va, size);
+ return dk_dump(dksc, dev, blkno, va, size, DK_DUMP_RECURSIVE);
}
static int