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 X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA415C2B9F4 for ; Mon, 28 Jun 2021 16:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE7FC61C75 for ; Mon, 28 Jun 2021 16:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232012AbhF1QHk (ORCPT ); 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-bcache@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),