All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "bcache: do not subtract sectors_to_gc for bypassed IO" has been added to the 4.13-stable tree
@ 2017-09-22 12:03 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-09-22 12:03 UTC (permalink / raw)
  To: tang.junhui, axboe, bcache, colyli, gregkh, hch; +Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From 69daf03adef5f7bc13e0ac86b4b8007df1767aab Mon Sep 17 00:00:00 2001
From: Tang Junhui <tang.junhui@zte.com.cn>
Date: Wed, 6 Sep 2017 14:25:53 +0800
Subject: bcache: do not subtract sectors_to_gc for bypassed IO

From: Tang Junhui <tang.junhui@zte.com.cn>

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 <tang.junhui@zte.com.cn>
Acked-by: Coly Li <colyli@suse.de>
Reviewed-by: Eric Wheeler <bcache@linux.ewheeler.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-22 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 12:03 Patch "bcache: do not subtract sectors_to_gc for bypassed IO" has been added to the 4.13-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.