summaryrefslogtreecommitdiffstats
path: root/sys/sys/conf.h
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2013-03-26 01:17:06 +0000
committerkan <kan@FreeBSD.org>2013-03-26 01:17:06 +0000
commit49a21b7c2ed9406dd08968495779c6ccfb4a58a5 (patch)
tree97acd52c556902a1cf5531fa13b5cc13c206e064 /sys/sys/conf.h
parent5304ecc65d409e90546f56cdb991b203f74e8d38 (diff)
downloadFreeBSD-src-49a21b7c2ed9406dd08968495779c6ccfb4a58a5.zip
FreeBSD-src-49a21b7c2ed9406dd08968495779c6ccfb4a58a5.tar.gz
Do not pass unmapped buffers to drivers that cannot handle them
In physio, check if device can handle unmapped IO and pass an appropriately mapped buffer to the driver strategy routine. The only driver in the tree that can handle unmapped buffers is one exposed by GEOM, so mark it as such with the new flag in the driver cdevsw structure. This fixes insta-panics on hosts, running dconschat, as /dev/fwmem is an example of the driver that makes use of physio routine, but bypasses the g_down thread, where the buffer gets mapped normally. Discussed with: kib (earlier version)
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r--sys/sys/conf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index e818722..8d53839 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -167,6 +167,7 @@ typedef int dumper_t(
#define D_MMAP_ANON 0x00100000 /* special treatment in vm_mmap.c */
#define D_NEEDGIANT 0x00400000 /* driver want Giant */
#define D_NEEDMINOR 0x00800000 /* driver uses clone_create() */
+#define D_UNMAPPED_IO 0x01000000 /* d_strategy can accept unmapped IO */
/*
* Version numbers.
OpenPOWER on IntegriCloud