mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Yu Kuai <yukuai1@huaweicloud.com>, Xiao Ni <xni@redhat.com>,
	axboe@kernel.dk, song@kernel.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-raid@vger.kernel.org, yi.zhang@huawei.com,
	yangerkun@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH 3/4] md: fix is_mddev_idle()
Date: Wed, 16 Apr 2025 17:28:58 +0800	[thread overview]
Message-ID: <4358e07e-f78b-cd32-bbed-c597b8bb4c19@huaweicloud.com> (raw)
In-Reply-To: <42cbe72e-1db5-1723-789d-a93b5dc95f8f@huaweicloud.com>

Hi,

在 2025/04/16 15:42, Yu Kuai 写道:
> Hi,
> 
> 在 2025/04/16 14:20, Xiao Ni 写道:
>>> +static bool is_rdev_idle(struct md_rdev *rdev, bool init)
>>> +{
>>> +    unsigned long last_events = rdev->last_events;
>>> +
>>> +    if (!bdev_is_partition(rdev->bdev))
>>> +        return true;
>>
>>
>> For md array, I think is_rdev_idle is not useful. Because 
>> mddev->last_events must be increased while upper ios come in and idle 
>> will be set to false. For dm array, mddev->last_events can't work. So 
>> is_rdev_idle is for dm array. If member disk is one partition, 
>> is_rdev_idle alwasy returns true, and is_mddev_idle always return 
>> true. It's a bug here. Do we need to check bdev_is_partition here?
> 
> is_rdev_idle() is not used for current array, for example:
> 
> sda1 is used for array md0, and user doesn't issue IO to md0, while
> user issues IO to sda2. In this case, is_mddev_idle() still fail for
> array md0 because is_rdev_idle() fail.

Perhaps the name is_rdev_holder_idle() is better.

Thanks,
Kuai

> 
> This is just inherited from the old behaviour.
> 
> Thanks,
> Kuai
> 
>>
>> Best Regards
>>
>> Xiao
> 
> .
> 


  reply	other threads:[~2025-04-16  9:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-12  7:31 [PATCH 0/4] " Yu Kuai
2025-04-12  7:31 ` [PATCH 1/4] block: export part_in_flight() Yu Kuai
2025-04-14  6:32   ` Christoph Hellwig
2025-04-14  6:48     ` Yu Kuai
2025-04-14 11:39       ` Christoph Hellwig
2025-04-12  7:32 ` [PATCH 2/4] md: add a new api sync_io_depth Yu Kuai
2025-04-16  5:32   ` Xiao Ni
2025-04-16  8:19     ` Yu Kuai
2025-04-12  7:32 ` [PATCH 3/4] md: fix is_mddev_idle() Yu Kuai
2025-04-16  6:20   ` Xiao Ni
2025-04-16  7:42     ` Yu Kuai
2025-04-16  9:28       ` Yu Kuai [this message]
2025-04-16  9:44         ` Xiao Ni
2025-04-17  1:47           ` Yu Kuai
2025-04-12  7:32 ` [PATCH 4/4] md: cleanup accounting for issued sync IO Yu Kuai
2025-04-16  6:27   ` Xiao Ni

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=4358e07e-f78b-cd32-bbed-c597b8bb4c19@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=xni@redhat.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.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

all inboxes | Powered by JetHome®