Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3639204pxv; Mon, 28 Jun 2021 09:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0vAwCkmARUG0glvb/owr1bAu8izJXp3cDMb9WgvQ7i4WrQQZKwoO1H3xruqfPkoous31f X-Received: by 2002:a05:6402:151:: with SMTP id s17mr33618792edu.233.1624896572160; Mon, 28 Jun 2021 09:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624896572; cv=none; d=google.com; s=arc-20160816; b=fLdGrS3ZCdgwibQK9OjuN49wKw5ooGr1OgNG6mQPGDEB94W0DiP/wLV1+N0jO771Yt BrXi6LucD0fE4PZrL8FlJkv/OSDLnpQWw6qshoHcB2NlNBSgEXDGvBCiUE6r6kXrNYq6 mSNV/l7DdJbl+gTBR4iLZVQshu7ymUxruEG0oG9EzVshOIjHAkIt/6rCRCMh1f0lItV+ 8FvLp4XkKAahds+DHp0gHtOfhRddtHQ7Wlg73SVBhhrRBcbay+cXnrnwTid/f6BDmJft UnyU3MX7rd725eQzRTJ3p/kZeimwZy0FQBINWpkt70RnpEpznjdf5ZRKU0rnvGdMzvhD Nf3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=FbRxgVxV6TYzorHgSBImWxbNn2ZvSThvDNVw1mLNnYk=; b=R68397rMYdSWqTnFbuW76E+MM36lNr+JnDxyPAfG3NouU1nNDPHBxbS/4o/kBwgDvz P6n6t12Rukveqy3H1ytxahJ4CIO241tSF+tuOhY2efCLHoiqny3z7fuz2YSWh1t7x55T pSAsoi/D/WoWT4WcX6hZw7hoNNZp95yotLO8rBPabMwnhi1TOpH/yaEXhjbe5X7qOM8D sSh8IEe06/sUOjv6jCNF7r5MVCjUNLSp/79xgU6ojK0dJKwjtw1a9Za5ByGzHqkPlVWi clRFkm+koUw8EVfqEIstn4RkzydTTH/PI3A2bGOjK2mpnwOWpOPsTujWz8lxDQx8aixy u/Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=IwRbmUsp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=IwRbmUsp; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si13685908edw.285.2021.06.28.09.09.06; Mon, 28 Jun 2021 09:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=IwRbmUsp; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=IwRbmUsp; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232740AbhF1QHk (ORCPT + 99 others); Mon, 28 Jun 2021 12:07:40 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:39474 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232643AbhF1QHj (ORCPT ); Mon, 28 Jun 2021 12:07:39 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 13A35202DC; Mon, 28 Jun 2021 16:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624896313; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FbRxgVxV6TYzorHgSBImWxbNn2ZvSThvDNVw1mLNnYk=; b=IwRbmUsp4T2bhw1GFGOkIf4Xze94zjzOqJMfLtsrKa1is8tpW3HIVKxm/SO3GXebmD5ZNn 15nmzdGPpL0vaPGVLZMZ+t1jHZFScY5BUoZ0RWVq6VtT2r1tJZ4TUqzSlWWDNhU/8nnzuh ZuXcisWw4X00JS0wvfKndhNVzM0Omfs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624896313; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FbRxgVxV6TYzorHgSBImWxbNn2ZvSThvDNVw1mLNnYk=; b=rnLZis4H1mf9BW4cssTegaeOyb1L7CSl0f1Zik3dkAaAy6j9E/CFYOkW57ZECiuScYwkpm FVtWMkto2YtBmrCA== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id C845F11906; Mon, 28 Jun 2021 16:05:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624896313; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FbRxgVxV6TYzorHgSBImWxbNn2ZvSThvDNVw1mLNnYk=; b=IwRbmUsp4T2bhw1GFGOkIf4Xze94zjzOqJMfLtsrKa1is8tpW3HIVKxm/SO3GXebmD5ZNn 15nmzdGPpL0vaPGVLZMZ+t1jHZFScY5BUoZ0RWVq6VtT2r1tJZ4TUqzSlWWDNhU/8nnzuh ZuXcisWw4X00JS0wvfKndhNVzM0Omfs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624896313; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FbRxgVxV6TYzorHgSBImWxbNn2ZvSThvDNVw1mLNnYk=; b=rnLZis4H1mf9BW4cssTegaeOyb1L7CSl0f1Zik3dkAaAy6j9E/CFYOkW57ZECiuScYwkpm FVtWMkto2YtBmrCA== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id lxGcIjfz2WB/QQAALh3uQQ (envelope-from ); Mon, 28 Jun 2021 16:05:11 +0000 Subject: Re: [PATCH] bcache: fix cache miss's issue To: Qiang Bai Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, kent.overstreet@gmail.com References: <20210627071817.24296-1-chiang.bai@gmail.com> From: Coly Li Message-ID: Date: Tue, 29 Jun 2021 00:05:09 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210627071817.24296-1-chiang.bai@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/27/21 3:18 PM, Qiang Bai wrote: > when cache miss's IO was done, it needs to continue the left part of IO, > not return -EINTR. -EINTR will stop the whole btree recurse. > > Signed-off-by: Qiang Bai NACK.  The commit log should explain how the fixing issue happens in detail, and why your method fixes it. Thanks. Coly Li > --- > drivers/md/bcache/request.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c > index 29c231758293..b6ff101d2611 100644 > --- a/drivers/md/bcache/request.c > +++ b/drivers/md/bcache/request.c > @@ -914,7 +914,7 @@ static int cached_dev_cache_miss(struct btree *b, struct search *s, > miss = bio_next_split(bio, sectors, GFP_NOIO, &s->d->bio_split); > > /* btree_search_recurse()'s btree iterator is no good anymore */ > - ret = miss == bio ? MAP_DONE : -EINTR; > + ret = miss == bio ? MAP_DONE : MAP_CONTINUE; > > cache_bio = bio_alloc_bioset(GFP_NOWAIT, > DIV_ROUND_UP(s->insert_bio_sectors, PAGE_SECTORS),