linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcache: fix cache miss's issue
@ 2021-06-27  7:18 Qiang Bai
  2021-06-28 16:05 ` Coly Li
  0 siblings, 1 reply; 2+ messages in thread
From: Qiang Bai @ 2021-06-27  7:18 UTC (permalink / raw)
  To: colyli, kent.overstreet; +Cc: linux-bcache, linux-kernel, Qiang Bai

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 <chiang.bai@gmail.com>
---
 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),
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bcache: fix cache miss's issue
  2021-06-27  7:18 [PATCH] bcache: fix cache miss's issue Qiang Bai
@ 2021-06-28 16:05 ` Coly Li
  0 siblings, 0 replies; 2+ messages in thread
From: Coly Li @ 2021-06-28 16:05 UTC (permalink / raw)
  To: Qiang Bai; +Cc: linux-bcache, linux-kernel, kent.overstreet

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 <chiang.bai@gmail.com>

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),


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-28 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27  7:18 [PATCH] bcache: fix cache miss's issue Qiang Bai
2021-06-28 16:05 ` Coly Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).