From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.26 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796160865; b=qiX0NJ8lMEuJMAqpVSc9rye8JDnXaEmGW4e9LuFlWI1DOxhZ8abfrPvlikz/qeEcOEUp k+TkEdwWAXVEqrInqUkEQRqUN/Sai+8R8UCIdk8sC/yUK7Y+6QaQ9IBsWLeT9/y4XnF9p vru1xs1ZLgVFxy5PXz39R22zjZayzX0Nv0RonTtXq2AEwnUOdlwBRa1yR53fy2SgeBj6w gXhBiUw3rGu/CqABzpnsGvXLMgo7iNAkXPaXPC2tBa3BF52t7+RJKPp8p45y0Ckf1bcHA EgF7xbSA6/IODXSmcYLdwtUaNp2AFjLnZ9YCg58di2hKVFUY+n6aZj4NQLtExQhwGlw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796160865; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=S6UyIG/qtmmz+gS5dhwP4NDtUXqfLbuTahCTWX1UCZU=; b=h3ecKjLR5SVtq301zJVXR8FkAhb0Rf4YSAHzOLnCXVOqzwgtPIktlsaY8ZINhilqi+D2 Y9XFe9rB6IZ/xY63o71X/ABzdvH/GTli4T7Zcww24ChR9OVxxWHuPhcsUmhYdHPTnRIXm OO/cYiuTWSa9y3QwY1cTwSAqzGEI/SXJblGZgJkMQy9YhFjwwwTaVGK3ovT0c45+9Qt+v ftr9c/hGXE88j1k7tXkXzH5L70Vfi7rtYcVoWEbnLdwC4blTMQD8Eqlj6NcFbniV0BO4u 0iitsispG/gRT4DKEt+FEAncgfvfoQsTccmvJ7jX5lOf5k4UtHGy0owThPfev7EEk4w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=uPwgPhYC; arc=none smtp.remote-ip=91.218.175.26 Received: from mta0.migadu.com (out-26.mta0.migadu.com [91.218.175.26]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B586606A322 for ; Tue, 1 Dec 2026 21:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9B586606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=uPwgPhYC X-Envelope-To: linux-block@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=PpCRkYPkJOS3HSfvXiAsPk53ceuUnwsLwZBUcsVtWBM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796160861; v=1; x=1796765661; b=uPwgPhYCkdWqUWoQUo0x0V7waSdIXl4XS8pAiVq2ekhBv3qDCMXm4Zpa8mH4ISVhzerrnL0V PgGnkFdT36tFjWIogSO1PFAc+zBV8rPCl/jKZPICsHw93nRmtW7BqQB+O0rVk07K24eQMcd5xGx FkpWvVQey0WTo2RunkUbxaM4= X-Envelope-To: linux-block@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id bde0ddbfb4fa300c; Tue, 01 Dec 2026 21:34:21 +0000 X-Mizu-Trace-ID: bde0ddbfb4fa300c X-Migadu-Flow: FLOW_OUT Message-ID: Date: Tue, 1 Dec 2026 22:34:16 +0100 X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [v4 0/3] block: delay support for error injection To: Christoph Hellwig , Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch , Jonathan Corbet , linux-doc@vger.kernel.org References: <20261111215838.103356-1-haris.iqbal@linux.dev> <179501806989.17649.3138860274842922761.b4-ty@b4> <20261120164416.GA32719@lst.de> <1cf30693-44c6-4761-9900-e36259082e4e@kernel.dk> <20261126083421.GA7403@lst.de> <970946a8-855e-4d65-97d9-71c7cb2ceb20@kernel.dk> <20261130080659.GA8222@lst.de> Content-Language: en-US From: Haris Iqbal In-Reply-To: <20261130080659.GA8222@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/30/26 09:06, Christoph Hellwig wrote: > On Thu, Nov 26, 2026 at 08:29:46AM -0700, Jens Axboe wrote: >> Gah, yes that is certainly a mistake, in my mind I had it staged for 7.5 >> of course. But looks like that ship sailed, as it's now in Linus's tree >> as well as part of updates from last week. How broken is this right now, >> in terms of what fix(es) we need? We can always just disable it. For >> 7.5, we can just pull in the block-7.4 branch and resolve the conflicts >> that way, fairly straight forward and usual approach. > > The sashiko report is here: > > https://sashiko.dev/#/patchset/20261111215838.103356-1-haris.iqbal%40linux.dev > > The main issue is bios outliving the gendisks. Which feels like it > could be hit relatively easily, and might even happen for typical > test case uses. Of course none of this matters if you don't use > the new feature, but I think sending a revert to Linus and then > reapplying it in 7.5 is probably the best. I was looking into the report and the scenarios, and I think part of this is real, but I'm not sure the rest can happen. The delayed bio is resubmitted through submit_bio_noacct_nocheck(), which skips bio_check_eod(). If the disk is removed while the bio waits, I think the bio can still reach the driver on sd/sr, because their queue is unfrozen again after del_gendisk(). So this part makes sense and I think failing the bio in the work when GD_DEAD should fix it. I don't think the use-after-free through nvme multipath can happen. Path disks are hidden, so their bdev is never added and disk_live() is false, and error_inject_add() returns -ENODEV for a disk that isn't live. I tried it with nvme-loop: writing a rule to the path disk's eror_injection file fails with ENODEV. If that's right, a bio is never delayed on a path disk, only on the head disk. So I'm thinking of adding just the GD_DEAD check. One thing I'd like an opinion on: a delayed bio holds no q_usage_counter, so del_gendisk() doesn't wait for it, and only the issuer's open keeps the disk allocated. Is that fine to rely on, or should the delayed bio take its own reference on the bdev (and the driver module) for the duration of the delay?