From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3EE3CF33A75 for ; Thu, 5 Mar 2026 14:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:Mime-Version:Message-Id:From:Date:To:References:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hDW6kgp2FAlH2zyiQGyzezQuq7QDgEP62FGx/3zsjUc=; b=IDqIL5/WJODiBnbarB4l9VPDG2 4GYMBXgHD2dEXPv+R05nLyDOY4E+tDwDCdXMlTjYbsxk+Po7cqX+hyKCeHxLZvdK/M6YYsZSgCDDc Gjx2zbiMYRp6ZJfIEhP+v3xZHOSvZWmvquw5lvxtHsn1PlTqS0gxtpRxeMPAQUs8YtTc=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vy9yQ-0004pd-53; Thu, 05 Mar 2026 14:46:46 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vy9yO-0004pW-L2 for linux-f2fs-devel@lists.sourceforge.net; Thu, 05 Mar 2026 14:46:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:In-Reply-To:Mime-Version: Message-Id:From:Cc:Content-Type:Date:To:References:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fd+yf1MWzvARKFw8KBfrfEqR9xVpjfuoaal13vgTb08=; b=Hpr8ex/A2xLO33CFFIlIyQENBh AtD5X6hFUcLzRdPDZfT8H/JhYGJEkN9hXFd83r2gNEQOSETDwmyz6qdC3GhG6rrKEG6kM0CDCQIBr P5AZxZvwM/WUE7yOIbszh9wR9QHk/Cc2ureT6uIcvIVkVxa3gcV3LTk8kICQXFADqCeA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:In-Reply-To:Mime-Version:Message-Id:From:Cc: Content-Type:Date:To:References:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fd+yf1MWzvARKFw8KBfrfEqR9xVpjfuoaal13vgTb08=; b=kD7462IOk6G7cOl8ENFu9Z94je qSkt5/mXMHfoQzilp+7hJzI5kohCgab2PYmSXNBiywyBXO99npLMKlFJJJ9N63Eno1N2wG4db9tEy MDVr9aNsI33xOliZUgB5qa1itpRe+NPorlJF/u85RMi9QbQhqgfGpSy4U2PnNYKimft4=; Received: from sg-1-12.ptr.blmpb.com ([118.26.132.12]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1vy9yN-00055S-S0 for linux-f2fs-devel@lists.sourceforge.net; Thu, 05 Mar 2026 14:46:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=fnnas-com.20200927.dkim.feishu.cn; t=1772721137; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=fd+yf1MWzvARKFw8KBfrfEqR9xVpjfuoaal13vgTb08=; b=AAxZ2sSHWBbHI7bgo9b94IGyL9gbbFmnG2NRpr2rPRJHORW19c5D9fIVDKQmGT+SjHgHkT w9rTBRmAS7+aci8rWfM7wYOKLGRQnzJMIbXjN+AEn3+iu+I8HP9VaOkhlBNy7Miepdvy7t UiAagZ3L9669d9b9HdLl1d1kt7+OIufueeiBMmVyqxYcOF+mkzjmceodm2A5nCl4vYTDYe 7qxP0ynSnam8VDnptEWPT0qLpJKADLMTFSAzRSAWnag2HxtiNXwEtRZAXpHePZpqV95Tky JhYfI8ghcEjCDB0EnM4Ax0kFdpMCCpE3TAh5Jm2IXeFDMhOo+zyImudtdQaCYA== References: <20260304190424.291743-1-agruenba@redhat.com> <20260304190424.291743-5-agruenba@redhat.com> To: "Andreas Gruenbacher" X-Original-From: Coly Li Date: Thu, 5 Mar 2026 22:32:13 +0800 X-Lms-Return-Path: Content-Disposition: inline Received: from studio.local ([120.245.64.174]) by smtp.feishu.cn with ESMTPS; Thu, 05 Mar 2026 22:32:14 +0800 From: "Coly Li" Message-Id: Mime-Version: 1.0 In-Reply-To: <20260304190424.291743-5-agruenba@redhat.com> X-Headers-End: 1vy9yN-00055S-S0 Subject: Re: [f2fs-dev] [PATCH 4/4] bio: use bio_io_error more often X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Axboe , dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, Christoph Hellwig , drbd-dev@lists.linbit.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Mar 04, 2026 at 08:04:09PM +0800, Andreas Gruenbacher wrote: > Instead of setting bio->bi_status to BLK_STS_IOERR and calling > bio_endio(bio), use the shorthand bio_io_error(bio). > > Created with Coccinelle using the following semantic patch: > > @@ > struct bio *bio; > @@ > - bio->bi_status = BLK_STS_IOERR; > - bio_endio(bio); > + bio_io_error(bio); > > Signed-off-by: Andreas Gruenbacher > Reviewed-by: Christoph Hellwig > --- > block/fops.c | 3 +-- > drivers/block/drbd/drbd_int.h | 3 +-- > drivers/md/bcache/bcache.h | 3 +-- > drivers/md/bcache/request.c | 6 ++---- > drivers/md/dm-mpath.c | 3 +-- > drivers/md/dm-writecache.c | 3 +-- > fs/f2fs/segment.c | 3 +-- > 7 files changed, 8 insertions(+), 16 deletions(-) > [snipped] > > diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h > index ec9ff9715081..e0c9d9eef0a0 100644 > --- a/drivers/md/bcache/bcache.h > +++ b/drivers/md/bcache/bcache.h > @@ -947,8 +947,7 @@ static inline void closure_bio_submit(struct cache_set *c, > { > closure_get(cl); > if (unlikely(test_bit(CACHE_SET_IO_DISABLE, &c->flags))) { > - bio->bi_status = BLK_STS_IOERR; > - bio_endio(bio); > + bio_io_error(bio); > return; > } > submit_bio_noacct(bio); > diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c > index 3fa3b13a410f..0f6fa0a2920b 100644 > --- a/drivers/md/bcache/request.c > +++ b/drivers/md/bcache/request.c > @@ -1178,8 +1178,7 @@ void cached_dev_submit_bio(struct bio *bio) > > if (unlikely((d->c && test_bit(CACHE_SET_IO_DISABLE, &d->c->flags)) || > dc->io_disable)) { > - bio->bi_status = BLK_STS_IOERR; > - bio_endio(bio); > + bio_io_error(bio); > return; > } > > @@ -1283,8 +1282,7 @@ void flash_dev_submit_bio(struct bio *bio) > struct bcache_device *d = bio->bi_bdev->bd_disk->private_data; > > if (unlikely(d->c && test_bit(CACHE_SET_IO_DISABLE, &d->c->flags))) { > - bio->bi_status = BLK_STS_IOERR; > - bio_endio(bio); > + bio_io_error(bio); > return; > } > For bcache part, I feel current hard code is explict and clear. The bio_io_error() wrapper is not so directly understood. This is just my opinion, not a strong objection. Thanks. Coly Li [snipped] _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel