Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp652170pxv; Thu, 15 Jul 2021 12:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/cHnQAXQ1WdXdiQhl2AqxSFaSPI/Hg8Q68Bmd2kOfAivexg7U7eZC3yXsElafmZzI2heo X-Received: by 2002:a05:6402:100e:: with SMTP id c14mr9164962edu.51.1626377493077; Thu, 15 Jul 2021 12:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626377493; cv=none; d=google.com; s=arc-20160816; b=t8HDy6JwXrlOMdSL4nnuG+ZTKB/zMyhn6DB1hNC6awoJW7dNYmVZwaHNVVnsqJRkPP 3nZSesHCG7Vx4yfhAonpCTw15zSyMSKXvAcxG52N5t+Sj8hZqlPmt82A5z9H4Xy8poN4 CtxeuucaWuMu/XW+L2dRyp8AQUdrX2LA9izsini/M5/TCwrJ9S9z6BZ5SvRTOTLEau7P QokwJ823vrK64P9q31xhyB/RiFYnCoytGIy2okBkxNpWi4deMVEPL2eC+6w6DukImKiL IzREDTAAAiLnAMoSRop2fL8VFV8qDLwlPV0L+k4Ax/0yVz84nDt6jJ13OOolDIgIMVam g01A== 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=FsFdBCwNwrEUzj+1cHpO4QfBlIS5bSsRmc7cxEDx1cZj64RoIwXIJxwXgwZCVuDd1K PGxVBT8y4ZjU4GWrs4aIKt0YqBJ8Ng4u3sn5RfYMQQD5DC4kP7Bev9GlfvBI6/zj/CJU QUaURRAJUjviyGSit1PfFJ5FpvDs3wRY6DjGb8T5b9ANYcAvv1T+y4Fs7aw0ly19TQxl dx0FwKP9XywIYix/q8CTa8oOt6E5F8p9lMJlkGodfmbTNix1m7mFS+tWD/cfYAsIe6TK F4mA+DM/RchbCs8v4NSYk6C63rjF3TenC71udQpxGubotAEs4bij8Q+jiC6RN7KttBFC fZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S6yprncQ; 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 p23si8582718edw.135.2021.07.15.12.31.10; Thu, 15 Jul 2021 12:31:33 -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=S6yprncQ; 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 S1343494AbhGOT3S (ORCPT + 99 others); Thu, 15 Jul 2021 15:29:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:46396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243855AbhGOTKK (ORCPT ); Thu, 15 Jul 2021 15:10:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2AC5613E6; Thu, 15 Jul 2021 19:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376010; bh=C7djTTCjYd0cKj88eqwliCRjLiPRX/To8ipnMZj28IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S6yprncQkoel0IvAWpdVZYW0vvb9cVjWlJ+v//fALkP9SWhVxNCYNj6WDwJf636AF OLB193G1rwSrAHy8j/QI6STb97bY3ehqhpyheFWfQqxdmcDDQ01UVrJeuft9e8kXtA q+d/hifuAEdrHgvxX0p9DRmMPAYKPt+JRLYD8Kug= 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.13 071/266] block: introduce BIO_ZONE_WRITE_LOCKED bio flag Date: Thu, 15 Jul 2021 20:37:06 +0200 Message-Id: <20210715182626.707001652@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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