From patchwork Wed Nov 6 12:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Gupta X-Patchwork-Id: 13865000 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 7F4C22022DA for ; Wed, 6 Nov 2024 14:28:59 +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=1730903341; cv=none; b=SRI/cJk3oGT8VMi+c8Xpm3H8zfGJMPln/SwiDR6Yrlr6eM2feH6u3b/FMbhtIh8d4iCmATio0XFLUZvUVkbs+7TQg7rvUJ8puPKL4nQ4yvdjTqiz6Lrxe77QnwHQLZvdDFsR/o9S218x3NPqPyQJBq/Pu2m14fD/huclE/M4+QA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730903341; c=relaxed/simple; bh=uDUb87C52DXoVA3KvOoAoNEyjHqrw30MJR/Iqxaidaw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:MIME-Version: Content-Type:References; b=IrTlUoQsf8hHBiVpU6Bw4Ygu22ODg2uCEcPgK+FN8qnxCwtYnzJBDUDQWY5fXwLiWezj6IVDZgU8N9UU80Em+gRLCCOJh6PFOy8F72XGDQu1fMhIjHFoLXbKy3nWbmIUG5YaxYOFph+udEwrBmSZF/Mw6r2BdzByV7jhIdeqAro= 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=gbg5JLxy; 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="gbg5JLxy" Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20241106142857epoutp0140411ac6e6269bf9921fc7348d06a9e6~FZ2pInFsq1909819098epoutp01t for ; Wed, 6 Nov 2024 14:28:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20241106142857epoutp0140411ac6e6269bf9921fc7348d06a9e6~FZ2pInFsq1909819098epoutp01t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1730903338; bh=sPCiH7C8otAPeKBQxafGfpBc//4CVwTtOappMXTNYFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gbg5JLxy/xiTiY9CuIiwgTmSAQOcbuN/Ud63w2R7VlT4/1GVgD7RL9mt0ufzemj3Y hnq3uR4bSXQWmPkDAneWxqWQ9b32gKU8/GgRd5G2pj8g9KNjLv009F7kdA1Hc/p5no 9Rb3+9ULk1qnq95VfOvwLvcRrlJpKXOnWiP+nep0= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20241106142857epcas5p263a7bc31e0dbaab8e5a1cba44ac3d8d6~FZ2oU87bL1484514845epcas5p2Z; Wed, 6 Nov 2024 14:28:57 +0000 (GMT) Received: from epsmgec5p1-new.samsung.com (unknown [182.195.38.181]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Xk6yb2jBpz4x9Pp; Wed, 6 Nov 2024 14:28:55 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmgec5p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id BB.44.37975.72D7B276; Wed, 6 Nov 2024 23:28:55 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20241106122704epcas5p37a156fb2738c3b8194e8f81c26a07878~FYMOMslh43242132421epcas5p33; Wed, 6 Nov 2024 12:27:04 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20241106122704epsmtrp200a3457ab68e63807ffbfa37626d1ccf~FYMOL2gb62562525625epsmtrp2O; Wed, 6 Nov 2024 12:27:04 +0000 (GMT) X-AuditID: b6c32a50-085ff70000049457-2d-672b7d27f000 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F6.01.35203.8906B276; Wed, 6 Nov 2024 21:27:04 +0900 (KST) Received: from localhost.localdomain (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20241106122702epsmtip1ef7339d3a33088bb9e994ec2c051e80a~FYMLqURmC0829608296epsmtip19; Wed, 6 Nov 2024 12:27:01 +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, brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk 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, linux-fsdevel@vger.kernel.org, Anuj Gupta , Kanchan Joshi Subject: [PATCH v8 04/10] fs, iov_iter: define meta io descriptor Date: Wed, 6 Nov 2024 17:48:36 +0530 Message-Id: <20241106121842.5004-5-anuj20.g@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241106121842.5004-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-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8Wcb3s896WRfECajOqP1Y8tk7KaWUO/yUbMXSP3s4+HQNBOK+CZc1/59hH/BQsJl99SOe X8wGra9MuK+ciPncI20rKOo5afvNHofD0+Z9DNKc+ufP7vPSs19Ode68dXtSyTSBacqLPa6F HOMSfT371lIRF5eGXyG3E/LE07Z85Ss4nir97Fr2098/i70fXo5grnr16kLBfRM7KZY2oWUl rH6LjeWn23QIvgjc4mafEBy94FrUtXClGUs4/08oDduWOZXRtk/is/gtd54S0b+LsjUZ3+8J OBha1xmsuyVIiaU4I9FQi7moOBEAVFbo8ScDAAA= X-CMS-MailID: 20241106122704epcas5p37a156fb2738c3b8194e8f81c26a07878 X-Msg-Generator: CA X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241106122704epcas5p37a156fb2738c3b8194e8f81c26a07878 References: <20241106121842.5004-1-anuj20.g@samsung.com> Add flags to describe checks for integrity meta buffer. Also, introduce a new 'uio_meta' structure that upper layer can use to pass the meta/integrity information. Signed-off-by: Kanchan Joshi Signed-off-by: Anuj Gupta Reviewed-by: Christoph Hellwig --- include/linux/uio.h | 9 +++++++++ include/uapi/linux/fs.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/include/linux/uio.h b/include/linux/uio.h index 853f9de5aa05..8ada84e85447 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -82,6 +82,15 @@ struct iov_iter { }; }; +typedef __u16 uio_meta_flags_t; + +struct uio_meta { + uio_meta_flags_t flags; + u16 app_tag; + u64 seed; + struct iov_iter iter; +}; + static inline const struct iovec *iter_iov(const struct iov_iter *iter) { if (iter->iter_type == ITER_UBUF) diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 753971770733..9070ef19f0a3 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h @@ -40,6 +40,15 @@ #define BLOCK_SIZE_BITS 10 #define BLOCK_SIZE (1<