From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49632 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbdIVMDo (ORCPT ); Fri, 22 Sep 2017 08:03:44 -0400 Subject: Patch "bcache: do not subtract sectors_to_gc for bypassed IO" has been added to the 4.13-stable tree To: tang.junhui@zte.com.cn, axboe@kernel.dk, bcache@linux.ewheeler.net, colyli@suse.de, gregkh@linuxfoundation.org, hch@lst.de Cc: , From: Date: Fri, 22 Sep 2017 14:03:51 +0200 Message-ID: <150608183110788@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled bcache: do not subtract sectors_to_gc for bypassed IO to the 4.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: bcache-do-not-subtract-sectors_to_gc-for-bypassed-io.patch and it can be found in the queue-4.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 69daf03adef5f7bc13e0ac86b4b8007df1767aab Mon Sep 17 00:00:00 2001 From: Tang Junhui Date: Wed, 6 Sep 2017 14:25:53 +0800 Subject: bcache: do not subtract sectors_to_gc for bypassed IO From: Tang Junhui commit 69daf03adef5f7bc13e0ac86b4b8007df1767aab upstream. Since bypassed IOs use no bucket, so do not subtract sectors_to_gc to trigger gc thread. Signed-off-by: tang.junhui Acked-by: Coly Li Reviewed-by: Eric Wheeler Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/md/bcache/request.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -196,12 +196,12 @@ static void bch_data_insert_start(struct struct data_insert_op *op = container_of(cl, struct data_insert_op, cl); struct bio *bio = op->bio, *n; - if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) - wake_up_gc(op->c); - if (op->bypass) return bch_data_invalidate(cl); + if (atomic_sub_return(bio_sectors(bio), &op->c->sectors_to_gc) < 0) + wake_up_gc(op->c); + /* * Journal writes are marked REQ_PREFLUSH; if the original write was a * flush, it'll wait on the journal write. Patches currently in stable-queue which might be from tang.junhui@zte.com.cn are queue-4.13/bcache-do-not-subtract-sectors_to_gc-for-bypassed-io.patch queue-4.13/bcache-correct-cache_dirty_target-in-__update_writeback_rate.patch queue-4.13/bcache-fix-for-gc-and-write-back-race.patch queue-4.13/bcache-initialize-dirty-stripes-in-flash_dev_run.patch queue-4.13/bcache-fix-sequential-large-write-io-bypass.patch