From patchwork Wed Oct 16 11:29:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Gupta X-Patchwork-Id: 836581 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (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 539C6208209 for ; Wed, 16 Oct 2024 12:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082213; cv=none; b=LoESRdAgu8LrkdHvOT58Wy+iKgMCItGiC3fU+TFsFQUnsjvNWP4trt9O2l0vi5DK5c5gZfoYPy+o3ZLizoK+47D58o8RP98lLeKbiVSs02OKx3eWIDy+4cJJSDIeA2hVWzY6CB43j0J/K9OakuLk4zNKgZjPNk2RJUNEtlHXyUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729082213; c=relaxed/simple; bh=FD1Rr3gSIir5niLs2wMOY9Fp6ypa/E7yl+xDRorWEKA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=un94pmrwE96Ei1ot9vZJB7WZZ3p13uWFj5TyY/b+27KjejyEwu85+8VrNeUjGtEKKUz+iWHmKgUrq5ffU/o4nLSSN+PsD73Le31y8v5sDrRe9XUzUASWAx/UqwIqP0+UDOPertw3r63vf3u/rWEeyuJ433QNXgL0NsbjmkL4bJs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=FN/TWIfL; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="FN/TWIfL" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20241016123648epoutp01542ed5ec114c22d8eddb84c46a61d99c~_7xuL_D-Y1560215602epoutp01t for ; Wed, 16 Oct 2024 12:36:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20241016123648epoutp01542ed5ec114c22d8eddb84c46a61d99c~_7xuL_D-Y1560215602epoutp01t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1729082208; bh=pP7fuKjfTHtbF6PT6N4PWc3TJYSIrBfJKrC83hsylPA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FN/TWIfLUV/X93G36rboLeGzr/WfyzK7gW3g5K+iL9uqn6Dlq0w+CESQe1zGNDvDX wormGNQTzlnAN5Ud/ZPUkj2ljxvp++R+NMMgHinXKj4RSbOYluj8+4BbFvSZ+yLR7R OT2hxF3C5HzKmiPP0bW8/CEy+k6eH5s86me8e1Q8= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20241016123647epcas5p2361dbf3e7a9c551f2321d41a62c57b26~_7xtmixik1006810068epcas5p2J; Wed, 16 Oct 2024 12:36:47 +0000 (GMT) Received: from epsmgec5p1new.samsung.com (unknown [182.195.38.177]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4XT9St2kWdz4x9Pp; Wed, 16 Oct 2024 12:36:46 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmgec5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F5.37.08574.E53BF076; Wed, 16 Oct 2024 21:36:46 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20241016113745epcas5p1723d91b979fd0e597495fef377ad0f62~_6_KjuipO1436014360epcas5p1C; Wed, 16 Oct 2024 11:37:45 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20241016113745epsmtrp24559f8dcad65ab7967e8ec2fd2772af3~_6_Ki4UcD1554615546epsmtrp2v; Wed, 16 Oct 2024 11:37:45 +0000 (GMT) X-AuditID: b6c32a44-6dbff7000000217e-18-670fb35e2cd8 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5F.BA.08229.985AF076; Wed, 16 Oct 2024 20:37:45 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20241016113743epsmtip1498e161032d7d5e8bb1c6da199eaf0ee~_6_IkrovM3048330483epsmtip1k; Wed, 16 Oct 2024 11:37:43 +0000 (GMT) From: Anuj Gupta To: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org, martin.petersen@oracle.com, asml.silence@gmail.com, anuj1072538@gmail.com, krisman@suse.de Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, gost.dev@samsung.com, linux-scsi@vger.kernel.org, vishak.g@samsung.com, Anuj Gupta Subject: [PATCH v4 06/11] block: add flags for integrity meta Date: Wed, 16 Oct 2024 16:59:07 +0530 Message-Id: <20241016112912.63542-7-anuj20.g@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241016112912.63542-1-anuj20.g@samsung.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02Te0xbVRzHc27fJN3uynRHBFdvAgSUR6XU2w6cRNyaDSOooPiH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eWtJ6y7NZDz6Zpre8nCWTF+Tyk1TBXT3NTPuKliT4qQucXxxY6z3I7b/ VSnz7mUu032WFzlzj03IjOdRinxzi0/XXeBrtn1lkZ18cJ8SS3FGoqEWc1FxIgDFjT49DwMA AA== X-CMS-MailID: 20241016113745epcas5p1723d91b979fd0e597495fef377ad0f62 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241016113745epcas5p1723d91b979fd0e597495fef377ad0f62 References: <20241016112912.63542-1-anuj20.g@samsung.com> Add flags to describe checks for integrity meta buffer. These flags are specified by application as io_uring meta_flags, added in the next patch. Signed-off-by: Anuj Gupta --- include/uapi/linux/blkdev.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/uapi/linux/blkdev.h b/include/uapi/linux/blkdev.h index 66373cd1a83a..d606f8b9c0a0 100644 --- a/include/uapi/linux/blkdev.h +++ b/include/uapi/linux/blkdev.h @@ -11,4 +11,15 @@ */ #define BLOCK_URING_CMD_DISCARD _IO(0x12, 0) +/* + * flags for integrity meta + */ +#define BLK_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */ +#define BLK_INTEGRITY_CHK_APPTAG (1U << 1) /* enforce app tag check */ +#define BLK_INTEGRITY_CHK_REFTAG (1U << 2) /* enforce ref tag check */ + +#define BLK_INTEGRITY_VALID_FLAGS (BLK_INTEGRITY_CHK_GUARD |\ + BLK_INTEGRITY_CHK_APPTAG |\ + BLK_INTEGRITY_CHK_REFTAG) + #endif