From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>,
"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 11:10:42 -0600 [thread overview]
Message-ID: <8ed8898b-0776-fb58-2003-aefe9875a746@kernel.dk> (raw)
In-Reply-To: <69b72109-a488-e0c2-3f8a-0fff917e66dd@acm.org>
On 10/5/21 11:04 AM, Bart Van Assche wrote:
> 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 */
True, might be a leftover from some other experimentation. Looks like we
can just ignore that patch.
--
Jens Axboe
prev parent reply other threads:[~2021-10-05 17:10 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
2021-10-05 17:10 ` Jens Axboe [this message]
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=8ed8898b-0776-fb58-2003-aefe9875a746@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--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