Patch "bcache: do not subtract sectors_to_gc for bypassed IO" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.4-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.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 69daf03adef5f7bc13e0ac86b4b8007df1767aab Mon Sep 17 00:00:00 2001
From: Tang Junhui <tang.junhui@xxxxxxxxxx>
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@xxxxxxxxxx>

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@xxxxxxxxxx>
Acked-by: Coly Li <colyli@xxxxxxx>
Reviewed-by: Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 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_FLUSH; 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@xxxxxxxxxx are

queue-4.4/bcache-do-not-subtract-sectors_to_gc-for-bypassed-io.patch
queue-4.4/bcache-correct-cache_dirty_target-in-__update_writeback_rate.patch
queue-4.4/bcache-fix-for-gc-and-write-back-race.patch
queue-4.4/bcache-initialize-dirty-stripes-in-flash_dev_run.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]