Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4451483rwr; Sun, 30 Apr 2023 07:37:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Okn7F4kgdbFSCmOXS2VadY10xieWOvUfsfnrUwiSW3au2vCRnCCZhvir88b1+u9jOzP6I X-Received: by 2002:a17:902:ea04:b0:1a9:9ace:3e84 with SMTP id s4-20020a170902ea0400b001a99ace3e84mr13929646plg.1.1682865471413; Sun, 30 Apr 2023 07:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682865471; cv=none; d=google.com; s=arc-20160816; b=bHYQ/tKbJtdOtNIwcKA9NojLdi7aCtJ+YlfM03mN+wcyB08+LeYjTSSgw7lTPyvEtr SvuaVTVtxtu5R7izSZ3kcyT+xZvE9bwp2iBknJtgJPSATqeP+kAqLcWQ+ZlsXgwJtDAj ZucrIz6VKtJzz0F4TzzwMFYKJfHiZdyHYXw1M23Xyheltt/HwOPwkvYhqlfpuk5WLoa+ oXDforxp3m5nTy/xsjrcLDf50fpzQwTerDIIE67mE1iIZl5znK3FiM+gfj9dO5NMc3yz W9zsuQcj0Q9bHK4P3XyswUuVAvAz99jgYBwxn/GKxtJalB3U1GNJ6KEYNaij7VF2SnY9 EIwA== 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 :message-id:date:subject:cc:to:from; bh=FDvF+4jn75c0U/4/y4sFW3z5VmXzCZCBCvnk0YKahgs=; b=f8Oo/omTfGoxfXSGsnZngeyQbWy4XYa/qR6fELojriVumPOXJQ+NlO0wD7x01mp2MU S9HdMPh+CnxFbwlVfmZjX6uDBRts/hNYB/wUUmIkqgHUo/BULmptvqnv+Di2HCae1NBq 6PSSpRKS0RI5+7mvogbcjUWDCQC2L+EBcCnpcPiAqK7FAnNBNEFSFbFpNB/Q1nMagHPM wKb7tYdqfxTza4WzvIs2tgKW9kvO0p3Ra/YuK8+pDpuUtzchqfXR6IszcMFFTQDGZ4Js jR5dsUflOoDxcXrwRUAVTPjCd+lttEBLqUWsI8G42wWMC/xZ+b+kgrNh9wjL7ldBvzji TACQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p18-20020a170902ebd200b001a6cf4b4d6dsi22027861plg.289.2023.04.30.07.37.37; Sun, 30 Apr 2023 07:37:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230460AbjD3OgJ (ORCPT + 99 others); Sun, 30 Apr 2023 10:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230167AbjD3OgI (ORCPT ); Sun, 30 Apr 2023 10:36:08 -0400 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5BA1211D; Sun, 30 Apr 2023 07:36:06 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-3f19afc4fd8so8602275e9.2; Sun, 30 Apr 2023 07:36:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682865365; x=1685457365; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FDvF+4jn75c0U/4/y4sFW3z5VmXzCZCBCvnk0YKahgs=; b=jTHdELDZkKDM9s61nVMjGr+erzCuq8+Tvaazs/25XZbQ3OG5C2iB/7LFdn4Tngvthd k6hsdgi9PyplKZsa9gordQ+Q5EAS7LXGsMeK7nFwx3JI4eyGTTpKNeAiG5Nk2YGB+NFR tpgURyYERwnUs4INvqD2KvoGjDmEWWofCoH9a0LxgyjYuosmH+2CymXGBBpeNzT1aVnM wWCgt2rwgziXVNRX0tm+FV+GCvckJ+xRBfDlEG5WAuB5s6LpTk9y17Eh6DOORLuSSTwy 96KYSQ8uOJUm5LA+ZCFhlubjcw4G9Lq7qjlPqnujAm11AQF0jTf8taXp0eY4llkojxyL MymA== X-Gm-Message-State: AC+VfDwgQ6Gd5ApEt9Cbve9vRZpuPoWMs40Il6ba6ytWb6mHWg+DV18D eMaYnB7Ojy335YBYn1kSeIH6Yhj2nww= X-Received: by 2002:a5d:6e83:0:b0:2f7:e3aa:677a with SMTP id k3-20020a5d6e83000000b002f7e3aa677amr7785255wrz.46.1682865364669; Sun, 30 Apr 2023 07:36:04 -0700 (PDT) Received: from localhost (fwdproxy-cln-018.fbsv.net. [2a03:2880:31ff:12::face:b00c]) by smtp.gmail.com with ESMTPSA id z18-20020adfe552000000b002f3e1122c1asm26079134wrm.15.2023.04.30.07.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Apr 2023 07:36:03 -0700 (PDT) From: Breno Leitao To: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, asml.silence@gmail.com, axboe@kernel.dk, ming.lei@redhat.com Cc: leit@fb.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, sagi@grimberg.me, joshi.k@samsung.com, hch@lst.de, kbusch@kernel.org Subject: [PATCH v3 0/4] io_uring: Pass the whole sqe to commands Date: Sun, 30 Apr 2023 07:35:28 -0700 Message-Id: <20230430143532.605367-1-leitao@debian.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These three patches prepare for the sock support in the io_uring cmd, as described in the following RFC: https://lore.kernel.org/lkml/20230406144330.1932798-1-leitao@debian.org/ Since the support linked above depends on other refactors, such as the sock ioctl() sock refactor[1], I would like to start integrating patches that have consensus and can bring value right now. This will also reduce the patchset size later. Regarding to these three patches, they are simple changes that turn io_uring cmd subsystem more flexible (by passing the whole SQE to the command), and cleaning up an unnecessary compile check. These patches were tested by creating a file system and mounting an NVME disk using ubdsrv/ublkb0. [1] ZD6Zw1GAZR28++3v@gmail.com/">https://lore.kernel.org/lkml/ZD6Zw1GAZR28++3v@gmail.com/ Reviewed-by: Kanchan Joshi V1 -> V2 : * Create a helper to return the size of the SQE V2 -> V3: * Transformed uring_sqe_size() into a proper function * Fixed some commit messages * Created a helper function for nvme/host to avoid casting * Added a fourth patch to avoid ublk_drv's casts by using a proper helper Breno Leitao (4): io_uring: Create a helper to return the SQE size io_uring: Pass whole sqe to commands io_uring: Remove unnecessary BUILD_BUG_ON block: ublk_drv: Add a helper instead of casting drivers/block/ublk_drv.c | 36 ++++++++++++++++++++++++------------ drivers/nvme/host/ioctl.c | 8 +++++++- include/linux/io_uring.h | 2 +- io_uring/io_uring.h | 10 ++++++++++ io_uring/opdef.c | 2 +- io_uring/uring_cmd.c | 13 ++++--------- io_uring/uring_cmd.h | 8 -------- 7 files changed, 47 insertions(+), 32 deletions(-) -- 2.34.1