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 3B20A4C97; Tue, 11 Nov 2025 00:54:53 +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=1762822493; cv=none; b=X+54sZpNrbPkCDdXVzCnq+oqe3Of9srEb6kxP5wvk+yNGKl/5v3ziYUSqw/GOLuebmHnPTBjIAb995NjkeUMiZArWCjqtVWNntMBe++ZfkAMlPlwY73d+Q8OYZ+TYV+EVIMznnCG5q7F2IphibpgIkESsK1zBBPkpLDwaEtGdqs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762822493; c=relaxed/simple; bh=HKT5ZWFRPjjdQkP/Fq39quOnqOQSLi6eq0g4YTzblls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DfaZOXNPPIO7wd6UKZiLu33HuW8zDIIIdl2oGEZojZDRd1+272B0nG8xkKyZsAtZfqJXWA7j6soUynKC/klocz5dWRqlgH/6VHeQZH29OGT6YaM4HKSM4V94T3l1Eajq0Sobup8o66hA/itw5f8XeaUcIeWk2fHNTLfc+WlWHvA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=idFBLfEb; 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="idFBLfEb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB07DC16AAE; Tue, 11 Nov 2025 00:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762822493; bh=HKT5ZWFRPjjdQkP/Fq39quOnqOQSLi6eq0g4YTzblls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=idFBLfEba87wSbYPvUl8LGBtkoKvdKjAGBQJ4xeuTPJJ+BWYt+JmYBg5vt5l4GOHg cCTlpAxNN4wag5ZLP6Hweq81lAqEJiZbUGmAGMvdqBpD7+2FieBdBb9S6Aus9OuAW6 +nNChtFvQbTIaF0GhMytjkA8OajmOLRQg12uADek= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Damien Le Moal , Chaitanya Kulkarni , Christoph Hellwig , Johannes Thumshirn , Jens Axboe Subject: [PATCH 6.12 061/565] block: make REQ_OP_ZONE_OPEN a write operation Date: Tue, 11 Nov 2025 09:38:37 +0900 Message-ID: <20251111004528.299648360@linuxfoundation.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251111004526.816196597@linuxfoundation.org> References: <20251111004526.816196597@linuxfoundation.org> User-Agent: quilt/0.69 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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Damien Le Moal commit 19de03b312d69a7e9bacb51c806c6e3f4207376c upstream. A REQ_OP_OPEN_ZONE request changes the condition of a sequential zone of a zoned block device to the explicitly open condition (BLK_ZONE_COND_EXP_OPEN). As such, it should be considered a write operation. Change this operation code to be an odd number to reflect this. The following operation numbers are changed to keep the numbering compact. No problems were reported without this change as this operation has no data. However, this unifies the zone operation to reflect that they modify the device state and also allows strengthening checks in the block layer, e.g. checking if this operation is not issued against a read-only device. Fixes: 6c1b1da58f8c ("block: add zone open, close and finish operations") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- include/linux/blk_types.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -338,15 +338,15 @@ enum req_op { /* write the zero filled sector many times */ REQ_OP_WRITE_ZEROES = (__force blk_opf_t)9, /* Open a zone */ - REQ_OP_ZONE_OPEN = (__force blk_opf_t)10, + REQ_OP_ZONE_OPEN = (__force blk_opf_t)11, /* Close a zone */ - REQ_OP_ZONE_CLOSE = (__force blk_opf_t)11, + REQ_OP_ZONE_CLOSE = (__force blk_opf_t)13, /* Transition a zone to full */ - REQ_OP_ZONE_FINISH = (__force blk_opf_t)13, + REQ_OP_ZONE_FINISH = (__force blk_opf_t)15, /* reset a zone write pointer */ - REQ_OP_ZONE_RESET = (__force blk_opf_t)15, + REQ_OP_ZONE_RESET = (__force blk_opf_t)17, /* reset all the zone present on the device */ - REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)17, + REQ_OP_ZONE_RESET_ALL = (__force blk_opf_t)19, /* Driver private requests */ REQ_OP_DRV_IN = (__force blk_opf_t)34,