Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 47B7C192B75 for ; Tue, 13 Jan 2026 08:39:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768293577; cv=none; b=GcMFZ9Jkc33L66wIxE6/DDgoo1BlQmBIpROHeZGG12ilxuR0R+whtZs8wbh2mwpxOedQzJJlZUjB90JPVB5hGYtsYf7RFJ1PJzHETnZyPvi24bJt5kr058WRJOt3saXzbCI14YlcyQ8k2B6++d115n3UQFWxL9v4M+3auYX2CWI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768293577; c=relaxed/simple; bh=BA88x97kqUmJHsPc+12k+uT4uVmLRUqR7sLwJSb614w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OArmxhme7PnLIFcho3ihe+3GJD/aEEdUB0++e2qliawX5rGQs9oDnqV5lMyvnbRb6qoRS8S0RXzb1SeWZNbQH38hQ+GhVaKdy6YZ3gEEDugWCglrr28AoqWuL+1vLzfJFJe3jxvVgw4XYbheevUN8eSHMnCiT34M51Dw5nVVPzU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Ed7lBI7H; arc=none smtp.client-ip=95.215.58.180 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) header.d=linux.dev header.i=@linux.dev header.b="Ed7lBI7H" Date: Tue, 13 Jan 2026 03:39:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768293574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tCDnnkIFyZ1T2qgQ+HYmx6ua8y8oRnGOcsQeyAg1oPs=; b=Ed7lBI7HJGvBGZvq2V+Q3HCknd8V7r341BGYprndkCfCY8PFb5eQzPUp7OhKrKLpzlspQO eXIWzv0rVJu7xF5q7Amc8st1WQRYcI+76ch8eKm+esYoDeMBvNq0X9FrFbCqU7u2ukJ2dR TC0NmXqKD2+tRColfnDpSGLOaGjXnMI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Christoph Hellwig Cc: colyli@fnnas.com, axboe@kernel.dk, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Shida Zhang Subject: Re: [PATCH] Revert "bcache: fix improper use of bi_end_io" Message-ID: References: <20260113060940.46489-1-colyli@fnnas.com> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT On Tue, Jan 13, 2026 at 12:34:36AM -0800, Christoph Hellwig wrote: > On Tue, Jan 13, 2026 at 03:30:41AM -0500, Kent Overstreet wrote: > > On Tue, Jan 13, 2026 at 12:07:54AM -0800, Christoph Hellwig wrote: > > > On Tue, Jan 13, 2026 at 02:09:39PM +0800, colyli@fnnas.com wrote: > > > > From: Coly Li > > > > > > > > This reverts commit 53280e398471f0bddbb17b798a63d41264651325. > > > > > > > > The above commit tries to address the race in bio chain handling, > > > > but it seems in detached_dev_end_io() simply using bio_endio() to > > > > replace bio->bi_end_io() may introduce potential regression. > > > > > > > > This patch revert the commit, let's wait for better fix from Shida. > > > > > > That's a pretty vague commit message for reverting a clear API > > > violation that has caused trouble. What is the story here? > > > > Christoph, you can't call bio_endio() on the same bio twice. You should > > know this. Calling a bare bi_end_io function is the correct thing to do > > when we're getting called from bio_endio(). > > Hi Kent, > > indeed, calling bio_endio() twice is a very bad idea. Nothing in the > quoted commit log indicates that is the case, though. If that is > the problem it needs to be fixed, but calling ->bi_end_io directly > is not the proper fix either. That's eaxtly why I'm asking for the > story behind this. No. The original (buggy) patch has your name on it in the suggested-by, you should have done your homework. This almost made it into a bunch of stable releases, where it would have exploded as soon as it hit actual users, and I would've gotten some of those bug reports. You need to reexamine your priorities here.