Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5024753rwr; Sun, 30 Apr 2023 21:32:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7vhSrtebyL62ScguqGFY7OUgJR4DAcn5LO/F9R5LxIZN66dDESA+nQXBKE+z77IVCP8sMW X-Received: by 2002:a17:90a:2e81:b0:24e:edd:4d66 with SMTP id r1-20020a17090a2e8100b0024e0edd4d66mr717397pjd.19.1682915579125; Sun, 30 Apr 2023 21:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682915579; cv=none; d=google.com; s=arc-20160816; b=pafKP+ScAiLFx6PrDEdM2nNtjQYnqKkD+Vz/uKigb6dUBhaCnaJxDiET+xtUFzVCq1 R+noi+fgcaL2Ttri5wxzrTqgQCpqLAxNHFhJ3wZgAzSBVRwWfUmmiYrAHJSXSjk3+5x4 1aiyOCy5bLqik8lfxl5N0q1ilveDpwntE96G/hSUF/6eDw+/v7KyJkeRUwCmFHfCTDAa 9uhCmC17TB7TESH0dXP6BplMjd7UntxPzaEQCMBsFrldPuReUxhqs4QjCJLlC+D5Gv2v tu5baaa2HIiFyKxjXfGNq4nEtCeKqX0p9ggnEN3r5SFz/SU20z/pz6YHKSoY0H5fMXVR 7m5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VGnb4Q8gU/G/Bn4P2Q0Sooz9dSEKd5CkNuXocfOgfXw=; b=bfyb9ekVXDxCAsf6l+iZJpyAaWJ4C9FkJ6QyadIa/x+AmuClJuoMMHXHMx30B90kA9 YnaLb/rVnqtkYTU7NJNnDpdioAKjF5B8pBp/h1ZjNPd/Q7DzSaieGQqgELnlbJTbW2a8 XC6eisycTnCmCUkvXPMv6Qtfghg4GwAl2AT/VIMOTaWWlL1Ll76+8DnezQneQP3NMguo TpprtPT11hIlxsuTuNUu+gcRpkHUt51zLM3EcGBRetglv9iOsA2zTUVyXr+MNZ7H7iqb SOydj0lh8+/AW5IxJ9dR8kwBNmEFpim9UBgtbSK76jlMNo00DpCxGJwN0zkgyKQqynJx akwg== 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 s11-20020a632c0b000000b00528cd0153aesi5091636pgs.713.2023.04.30.21.32.48; Sun, 30 Apr 2023 21:32:59 -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 S232070AbjEAEaU (ORCPT + 99 others); Mon, 1 May 2023 00:30:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232148AbjEAEaL (ORCPT ); Mon, 1 May 2023 00:30:11 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C01AE61; Sun, 30 Apr 2023 21:30:10 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 6A69268B05; Mon, 1 May 2023 06:30:07 +0200 (CEST) Date: Mon, 1 May 2023 06:30:07 +0200 From: Christoph Hellwig To: Breno Leitao Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org, asml.silence@gmail.com, axboe@kernel.dk, ming.lei@redhat.com, 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: Re: [PATCH v3 2/4] io_uring: Pass whole sqe to commands Message-ID: <20230501043007.GB19673@lst.de> References: <20230430143532.605367-1-leitao@debian.org> <20230430143532.605367-3-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230430143532.605367-3-leitao@debian.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 > static int ublk_ch_uring_cmd(struct io_uring_cmd *cmd, unsigned int issue_flags) > { > - struct ublksrv_io_cmd *ub_cmd = (struct ublksrv_io_cmd *)cmd->cmd; > + struct ublksrv_io_cmd *ub_cmd = (struct ublksrv_io_cmd *)cmd->sqe->cmd; This still adds all the crazy casting!! As I already explained two times, last time including actual working code, please add a helper that takes a io_uring_cmd * argument, and returns cmd->sqe->cmd with a void * type. With that all the casting can be removed.