geom_io.c (38da0c96dc1b4698931f65d8d58e864dfc3a600e) | geom_io.c (ffc1cc95e78ec05a3e1a0aed869e33a44d9f6641) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2002 Poul-Henning Kamp 5 * Copyright (c) 2002 Networks Associates Technology, Inc. 6 * Copyright (c) 2013 The FreeBSD Foundation 7 * All rights reserved. 8 * --- 547 unchanged lines hidden (view full) --- 556 if (g_collectstats & G_STATS_PROVIDERS) 557 devstat_start_transaction_bio_t0(pp->stat, bp); 558#ifdef INVARIANTS 559 atomic_add_int(&cp->nstart, 1); 560#endif 561 562 direct = (cp->flags & G_CF_DIRECT_SEND) != 0 && 563 (pp->flags & G_PF_DIRECT_RECEIVE) != 0 && | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2002 Poul-Henning Kamp 5 * Copyright (c) 2002 Networks Associates Technology, Inc. 6 * Copyright (c) 2013 The FreeBSD Foundation 7 * All rights reserved. 8 * --- 547 unchanged lines hidden (view full) --- 556 if (g_collectstats & G_STATS_PROVIDERS) 557 devstat_start_transaction_bio_t0(pp->stat, bp); 558#ifdef INVARIANTS 559 atomic_add_int(&cp->nstart, 1); 560#endif 561 562 direct = (cp->flags & G_CF_DIRECT_SEND) != 0 && 563 (pp->flags & G_PF_DIRECT_RECEIVE) != 0 && |
564 !g_is_geom_thread(curthread) && | 564 curthread != g_down_td && |
565 ((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0 || 566 (bp->bio_flags & BIO_UNMAPPED) == 0 || THREAD_CAN_SLEEP()) && 567 pace == 0; 568 if (direct) { 569 /* Block direct execution if less then half of stack left. */ 570 size_t st, su; 571 GET_STACK_USAGE(st, su); 572 if (su * 2 > st) --- 75 unchanged lines hidden (view full) --- 648 /* 649 * XXX: next two doesn't belong here 650 */ 651 bp->bio_bcount = bp->bio_length; 652 bp->bio_resid = bp->bio_bcount - bp->bio_completed; 653 654 direct = (pp->flags & G_PF_DIRECT_SEND) && 655 (cp->flags & G_CF_DIRECT_RECEIVE) && | 565 ((pp->flags & G_PF_ACCEPT_UNMAPPED) != 0 || 566 (bp->bio_flags & BIO_UNMAPPED) == 0 || THREAD_CAN_SLEEP()) && 567 pace == 0; 568 if (direct) { 569 /* Block direct execution if less then half of stack left. */ 570 size_t st, su; 571 GET_STACK_USAGE(st, su); 572 if (su * 2 > st) --- 75 unchanged lines hidden (view full) --- 648 /* 649 * XXX: next two doesn't belong here 650 */ 651 bp->bio_bcount = bp->bio_length; 652 bp->bio_resid = bp->bio_bcount - bp->bio_completed; 653 654 direct = (pp->flags & G_PF_DIRECT_SEND) && 655 (cp->flags & G_CF_DIRECT_RECEIVE) && |
656 !g_is_geom_thread(curthread); | 656 curthread != g_up_td; |
657 if (direct) { 658 /* Block direct execution if less then half of stack left. */ 659 size_t st, su; 660 GET_STACK_USAGE(st, su); 661 if (su * 2 > st) 662 direct = 0; 663 } 664 --- 414 unchanged lines hidden --- | 657 if (direct) { 658 /* Block direct execution if less then half of stack left. */ 659 size_t st, su; 660 GET_STACK_USAGE(st, su); 661 if (su * 2 > st) 662 direct = 0; 663 } 664 --- 414 unchanged lines hidden --- |