[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <322db102-81c8-4d68-93f2-333563e391e3@oracle.com>
Date: Fri, 11 Jul 2025 10:22:49 +0100
From: John Garry <john.g.garry@...cle.com>
To: Damien Le Moal <dlemoal@...nel.org>, agk@...hat.com, snitzer@...nel.org,
mpatocka@...hat.com, song@...nel.org, yukuai3@...wei.com, hch@....de,
nilay@...ux.ibm.com, axboe@...nel.dk, cem@...nel.org
Cc: dm-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, linux-block@...r.kernel.org,
ojaswin@...ux.ibm.com, martin.petersen@...cle.com,
akpm@...ux-foundation.org, linux-xfs@...r.kernel.org,
djwong@...nel.org
Subject: Re: [PATCH v6 2/6] block: sanitize chunk_sectors for atomic write
limits
On 11/07/2025 09:42, Damien Le Moal wrote:
>> diff --git a/block/blk-settings.c b/block/blk-settings.c
>> index a000daafbfb48..a2c089167174e 100644
>> --- a/block/blk-settings.c
>> +++ b/block/blk-settings.c
>> @@ -180,6 +180,7 @@ static void blk_atomic_writes_update_limits(struct queue_limits *lim)
>>
>> static void blk_validate_atomic_write_limits(struct queue_limits *lim)
>> {
>> + unsigned long long chunk_bytes = lim->chunk_sectors << SECTOR_SHIFT;
> Don't you need to cast to a 64-bits "lim->chunk_sectors" here ?
I thought that we automatically convert lim->chunk_sectors to unsigned
long long, but I think that you are right...
At this point I think that it's easier to just convert
atomic_write_hw_max to sectors and do that comparison
Thanks,
John
Powered by blists - more mailing lists