From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH] block: don't call should_fail_request() for !CONFIG_FAIL_MAKE_REQUEST
Date: Tue, 5 Oct 2021 10:04:24 -0700 [thread overview]
Message-ID: <69b72109-a488-e0c2-3f8a-0fff917e66dd@acm.org> (raw)
In-Reply-To: <50093280-104b-545a-c4c9-2fc3efd45520@kernel.dk>
On 10/5/21 8:32 AM, Jens Axboe wrote:
> Unnecessary function call, if we don't have that specific configuration
> option enabled.
>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> ---
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 5454db2fa263..a267f11f55cb 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -697,8 +697,10 @@ static inline bool bio_check_ro(struct bio *bio)
>
> static noinline int should_fail_bio(struct bio *bio)
> {
> +#ifdef CONFIG_FAIL_MAKE_REQUEST
> if (should_fail_request(bdev_whole(bio->bi_bdev), bio->bi_iter.bi_size))
> return -EIO;
> +#endif
> return 0;
> }
> ALLOW_ERROR_INJECTION(should_fail_bio, ERRNO);
Has the performance impact of this patch been measured? I'm asking because I
found the following in blk-core.c:
#ifdef CONFIG_FAIL_MAKE_REQUEST
[ ... ]
#else /* CONFIG_FAIL_MAKE_REQUEST */
static inline bool should_fail_request(struct block_device *part,
unsigned int bytes)
{
return false;
}
#endif /* CONFIG_FAIL_MAKE_REQUEST */
Thanks,
Bart.
next prev parent reply other threads:[~2021-10-05 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 15:32 [PATCH] block: don't call should_fail_request() for !CONFIG_FAIL_MAKE_REQUEST Jens Axboe
2021-10-05 17:04 ` Bart Van Assche [this message]
2021-10-05 17:10 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69b72109-a488-e0c2-3f8a-0fff917e66dd@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox