The condition to use direct processing for the unmapped bio is

reverted.  We can do direct processing when g_io_check() does not need
to perform transient remapping of the bio, otherwise the thread has to
sleep.

Reviewed by:	mav (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2015-08-07 08:13:34 +00:00
parent b47f904d8f
commit 9b34965019
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286404

View file

@ -520,8 +520,8 @@ g_io_request(struct bio *bp, struct g_consumer *cp)
direct = (cp->flags & G_CF_DIRECT_SEND) &&
(pp->flags & G_PF_DIRECT_RECEIVE) &&
!g_is_geom_thread(curthread) &&
(((pp->flags & G_PF_ACCEPT_UNMAPPED) == 0 &&
(bp->bio_flags & BIO_UNMAPPED) != 0) || THREAD_CAN_SLEEP());
((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0 ||
(bp->bio_flags & BIO_UNMAPPED) == 0 || THREAD_CAN_SLEEP());
if (direct) {
/* Block direct execution if less then half of stack left. */
size_t st, su;