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] [day] [month] [year] [list]
Message-ID: <803a2183-a0bb-4b7a-92f1-afc5097630d2@oracle.com>
Date: Thu, 21 Aug 2025 13:55:10 +0100
From: John Garry <john.g.garry@...cle.com>
To: Zhang Yi <yi.zhang@...weicloud.com>, linux-fsdevel@...r.kernel.org,
        linux-ext4@...r.kernel.org, linux-block@...r.kernel.org,
        dm-devel@...ts.linux.dev, linux-nvme@...ts.infradead.org,
        linux-scsi@...r.kernel.org
Cc: linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org, hch@....de,
        tytso@....edu, djwong@...nel.org, bmarzins@...hat.com,
        chaitanyak@...dia.com, shinichiro.kawasaki@....com, brauner@...nel.org,
        martin.petersen@...cle.com, yi.zhang@...wei.com,
        chengzhihao1@...wei.com, yukuai3@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH v2 1/9] block: introduce
 max_{hw|user}_wzeroes_unmap_sectors to queue limits

On 19/06/2025 12:17, Zhang Yi wrote:
>   }
> @@ -333,6 +335,12 @@ int blk_validate_limits(struct queue_limits *lim)
>   	if (!lim->max_segments)
>   		lim->max_segments = BLK_MAX_SEGMENTS;
>   
> +	if (lim->max_hw_wzeroes_unmap_sectors &&
> +	    lim->max_hw_wzeroes_unmap_sectors != lim->max_write_zeroes_sectors)
> +		return -EINVAL;

JFYI, I noticed that I am failing this check in raid0_set_limits() -> 
queue_limits_set() -> queue_limits_commit_update() -> 
blk_validate_limits() for v6.17-rc2

The raid0 array consists of NVMe partitions. Here 
lim->max_hw_wzeroes_unmap_sectors = 4096 and 
lim->max_write_zeroes_sectors = 0 values for the failure, above.

john@...pberrypi:~ $ cat /sys/block/nvme0n1/queue/write_zeroes_max_bytes
2097152
john@...pberrypi:~ $ cat 
/sys/block/nvme0n1/queue/write_zeroes_unmap_max_bytes
2097152
john@...pberrypi:~ $ cat
/sys/block/nvme0n1/queue/write_zeroes_unmap_max_hw_bytes
2097152
john@...pberrypi:~ $



> +	lim->max_wzeroes_unmap_sectors = min(lim->max_hw_wzeroes_unmap_sectors,
> +			lim->max_user_wzeroes_unmap_sectors);
> +
>   	lim->max_discard_sectors =
>   		min(lim->max_hw_discard_sectors, lim->max_user_discard_sectors);
>   
> @@ -418,10 +426,11 @@ int blk_set_default_limits(struct queue_limits *lim)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ