From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6E8871A8F95; Tue, 25 Feb 2025 21:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740518172; cv=none; b=OG/9jVE/q7Uo+233B65QcILO4V9pCwrcDnoNDWLJcQZaISK057V64o3Y6tqlfzOp/wMaj0tEnk6jZhb1CxDi8/Mhl8wSQGi7zzxSuL3vI4//OgETIrsu+MvNBgd8hO+XhVFpoXZ02I4NRfBbsKArXF0tZ93WSH59YSQSx9n5GI4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740518172; c=relaxed/simple; bh=0Wo0zvd4Vfg24Iw6+oVLKeB8By5dvHplz1qC/aGQvNQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=as+Sm65wmiag17JX0vRzUv1hidRq1RHeIJBRVnjoNsQkNctoRXr+e/dJhMIPoQAReadth9PmubPc81gIg9so+q4UH8Ct31FdxsbEQaCckRlegLfsB+mzmuSM2jpVKAkZ19CflnU9eM2LY2naSAV91eLu0Co04XreC9IIO8DrA7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tusFs4mu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tusFs4mu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FB33C4CEDD; Tue, 25 Feb 2025 21:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740518171; bh=0Wo0zvd4Vfg24Iw6+oVLKeB8By5dvHplz1qC/aGQvNQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tusFs4muKhj8o033IxslQv3ZApEXKuHhrV60uovtoAq60h8CoP3CETYdCXSl9qV82 WZIFqhlNZ20PNAOj3oNRXmL1PdkKGDe7tOBQ6uAEhIGt4h+5J5N7EKL8e/AV+lQ6cz bbH/E3sLOf5v655UllvID8KaRooHtO40b1HbbrSUVWw9LlHK8EIWZpdXQ3GQ3UbS5f 5n7ihQKmVK9qoau2GYn12PFKoctFNh7T7RrZkQ2tr+4fHzGKoHlfmIE+mSNA+lFm8P 8iJ3BgxLqacTZADuwfgjOETWGdWKJp8cauDP+zsvlX/MeyHdFmm8ScWH3zg7PiI4Xr 0UXAG0MnY/UAw== Date: Tue, 25 Feb 2025 14:16:09 -0700 From: Keith Busch To: Caleb Sander Mateos Cc: Keith Busch , ming.lei@redhat.com, asml.silence@gmail.com, axboe@kernel.dk, linux-block@vger.kernel.org, io-uring@vger.kernel.org, bernd@bsbernd.com Subject: Re: [PATCHv5 06/11] io_uring/rw: move fixed buffer import to issue path Message-ID: References: <20250224213116.3509093-1-kbusch@meta.com> <20250224213116.3509093-7-kbusch@meta.com> Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Feb 25, 2025 at 12:57:43PM -0800, Caleb Sander Mateos wrote: > On Mon, Feb 24, 2025 at 1:31 PM Keith Busch wrote: > > +static int io_init_rw_fixed(struct io_kiocb *req, unsigned int issue_flags, int ddir) > > { > > struct io_rw *rw = io_kiocb_to_cmd(req, struct io_rw); > > - struct io_async_rw *io; > > + struct io_async_rw *io = req->async_data; > > int ret; > > > > - ret = io_prep_rw(req, sqe, ddir, false); > > - if (unlikely(ret)) > > - return ret; > > + if (io->bytes_done) > > + return 0; > > > > - io = req->async_data; > > ret = io_import_reg_buf(req, &io->iter, rw->addr, rw->len, ddir, 0); > > Shouldn't this be passing issue_flags here? Definitely should be doing that, and I have that in my next version already. Was hoping to get that fixed up version out before anyone noticed, but you got me.