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 A34F9C63797 for ; Tue, 17 Jan 2023 06:02:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235587AbjAQGCx (ORCPT ); Tue, 17 Jan 2023 01:02:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235659AbjAQGCM (ORCPT ); Tue, 17 Jan 2023 01:02:12 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05873298FE; Mon, 16 Jan 2023 22:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0iFYPwB56z2uVqPM1Af+NzvPAa6MzVC/MYfjI6yAY5A=; b=rS1nepsu+NNaRwhTSKHr/33vYx bjUv9LNzKIkBn89U8opnUY7DIiAPFUGjY722xAQcby/87TIIhiVm+z+s3/b9gNWJj1c43eMpLeywx ZQvtHjhTVeZUrBqR0/QH0QecNBbos1UCmPqH30grNUJ+MhkyVktt7QpDeJWXOD/+6HrAEZ4I1Mi95 RpUn2/IwYRmmTotr9oPihqnujOKWlAvGR8MfyDbhjlv7vevktuHpL5ibiX2QPQ9njNhQ59bJ0HC2K l0nMbLKwaf/CTNTEBIfvCNHSL7Y9zYQrBVPc6K0nGiTRJsK0SY8DvXHROgB2Fx3mNbCyiYlJWdegk cHuTYbIA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHf2J-00D1Xj-14; Tue, 17 Jan 2023 06:01:31 +0000 Date: Mon, 16 Jan 2023 22:01:31 -0800 From: Christoph Hellwig To: Jens Axboe Cc: linux-block@vger.kernel.org, mikelley@microsoft.com, stable@vger.kernel.org Subject: Re: [PATCH 2/2] block: don't allow splitting of a REQ_NOWAIT bio Message-ID: References: <20230104160938.62636-1-axboe@kernel.dk> <20230104160938.62636-3-axboe@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org And this is the other comment. On Tue, Jan 10, 2023 at 01:21:24AM -0800, Christoph Hellwig wrote: > On Wed, Jan 04, 2023 at 09:09:38AM -0700, Jens Axboe wrote: > > split: > > + /* > > + * We can't sanely support splitting for a REQ_NOWAIT bio. End it > > + * with EAGAIN if splitting is required and return an error pointer. > > + */ > > + if (bio->bi_opf & REQ_NOWAIT) { > > + bio->bi_status = BLK_STS_AGAIN; > > + bio_endio(bio); > > + return ERR_PTR(-EAGAIN); > > + } > > Hmm. Just completing the bio here seems a little dangerous in terms > of ownership. What speaks against letting the caller do it? ---end quoted text---