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: <17d16e35-9911-44c9-99cc-a2ff82f16482@oracle.com>
Date: Thu, 12 Sep 2024 16:05:48 +0100
From: John Garry <john.g.garry@...cle.com>
To: Christoph Hellwig <hch@....de>
Cc: axboe@...nel.dk, song@...nel.org, yukuai3@...wei.com, kbusch@...nel.org,
        sagi@...mberg.me, James.Bottomley@...senPartnership.com,
        martin.petersen@...cle.com, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
        linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org
Subject: Re: [PATCH RFC 3/4] block: Support atomic writes limits for stacked
 devices

On 12/09/2024 14:16, Christoph Hellwig wrote:
> On Tue, Sep 03, 2024 at 03:07:47PM +0000, John Garry wrote:
>> +	} else if (t->features & BLK_FEAT_ATOMIC_WRITES) {
>> +		t->atomic_write_hw_max = min_not_zero(t->atomic_write_hw_max,
>> +						b->atomic_write_hw_max);
>> +		t->atomic_write_boundary_sectors =
>> +					min_not_zero(t->atomic_write_boundary_sectors,
>> +						b->atomic_write_boundary_sectors);
>> +		t->atomic_write_hw_unit_min = max(t->atomic_write_hw_unit_min,
>> +						b->atomic_write_hw_unit_min);
>> +		t->atomic_write_hw_unit_max =
>> +					min_not_zero(t->atomic_write_hw_unit_max,
>> +						b->atomic_write_hw_unit_max);
> 
> Maybe split this into a helper to make the code more readable?

Yeah, I will do.

I was reworking this anyway.

So far I am not supporting a stripe unit with which is not a power-of-2. 
But that is too restrictive. And lifting that restriction makes 
calculating atomic write limits more complicated.

> 
> Otherwise this looks good to me.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ