linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Yu Kuai <yukuai1@huaweicloud.com>, song@kernel.org
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
	martin.petersen@oracle.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] md/md-linear: Enable atomic writes
Date: Tue, 23 Sep 2025 09:21:15 +0100	[thread overview]
Message-ID: <557f39a4-a760-4b10-80e3-229f7a4892cb@oracle.com> (raw)
In-Reply-To: <b6820280-cc1f-beae-2c1c-077d46bbf721@huaweicloud.com>

On 05/09/2025 10:02, Yu Kuai wrote:
> 在 2025/09/04 0:10, John Garry 写道:
>> All the infrastructure has already been plumbed to support this for
>> stacked devices, so just enable the request_queue limits features flag.
>>
>> A note about chunk sectors for linear arrays:
>> While it is possible to set a chunk sectors param for building a linear
>> array, this is for specifying the granularity at which data sectors from
>> the device are used. It is not the same as a stripe size, like for RAID0.
>>
>> As such, it is not appropriate to set chunk_sectors request queue 
>> limit to
>> the same value, as chunk_sectors request limit is a boundary for which
>> requests cannot straddle.
>>
>> However, request_queue limit max_hw_sectors is set to chunk sectors, 
>> which
>> almost has the same effect as setting chunk_sectors limit.
>>
>> Signed-off-by: John Garry <john.g.garry@oracle.com>
>>
>> diff --git a/drivers/md/md-linear.c b/drivers/md/md-linear.c
>> index 5d9b081153757..30ac29b990c9b 100644
>> --- a/drivers/md/md-linear.c
>> +++ b/drivers/md/md-linear.c
>> @@ -74,6 +74,7 @@ static int linear_set_limits(struct mddev *mddev)
>>       lim.max_hw_sectors = mddev->chunk_sectors;
>>       lim.max_write_zeroes_sectors = mddev->chunk_sectors;
>>       lim.io_min = mddev->chunk_sectors << 9;
>> +    lim.features |= BLK_FEAT_ATOMIC_WRITES;
>>       err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
>>       if (err)
>>           return err;
>>
> 
> LGRM
> Reviewed-by: Yu Kuai <yukuai3@huawei.com>
> 

thanks

Could I have this picked up now? Maybe it was missed.

  reply	other threads:[~2025-09-23  8:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 16:10 [PATCH] md/md-linear: Enable atomic writes John Garry
2025-09-05  9:02 ` Yu Kuai
2025-09-23  8:21   ` John Garry [this message]
2025-09-23  9:10     ` Yu Kuai
2025-10-20 13:48       ` John Garry
2025-10-21 12:06         ` Yu Kuai
2025-10-21 12:32           ` John Garry

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=557f39a4-a760-4b10-80e3-229f7a4892cb@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=song@kernel.org \
    --cc=yukuai1@huaweicloud.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;
as well as URLs for NNTP newsgroup(s).