diff options
author | kib <kib@FreeBSD.org> | 2013-04-02 19:39:31 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-04-02 19:39:31 +0000 |
commit | 4b74a4a19096550736eef03ae63162039a83d0bd (patch) | |
tree | ce0750fa4f7c1f1b86171db9ec66c08e3a480280 | |
parent | 65d6e2cf04f600a82865a903278b095aa7e70b6b (diff) | |
download | FreeBSD-src-4b74a4a19096550736eef03ae63162039a83d0bd.zip FreeBSD-src-4b74a4a19096550736eef03ae63162039a83d0bd.tar.gz |
Do not declare that preloaded md(4) supports unmapped bio requests, it
does not.
Reported by: <mh@kernel32.de>
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | sys/dev/md/md.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index d32ddb3..e871d8f 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -1008,7 +1008,15 @@ mdinit(struct md_s *sc) pp = g_new_providerf(gp, "md%d", sc->unit); pp->mediasize = sc->mediasize; pp->sectorsize = sc->sectorsize; - pp->flags |= G_PF_ACCEPT_UNMAPPED; + switch (sc->type) { + case MD_MALLOC: + case MD_VNODE: + case MD_SWAP: + pp->flags |= G_PF_ACCEPT_UNMAPPED; + break; + case MD_PRELOAD: + break; + } sc->gp = gp; sc->pp = pp; g_error_provider(pp, 0); |