lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c216f57a-3d9f-4549-9ed2-4dbc2b2330d9@oracle.com>
Date: Thu, 12 Jun 2025 10:15:59 +0100
From: John Garry <john.g.garry@...cle.com>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: agk@...hat.com, snitzer@...nel.org, song@...nel.org, yukuai3@...wei.com,
        hch@....de, nilay@...ux.ibm.com, axboe@...nel.dk,
        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
Subject: Re: [PATCH RFC 3/4] dm-stripe: limit chunk_sectors to the stripe size

On 09/06/2025 16:19, Mikulas Patocka wrote:
>> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
>> index 24a857ff6d0b..4f1f7173740c 100644
>> --- a/drivers/md/dm-table.c
>> +++ b/drivers/md/dm-table.c
>> @@ -430,6 +430,10 @@ static int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev,
>>   		return 0;
>>   	}
>>   
>> +	/* For striped types, limit the chunk_sectors to the chunk size */
>> +	if (dm_target_supports_striped(ti->type))
>> +		limits->chunk_sectors = len >> SECTOR_SHIFT;
>> +
> len is already in sectors, so why do we shift it right?

Actually what I am passing is not the proper value at all. len holds the 
sc->stripe_width, and that seems to be md dev size / # stripes. I think 
that we want chunk_size, right?

> 
> Could this logic be moved to the function stripe_io_hints, so that we
> don't have to add a new flag for that and that we don't have to modify the
> generic dm code?
> 

That would be better. I am going to have to change 
blk_stack_atomic_writes_limits() to work for that, but I think that code 
needs to change anyway if the bottom device has its own chunk_sectors 
(as Nilay mentioned about 4/4).

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ