Skip to content
Browse files

Do not declare that preloaded md(4) supports unmapped bio requests, it

does not.

Reported by:	<mh@kernel32.de>
Sponsored by:	The FreeBSD Foundation
  • Loading branch information...
1 parent 65d6e2c commit 4b74a4a19096550736eef03ae63162039a83d0bd @kostikbel kostikbel committed Apr 2, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 sys/dev/md/md.c
View
10 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);

0 comments on commit 4b74a4a

Please sign in to comment.
Something went wrong with that request. Please try again.