Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4573017pxv; Tue, 6 Jul 2021 04:23:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFp9E8AS0J7b6/eZiDqQO3E+NXmWbJE9H5JCxc/ZwH4CxTwO69ZOs+17CC8m/t4ksKjSaB X-Received: by 2002:a05:6402:d0a:: with SMTP id eb10mr22771029edb.139.1625570586738; Tue, 06 Jul 2021 04:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625570586; cv=none; d=google.com; s=arc-20160816; b=LctNivD2BiHjMbHAduZMY2LGRqhRlNyiZnTPYFSy+Sd8buryUgHrXyiXCIP2+Mi/13 7Q4DLw0JjFCLrpDVcFrHWFF6gyzqNbyFjTrtTr0G2FTHIysLcI/jr4RBxs8dO1YYPLbn 4iY6ZpaxkvoRtIAhp+aJuzP0Doa0bgJnVCi7kaAqcAxluOq0asez43mtoijdzMZm3H6J ZHJ/WirFBS9BCIdZXSqp2FX/b/aq1QlUu85jxeXxmTLZfBpgrCqpBEhHdZr9KiWZUDks tm2Yg8L2l0VHpSOpldDFyNgAuBP10YCNjBc6ZfWzkdUv0CavGt+jYZ/lRJwvnqUfyJ4R ZL2A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qtQsycmU35T/6ZqZH348it12X+wrJGIES5o3OycFkps=; b=ab5GIyBc4ax/UZa/lzLydZ6VMhYApkFD7QMRq7IXzvrmW4xsAo0pZZJPm8gzbBh3Bf SF8s3+Hy7vIFKaN/v0Amt5Mt6DuoVOc27dc4bouXDD+yjCcsoH/B4jApppag/dmlKUy2 Kd6lMBdO6lkvhvgNIrWkXPbrL+Kl/IXkXKZzA4MOk/ca53/BQ5GruhaI0BX5Gw38SQjm uM7itnXETZdiwWbzAbavzrYPnBCv5S+aU/J4rwKHSbpfKyZIzV1Kta6rcmpoKeXwdReC Db2a7CjY6aA9OrlfnKAFMIRsZawkvzcfdFFFGC/uLUdHQY1lgWAKSuXbHsh2Flr6E2te BGvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kMBNs7Ts; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb19si17302599ejc.331.2021.07.06.04.22.43; Tue, 06 Jul 2021 04:23:06 -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=@kernel.org header.s=k20201202 header.b=kMBNs7Ts; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234109AbhGFLXp (ORCPT + 99 others); Tue, 6 Jul 2021 07:23:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:54548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232566AbhGFLSd (ORCPT ); Tue, 6 Jul 2021 07:18:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 466D261C73; Tue, 6 Jul 2021 11:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625570155; bh=C7djTTCjYd0cKj88eqwliCRjLiPRX/To8ipnMZj28IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kMBNs7TsYsMr7p8ZSpDFz4n1LrajOJjXgJAoBKpwJayIvWWKB9XVPaS25dempyp+H HA0Ct9E2Ak2oe4Vvsoi+WPOct3hoZRCHOc16PpqHKp4rfTmikHYqM2yXU3TXgq0veD TC+3oujimV/17NEnwbFEenv4WRtvY15L6B6nuTs4Qr4Dj3ZVD2TwUjotc7BZn3JtYH GOMTGLyA+/rRcyYWvrso4o3N9M3NbcQBEL5ReKmWFljT8M95Lfe8FyF6zwoxUZ9feU uKqc/sG1B/nH6aAUvxOtoGk3dJwgZKj/C29ACGXHzWqNBVnenjqUTpGij/jkAcOmHa x1s21AyPgWrsw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Damien Le Moal , Christoph Hellwig , Hannes Reinecke , Chaitanya Kulkarni , Himanshu Madhani , Jens Axboe , Mike Snitzer , Sasha Levin , linux-block@vger.kernel.org Subject: [PATCH AUTOSEL 5.13 077/189] block: introduce BIO_ZONE_WRITE_LOCKED bio flag Date: Tue, 6 Jul 2021 07:12:17 -0400 Message-Id: <20210706111409.2058071-77-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210706111409.2058071-1-sashal@kernel.org> References: <20210706111409.2058071-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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