From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95676335BA8; Mon, 18 Aug 2025 13:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755524761; cv=none; b=f+EEui4TV32pOzhAHQMwU0iCpbJS6JXDL7D20x49s8gMUAv7kPIaZ+syvi9pXQ3W3yTpUWp7UStJOEdUOQU9JBUR07z1aYkvOy9OIexPYx7qKwXI0+1oArBTG9Le3Ui92AYrQoMzBiC4E+4qzM5GIasuLs7BCf5L1dyouJAnAMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755524761; c=relaxed/simple; bh=wf7qsrOFJdC8oV8KqiL1yy4QAdDiB8py+7NJ3T2oOPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jqgWJz6VtOevedOfyAfQM056smG8Tqi7BY1Eq6n1qn556J1OtjigpHUMrd6RvvyN9aGP6rEbrA81dHFkWk7jxmEy4qt9UEU211wOcskG7lL9K0HuMool61/qfFXV6KTdYmBVu+0Pi8yq5FlxA+4xz2OVA8YGfurZVDiYzwmPqnA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ySmNNnoV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ySmNNnoV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2124C4CEEB; Mon, 18 Aug 2025 13:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755524761; bh=wf7qsrOFJdC8oV8KqiL1yy4QAdDiB8py+7NJ3T2oOPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ySmNNnoVMyoWNO+05uQLbHb1PwYHI4ZzoKI2OaT2hlL4/3e5oHcCIPZBAkHP/fA3h qKjPCl9eyinURGa7kzgqdRZgkmSdoIXJjKrXUcasCsIqYdHXhcHsvBJAfqV2Pw8n6b sJAPPvao4YGPY9uHdRGLLwO7Jp02FRjdFgkSayLE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Damien Le Moal , Bart Van Assche , Johannes Thumshirn , Christoph Hellwig , Jens Axboe Subject: [PATCH 6.16 054/570] block: Make REQ_OP_ZONE_FINISH a write operation Date: Mon, 18 Aug 2025 14:40:41 +0200 Message-ID: <20250818124507.895825181@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124505.781598737@linuxfoundation.org> References: <20250818124505.781598737@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Damien Le Moal commit 3f66ccbaaef3a0c5bd844eab04e3207b4061c546 upstream. REQ_OP_ZONE_FINISH is defined as "12", which makes op_is_write(REQ_OP_ZONE_FINISH) return false, despite the fact that a zone finish operation is an operation that modifies a zone (transition it to full) and so should be considered as a write operation (albeit one that does not transfer any data to the device). Fix this by redefining REQ_OP_ZONE_FINISH to be an odd number (13), and redefine REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL using sequential odd numbers from that new value. Fixes: 6c1b1da58f8c ("block: add zone open, close and finish operations") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20250625093327.548866-2-dlemoal@kernel.org Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- include/linux/blk_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -350,11 +350,11 @@ enum req_op { /* Close a zone */ REQ_OP_ZONE_CLOSE = (__force blk_opf_t)11, /* Transition a zone to full */ - REQ_OP_ZONE_FINISH = (__force blk_opf_t)12, + REQ_OP_ZONE_FINISH = (__force blk_opf_t)13, /* reset a zone write pointer */ - REQ_OP_ZONE_RESET = (__force blk_opf_t)13, + REQ_OP_ZONE_RESET = (__force blk_opf_t)15, /* reset all the zone present on the device */ - REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)15, + REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)17, /* Driver private requests */ REQ_OP_DRV_IN = (__force blk_opf_t)34,