From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5809AC6FA8E for ; Tue, 20 Sep 2022 14:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230362AbiITOqr (ORCPT ); Tue, 20 Sep 2022 10:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbiITOqq (ORCPT ); Tue, 20 Sep 2022 10:46:46 -0400 Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6612E58B40; Tue, 20 Sep 2022 07:46:45 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 116A7404AD; Tue, 20 Sep 2022 14:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yadro.com; h= content-type:content-type:content-transfer-encoding:mime-version :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received:received; s=mta-01; t=1663685202; x= 1665499603; bh=axDEyae99nBCDLJ2X12dIpJxOodNemMJAkJXyhvh864=; b=S rggXagTMTIsaAJo4mzpYt11rM57eqT9xtd21Ajkj2uHrAlkx8Lo0tpUr7Tka3Qr1 nG//fznWiOhjc7IL0UN2T2ZgzFStncSDaZX6xFA9okMTkjJlTP4fQdO8ovVGbagF mZxCnN0rmvZr5K82DNXej2s2qWHfSf6PJKIObv2MAI= X-Virus-Scanned: amavisd-new at yadro.com Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hltqWYxIKpfa; Tue, 20 Sep 2022 17:46:42 +0300 (MSK) Received: from T-EXCH-02.corp.yadro.com (T-EXCH-02.corp.yadro.com [172.17.10.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 72531404AC; Tue, 20 Sep 2022 17:46:40 +0300 (MSK) Received: from T-EXCH-09.corp.yadro.com (172.17.11.59) by T-EXCH-02.corp.yadro.com (172.17.10.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Tue, 20 Sep 2022 17:46:40 +0300 Received: from altair.lan (10.199.18.119) by T-EXCH-09.corp.yadro.com (172.17.11.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1118.9; Tue, 20 Sep 2022 17:46:39 +0300 From: "Alexander V. Buev" To: CC: , Jens Axboe , "Christoph Hellwig" , "Martin K . Petersen" , Pavel Begunkov , Chaitanya Kulkarni , Mikhail Malygin , , "Alexander V. Buev" Subject: [PATCH v5 0/3] implement direct IO with integrity Date: Tue, 20 Sep 2022 17:46:15 +0300 Message-ID: <20220920144618.1111138-1-a.buev@yadro.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.199.18.119] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-09.corp.yadro.com (172.17.11.59) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This series of patches makes possible to do direct block IO with integrity payload using io uring kernel interface. Userspace app can utilize new READV_PI/WRITEV_PI operation with a new fields in sqe struct (pi_addr/pi_len) to provide iovec's with integrity data. Changes since v4: - fixed sparse warnings reported by robot - some litle code sync rw.c -> rw_pi.c - some includes cleanup Changes since v3: - fixed warnings reported by robot Changes since v2: - separate code from fast path - keep rw_pi struct size <= 64 byte - using kiocb->private pointer to pass PI data iterator to block direct IO layer - improved bio_integrity_add_iovec function Alexander V. Buev (3): block: bio-integrity: add PI iovec to bio block: io-uring: add READV_PI/WRITEV_PI operations block: fops: handle IOCB_USE_PI in direct IO block/bio-integrity.c | 163 +++++++++ block/fops.c | 80 +++++ include/linux/bio.h | 8 + include/linux/fs.h | 1 + include/uapi/linux/io_uring.h | 6 + include/uapi/linux/uio.h | 3 +- io_uring/Makefile | 3 +- io_uring/io_uring.c | 2 + io_uring/opdef.c | 27 ++ io_uring/rw.h | 4 + io_uring/rw_pi.c | 630 ++++++++++++++++++++++++++++++++++ io_uring/rw_pi.h | 34 ++ 12 files changed, 959 insertions(+), 2 deletions(-) create mode 100644 io_uring/rw_pi.c create mode 100644 io_uring/rw_pi.h -- 2.30.2