public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: "song@kernel.org" <song@kernel.org>,
	"yukuai@fnnas.com" <yukuai@fnnas.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"hch@lst.de" <hch@lst.de>,
	Chaitanya Kulkarni <ckulkarnilinux@gmail.com>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH V3 2/6] md: ignore discard return value
Date: Sat, 24 Jan 2026 21:29:40 +0000	[thread overview]
Message-ID: <b89bfaa5-a7fc-434f-8cc1-afb4dc317f6d@nvidia.com> (raw)
In-Reply-To: <938be45c-dcd9-45ba-b6ba-0fd29b0815db@nvidia.com>

On 11/30/25 22:22, Chaitanya Kulkarni wrote:
> Hi Song Liu and Yu Kuai,
>
> On 11/24/25 15:48, Chaitanya Kulkarni wrote:
>> __blkdev_issue_discard() always returns 0, making all error checking at
>> call sites dead code.
>>
>> Simplify md to only check !discard_bio by ignoring the
>> __blkdev_issue_discard() value.
>>
>> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
>> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>> Signed-off-by: Chaitanya Kulkarni <ckulkarnilinux@gmail.com>
>> ---
>>   drivers/md/md.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/md/md.c b/drivers/md/md.c
>> index 7b5c5967568f..aeb62df39828 100644
>> --- a/drivers/md/md.c
>> +++ b/drivers/md/md.c
>> @@ -9132,8 +9132,8 @@ void md_submit_discard_bio(struct mddev *mddev, 
>> struct md_rdev *rdev,
>>   {
>>       struct bio *discard_bio = NULL;
>>   -    if (__blkdev_issue_discard(rdev->bdev, start, size, GFP_NOIO,
>> -            &discard_bio) || !discard_bio)
>> +    __blkdev_issue_discard(rdev->bdev, start, size, GFP_NOIO, 
>> &discard_bio);
>> +    if (!discard_bio)
>>           return;
>>         bio_chain(discard_bio, bio);
>
>
> Gentle ping on this.
>
> -ck
>
>
Hi Song Liu and Yu Kuai,

Just pulled latest changes I don't see this patch been applied [1].
Unless my git repo is messed up.

Can you please provide review comments and let me know the blocker ?

-ck

  9169 /* This is used by raid0 and raid10 */
  9170 void md_submit_discard_bio(struct mddev *mddev, struct md_rdev *rdev,
  9171                         struct bio *bio, sector_t start, sector_t size)
  9172 {
  9173         struct bio *discard_bio = NULL;
  9174
  9175         if (__blkdev_issue_discard(rdev->bdev, start, size, GFP_NOIO,
  9176                         &discard_bio) || !discard_bio)
  9177                 return;
  9178
  9179         bio_chain(discard_bio, bio);
  9180         bio_clone_blkg_association(discard_bio, bio);
  9181         mddev_trace_remap(mddev, discard_bio, bio->bi_iter.bi_sector);
  9182         submit_bio_noacct(discard_bio);
  9183 }
  9184 EXPORT_SYMBOL_GPL(md_submit_discard_bio);



  reply	other threads:[~2026-01-24 21:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 23:48 [PATCH V3 0/6] block: ignore __blkdev_issue_discard() ret value Chaitanya Kulkarni
2025-11-24 23:48 ` [PATCH V3 1/6] block: ignore discard return value Chaitanya Kulkarni
2025-11-25 17:38   ` Jens Axboe
2025-11-25 19:09     ` Chaitanya Kulkarni
2025-11-25 19:19       ` Jens Axboe
2025-11-24 23:48 ` [PATCH V3 2/6] md: " Chaitanya Kulkarni
2025-12-01  6:22   ` Chaitanya Kulkarni
2026-01-24 21:29     ` Chaitanya Kulkarni [this message]
2025-11-24 23:48 ` [PATCH V3 3/6] dm: " Chaitanya Kulkarni
2025-11-24 23:48 ` [PATCH V3 4/6] nvmet: " Chaitanya Kulkarni
2025-11-26 10:14   ` [f2fs-dev] " Yongpeng Yang
2025-11-26 10:37     ` Christoph Hellwig
2026-01-24 21:35   ` Chaitanya Kulkarni
2026-01-26  4:57     ` hch
2026-01-27 22:40       ` Chaitanya Kulkarni
2025-11-24 23:48 ` [PATCH V3 5/6] f2fs: " Chaitanya Kulkarni
2025-11-25  1:10   ` Chao Yu
2025-11-25  6:33     ` Christoph Hellwig
2025-11-25  7:11       ` Chao Yu
2025-11-26  2:47   ` Chao Yu
2025-11-26  3:37     ` Chaitanya Kulkarni
2025-11-26  3:58       ` Chao Yu
2025-11-24 23:48 ` [PATCH V3 6/6] xfs: " Chaitanya Kulkarni
2025-11-26  2:37   ` [f2fs-dev] " Yongpeng Yang
2025-11-26  8:07     ` Chaitanya Kulkarni
2025-11-26  9:14       ` Yongpeng Yang
2025-11-26  9:48         ` Yongpeng Yang
2025-11-26 10:34       ` hch
2025-11-26 10:33     ` Christoph Hellwig
2025-11-25 13:20 ` [PATCH V3 0/6] block: ignore __blkdev_issue_discard() ret value Anuj gupta
2025-11-25 19:20 ` (subset) " Jens Axboe
2025-12-03 21:50 ` [f2fs-dev] " patchwork-bot+f2fs
2025-12-09 17:18 ` patchwork-bot+f2fs
2025-12-16  0:50 ` patchwork-bot+f2fs
2026-02-17 21:14 ` patchwork-bot+f2fs

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=b89bfaa5-a7fc-434f-8cc1-afb4dc317f6d@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=ckulkarnilinux@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=song@kernel.org \
    --cc=yukuai@fnnas.com \
    /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