diff options
author | kan <kan@FreeBSD.org> | 2013-03-26 01:17:06 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2013-03-26 01:17:06 +0000 |
commit | 49a21b7c2ed9406dd08968495779c6ccfb4a58a5 (patch) | |
tree | 97acd52c556902a1cf5531fa13b5cc13c206e064 /sys/geom | |
parent | 5304ecc65d409e90546f56cdb991b203f74e8d38 (diff) | |
download | FreeBSD-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/geom')
-rw-r--r-- | sys/geom/geom_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 0a74ee1..81dfd9f 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -78,7 +78,7 @@ static struct cdevsw g_dev_cdevsw = { .d_ioctl = g_dev_ioctl, .d_strategy = g_dev_strategy, .d_name = "g_dev", - .d_flags = D_DISK | D_TRACKCLOSE, + .d_flags = D_DISK | D_TRACKCLOSE | D_UNMAPPED_IO, }; static g_taste_t g_dev_taste; |