Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp641481pxv; Thu, 15 Jul 2021 12:14:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQMSf2rbkBNLLn3b84gLkDc3XybavPluO1CyLZnNROOVAEFjBzHA93xrUVHmSvO7sKgPWf X-Received: by 2002:a92:9509:: with SMTP id y9mr3714943ilh.18.1626376463335; Thu, 15 Jul 2021 12:14:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376463; cv=none; d=google.com; s=arc-20160816; b=ZFfkPYLv/zp+MFKffkUiyqgnPbP8M4f0wUEHLPQf0twUzR68pcI2fRbRm+hEFLIJmJ QEFgFSST220nbbSwNZnZCfi+nySWmcpSV4t68KWkDnG4v3tUcGyQ0p4C8e5z7Y7oZ/yh woBNJIy0BpnYP3Jo5jgQ+8IXNOBByBte+OlC9MJJC+NsFZbx3ZMPzycshaKWMJNh56qY gRW46SpuWtMMWq3uXgP1vaeNpBZqPEKk94YSFvx7RrgpSdvh6jMq6d/vsuKlCJmBOsVy TO2g/ZQxh+HcGyvCWXY9CDF3j+zcbl00DyEJUB6NuKQXc7YBHO3j3SKegKhVreQdfrt6 T/1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qtQsycmU35T/6ZqZH348it12X+wrJGIES5o3OycFkps=; b=rOZNEhBedqY38T81I3PqYTpmsVhsiqFqqo4H51TmFB2QmdkVJKiFZiRxGEM7zbXUSH Tz+vdG2x+RfhKavjhlIUU2AyszIutnwQPzM7/VbRS1/QlfSkv5kazBGMunhDAy1QV8E/ /VGxz8w/FJUYcicuhnvCNY23lIWVG8tWZoeSJS4Uw7wIvQGMndk3EElqwBmIsInMuwCq FiW9yy1X7XSR37jefkic7NRm97CIsrklK4mwCyosTBikHWHSs31uGTh7UjqxKEb+sWrU oXqOd64p2WL3G81RtMfnD7m31KK766WulgfuqcjH6NQMf49R+/QQBvuJxTkqX2IDy2Nu em0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FzCfiunI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si7213161jat.100.2021.07.15.12.14.09; Thu, 15 Jul 2021 12:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FzCfiunI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244197AbhGOTOb (ORCPT + 99 others); Thu, 15 Jul 2021 15:14:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:34728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242295AbhGOS7g (ORCPT ); Thu, 15 Jul 2021 14:59:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC8EA613E6; Thu, 15 Jul 2021 18:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375375; bh=C7djTTCjYd0cKj88eqwliCRjLiPRX/To8ipnMZj28IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FzCfiunId9pTQTw3Aj1mddao+CNbF7cat8+DRkXEyPNQlMqTWBozEQtYN073asgr4 TEQHJZcAnLOG27dZR9Fhh0Ph5w1SE4reoGsii4Rz0DNAReooBJ1o3CwT0b93o7EWgY OyrIdP4XSkuAXAX4caalYzplhToBMU/B+x/paohs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Damien Le Moal , Christoph Hellwig , Hannes Reinecke , Chaitanya Kulkarni , Himanshu Madhani , Jens Axboe , Mike Snitzer , Sasha Levin Subject: [PATCH 5.12 059/242] block: introduce BIO_ZONE_WRITE_LOCKED bio flag Date: Thu, 15 Jul 2021 20:37:01 +0200 Message-Id: <20210715182602.873658509@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Damien Le Moal [ Upstream commit 9ffbbb435d8f566a0924ce4b5dc7fc1bceb6dbf8 ] Introduce the BIO flag BIO_ZONE_WRITE_LOCKED to indicate that a BIO owns the write lock of the zone it is targeting. This is the counterpart of the struct request flag RQF_ZONE_WRITE_LOCKED. This new BIO flag is reserved for now for zone write locking control for device mapper targets exposing a zoned block device. Since in this case, the lock flag must not be propagated to the struct request that will be used to process the BIO, a BIO private flag is used rather than changing the RQF_ZONE_WRITE_LOCKED request flag into a common REQ_XXX flag that could be used for both BIO and request. This avoids conflicts down the stack with the block IO scheduler zone write locking (in mq-deadline). Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Acked-by: Jens Axboe Signed-off-by: Mike Snitzer Signed-off-by: Sasha Levin --- include/linux/blk_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index db026b6ec15a..e5cf12f102a2 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -304,6 +304,7 @@ enum { BIO_CGROUP_ACCT, /* has been accounted to a cgroup */ BIO_TRACKED, /* set if bio goes through the rq_qos path */ BIO_REMAPPED, + BIO_ZONE_WRITE_LOCKED, /* Owns a zoned device zone write lock */ BIO_FLAG_LAST }; -- 2.30.2