stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 02/25] bcache: allocate meta data pages as compound pages
       [not found] <20200725120039.91071-1-colyli@suse.de>
@ 2020-07-25 12:00 ` Coly Li
  2020-07-25 12:00 ` [PATCH 07/25] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Coly Li @ 2020-07-25 12:00 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-bcache, Coly Li, stable

There are some meta data of bcache are allocated by multiple pages,
and they are used as bio bv_page for I/Os to the cache device. for
example cache_set->uuids, cache->disk_buckets, journal_write->data,
bset_tree->data.

For such meta data memory, all the allocated pages should be treated
as a single memory block. Then the memory management and underlying I/O
code can treat them more clearly.

This patch adds __GFP_COMP flag to all the location allocating >0 order
pages for the above mentioned meta data. Then their pages are treated
as compound pages now.

Signed-off-by: Coly Li <colyli@suse.de>
Cc: stable@vger.kernel.org
---
 drivers/md/bcache/bset.c    | 2 +-
 drivers/md/bcache/btree.c   | 2 +-
 drivers/md/bcache/journal.c | 4 ++--
 drivers/md/bcache/super.c   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c
index 4995fcaefe29..67a2c47f4201 100644
--- a/drivers/md/bcache/bset.c
+++ b/drivers/md/bcache/bset.c
@@ -322,7 +322,7 @@ int bch_btree_keys_alloc(struct btree_keys *b,
 
 	b->page_order = page_order;
 
-	t->data = (void *) __get_free_pages(gfp, b->page_order);
+	t->data = (void *) __get_free_pages(__GFP_COMP|gfp, b->page_order);
 	if (!t->data)
 		goto err;
 
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 6548a601edf0..dd116c83de80 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -785,7 +785,7 @@ int bch_btree_cache_alloc(struct cache_set *c)
 	mutex_init(&c->verify_lock);
 
 	c->verify_ondisk = (void *)
-		__get_free_pages(GFP_KERNEL, ilog2(bucket_pages(c)));
+		__get_free_pages(GFP_KERNEL|__GFP_COMP, ilog2(bucket_pages(c)));
 
 	c->verify_data = mca_bucket_alloc(c, &ZERO_KEY, GFP_KERNEL);
 
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
index 90aac4e2333f..d8586b6ccb76 100644
--- a/drivers/md/bcache/journal.c
+++ b/drivers/md/bcache/journal.c
@@ -999,8 +999,8 @@ int bch_journal_alloc(struct cache_set *c)
 	j->w[1].c = c;
 
 	if (!(init_fifo(&j->pin, JOURNAL_PIN, GFP_KERNEL)) ||
-	    !(j->w[0].data = (void *) __get_free_pages(GFP_KERNEL, JSET_BITS)) ||
-	    !(j->w[1].data = (void *) __get_free_pages(GFP_KERNEL, JSET_BITS)))
+	    !(j->w[0].data = (void *) __get_free_pages(GFP_KERNEL|__GFP_COMP, JSET_BITS)) ||
+	    !(j->w[1].data = (void *) __get_free_pages(GFP_KERNEL|__GFP_COMP, JSET_BITS)))
 		return -ENOMEM;
 
 	return 0;
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 38d79f66fde5..6db698b1739a 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1776,7 +1776,7 @@ void bch_cache_set_unregister(struct cache_set *c)
 }
 
 #define alloc_bucket_pages(gfp, c)			\
-	((void *) __get_free_pages(__GFP_ZERO|gfp, ilog2(bucket_pages(c))))
+	((void *) __get_free_pages(__GFP_ZERO|__GFP_COMP|gfp, ilog2(bucket_pages(c))))
 
 struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)
 {
-- 
2.26.2


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

* [PATCH 07/25] bcache: avoid nr_stripes overflow in bcache_device_init()
       [not found] <20200725120039.91071-1-colyli@suse.de>
  2020-07-25 12:00 ` [PATCH 02/25] bcache: allocate meta data pages as compound pages Coly Li
@ 2020-07-25 12:00 ` Coly Li
  2020-07-27 21:24   ` Sasha Levin
  2020-07-25 12:00 ` [PATCH 08/25] bcache: fix overflow in offset_to_stripe() Coly Li
  2020-07-25 12:00 ` [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device Coly Li
  3 siblings, 1 reply; 7+ messages in thread
From: Coly Li @ 2020-07-25 12:00 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-bcache, Coly Li, Ken Raeburn, stable

For some block devices which large capacity (e.g. 8TB) but small io_opt
size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu-
lated by,
	DIV_ROUND_UP_ULL(sectors, d->stripe_size);
might be overflow to the unsigned int bcache_device->nr_stripes.

This patch uses the uint64_t variable to store DIV_ROUND_UP_ULL()
and after the value is checked to be available in unsigned int range,
sets it to bache_device->nr_stripes. Then the overflow is avoided.

Reported-and-tested-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783075
Cc: stable@vger.kernel.org
---
 drivers/md/bcache/super.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 6db698b1739a..05ad1cd9f329 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -826,19 +826,19 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
 	struct request_queue *q;
 	const size_t max_stripes = min_t(size_t, INT_MAX,
 					 SIZE_MAX / sizeof(atomic_t));
-	size_t n;
+	uint64_t n;
 	int idx;
 
 	if (!d->stripe_size)
 		d->stripe_size = 1 << 31;
 
-	d->nr_stripes = DIV_ROUND_UP_ULL(sectors, d->stripe_size);
-
-	if (!d->nr_stripes || d->nr_stripes > max_stripes) {
-		pr_err("nr_stripes too large or invalid: %u (start sector beyond end of disk?)\n",
-			(unsigned int)d->nr_stripes);
+	n = DIV_ROUND_UP_ULL(sectors, d->stripe_size);
+	if (!n || n > max_stripes) {
+		pr_err("nr_stripes too large or invalid: %llu (start sector beyond end of disk?)\n",
+			n);
 		return -ENOMEM;
 	}
+	d->nr_stripes = n;
 
 	n = d->nr_stripes * sizeof(atomic_t);
 	d->stripe_sectors_dirty = kvzalloc(n, GFP_KERNEL);
-- 
2.26.2


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

* [PATCH 08/25] bcache: fix overflow in offset_to_stripe()
       [not found] <20200725120039.91071-1-colyli@suse.de>
  2020-07-25 12:00 ` [PATCH 02/25] bcache: allocate meta data pages as compound pages Coly Li
  2020-07-25 12:00 ` [PATCH 07/25] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
@ 2020-07-25 12:00 ` Coly Li
  2020-07-27 21:24   ` Sasha Levin
  2020-07-25 12:00 ` [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device Coly Li
  3 siblings, 1 reply; 7+ messages in thread
From: Coly Li @ 2020-07-25 12:00 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-bcache, Coly Li, Ken Raeburn, stable

offset_to_stripe() returns the stripe number (in type unsigned int) from
an offset (in type uint64_t) by the following calculation,
	do_div(offset, d->stripe_size);
For large capacity backing device (e.g. 18TB) with small stripe size
(e.g. 4KB), the result is 4831838208 and exceeds UINT_MAX. The actual
returned value which caller receives is 536870912, due to the overflow.

Indeed in bcache_device_init(), bcache_device->nr_stripes is limited in
range [1, INT_MAX]. Therefore all valid stripe numbers in bcache are
in range [0, bcache_dev->nr_stripes - 1].

This patch adds a upper limition check in offset_to_stripe(): the max
valid stripe number should be less than bcache_device->nr_stripes. If
the calculated stripe number from do_div() is equal to or larger than
bcache_device->nr_stripe, -EINVAL will be returned. (Normally nr_stripes
is less than INT_MAX, exceeding upper limitation doesn't mean overflow,
therefore -EOVERFLOW is not used as error code.)

This patch also changes nr_stripes' type of struct bcache_device from
'unsigned int' to 'int', and return value type of offset_to_stripe()
from 'unsigned int' to 'int', to match their exact data ranges.

All locations where bcache_device->nr_stripes and offset_to_stripe() are
referenced also get updated for the above type change.

Reported-and-tested-by: Ken Raeburn <raeburn@redhat.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783075
Cc: stable@vger.kernel.org
---
 drivers/md/bcache/bcache.h    |  2 +-
 drivers/md/bcache/writeback.c | 14 +++++++++-----
 drivers/md/bcache/writeback.h | 19 +++++++++++++++++--
 3 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h
index 221e0191b687..80e3c4813fb0 100644
--- a/drivers/md/bcache/bcache.h
+++ b/drivers/md/bcache/bcache.h
@@ -264,7 +264,7 @@ struct bcache_device {
 #define BCACHE_DEV_UNLINK_DONE		2
 #define BCACHE_DEV_WB_RUNNING		3
 #define BCACHE_DEV_RATE_DW_RUNNING	4
-	unsigned int		nr_stripes;
+	int			nr_stripes;
 	unsigned int		stripe_size;
 	atomic_t		*stripe_sectors_dirty;
 	unsigned long		*full_dirty_stripes;
diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
index 5397a2c5d6cc..4f4ad6b3d43a 100644
--- a/drivers/md/bcache/writeback.c
+++ b/drivers/md/bcache/writeback.c
@@ -521,15 +521,19 @@ void bcache_dev_sectors_dirty_add(struct cache_set *c, unsigned int inode,
 				  uint64_t offset, int nr_sectors)
 {
 	struct bcache_device *d = c->devices[inode];
-	unsigned int stripe_offset, stripe, sectors_dirty;
+	unsigned int stripe_offset, sectors_dirty;
+	int stripe;
 
 	if (!d)
 		return;
 
+	stripe = offset_to_stripe(d, offset);
+	if (stripe < 0)
+		return;
+
 	if (UUID_FLASH_ONLY(&c->uuids[inode]))
 		atomic_long_add(nr_sectors, &c->flash_dev_dirty_sectors);
 
-	stripe = offset_to_stripe(d, offset);
 	stripe_offset = offset & (d->stripe_size - 1);
 
 	while (nr_sectors) {
@@ -569,12 +573,12 @@ static bool dirty_pred(struct keybuf *buf, struct bkey *k)
 static void refill_full_stripes(struct cached_dev *dc)
 {
 	struct keybuf *buf = &dc->writeback_keys;
-	unsigned int start_stripe, stripe, next_stripe;
+	unsigned int start_stripe, next_stripe;
+	int stripe;
 	bool wrapped = false;
 
 	stripe = offset_to_stripe(&dc->disk, KEY_OFFSET(&buf->last_scanned));
-
-	if (stripe >= dc->disk.nr_stripes)
+	if (stripe < 0)
 		stripe = 0;
 
 	start_stripe = stripe;
diff --git a/drivers/md/bcache/writeback.h b/drivers/md/bcache/writeback.h
index b029843ce5b6..3f1230e22de0 100644
--- a/drivers/md/bcache/writeback.h
+++ b/drivers/md/bcache/writeback.h
@@ -52,10 +52,22 @@ static inline uint64_t bcache_dev_sectors_dirty(struct bcache_device *d)
 	return ret;
 }
 
-static inline unsigned int offset_to_stripe(struct bcache_device *d,
+static inline int offset_to_stripe(struct bcache_device *d,
 					uint64_t offset)
 {
 	do_div(offset, d->stripe_size);
+
+	/* d->nr_stripes is in range [1, INT_MAX] */
+	if (unlikely(offset >= d->nr_stripes)) {
+		pr_err("Invalid stripe %llu (>= nr_stripes %d).\n",
+			offset, d->nr_stripes);
+		return -EINVAL;
+	}
+
+	/*
+	 * Here offset is definitly smaller than INT_MAX,
+	 * return it as int will never overflow.
+	 */
 	return offset;
 }
 
@@ -63,7 +75,10 @@ static inline bool bcache_dev_stripe_dirty(struct cached_dev *dc,
 					   uint64_t offset,
 					   unsigned int nr_sectors)
 {
-	unsigned int stripe = offset_to_stripe(&dc->disk, offset);
+	int stripe = offset_to_stripe(&dc->disk, offset);
+
+	if (stripe < 0)
+		return false;
 
 	while (1) {
 		if (atomic_read(dc->disk.stripe_sectors_dirty + stripe))
-- 
2.26.2


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

* [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device
       [not found] <20200725120039.91071-1-colyli@suse.de>
                   ` (2 preceding siblings ...)
  2020-07-25 12:00 ` [PATCH 08/25] bcache: fix overflow in offset_to_stripe() Coly Li
@ 2020-07-25 12:00 ` Coly Li
  2020-07-26 15:07   ` Christoph Hellwig
  3 siblings, 1 reply; 7+ messages in thread
From: Coly Li @ 2020-07-25 12:00 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-bcache, Coly Li, Christoph Hellwig, stable

Commit 85750aeb748f ("bcache: use bio_{start,end}_io_acct") moves the
io account code to the location after bio_set_dev(bio, dc->bdev) in
cached_dev_make_request(). Then the account is performed incorrectly on
backing device, indeed the I/O should be counted to bcache device like
/dev/bcache0.

With the mistaken I/O account, iostat does not display I/O counts for
bcache device and all the numbers go to backing device. In writeback
mode, the hard drive may have 340K+ IOPS which is impossible and wrong
for spinning disk.

This patch introduces bch_bio_start_io_acct() and bch_bio_end_io_acct(),
which switches bio->bi_disk to bcache device before calling
bio_start_io_acct() or bio_end_io_acct(). Now the I/Os are counted to
bcache device, and bcache device, cache device and backing device have
their correct I/O count information back.

Fixes: 85750aeb748f ("bcache: use bio_{start,end}_io_acct")
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
---
 drivers/md/bcache/request.c | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 7acf024e99f3..8ea0f079c1d0 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -617,6 +617,28 @@ static void cache_lookup(struct closure *cl)
 
 /* Common code for the make_request functions */
 
+static inline void bch_bio_start_io_acct(struct gendisk *acct_bi_disk,
+					 struct bio *bio,
+					 unsigned long *start_time)
+{
+	struct gendisk *saved_bi_disk = bio->bi_disk;
+
+	bio->bi_disk = acct_bi_disk;
+	*start_time = bio_start_io_acct(bio);
+	bio->bi_disk = saved_bi_disk;
+}
+
+static inline void bch_bio_end_io_acct(struct gendisk *acct_bi_disk,
+				       struct bio *bio,
+				       unsigned long start_time)
+{
+	struct gendisk *saved_bi_disk = bio->bi_disk;
+
+	bio->bi_disk = acct_bi_disk;
+	bio_end_io_acct(bio, start_time);
+	bio->bi_disk = saved_bi_disk;
+}
+
 static void request_endio(struct bio *bio)
 {
 	struct closure *cl = bio->bi_private;
@@ -668,7 +690,7 @@ static void backing_request_endio(struct bio *bio)
 static void bio_complete(struct search *s)
 {
 	if (s->orig_bio) {
-		bio_end_io_acct(s->orig_bio, s->start_time);
+		bch_bio_end_io_acct(s->d->disk, s->orig_bio, s->start_time);
 		trace_bcache_request_end(s->d, s->orig_bio);
 		s->orig_bio->bi_status = s->iop.status;
 		bio_endio(s->orig_bio);
@@ -728,7 +750,7 @@ static inline struct search *search_alloc(struct bio *bio,
 	s->recoverable		= 1;
 	s->write		= op_is_write(bio_op(bio));
 	s->read_dirty_data	= 0;
-	s->start_time		= bio_start_io_acct(bio);
+	bch_bio_start_io_acct(d->disk, bio, &s->start_time);
 
 	s->iop.c		= d->c;
 	s->iop.bio		= NULL;
@@ -1080,7 +1102,7 @@ static void detached_dev_end_io(struct bio *bio)
 	bio->bi_end_io = ddip->bi_end_io;
 	bio->bi_private = ddip->bi_private;
 
-	bio_end_io_acct(bio, ddip->start_time);
+	bch_bio_end_io_acct(ddip->d->disk, bio, ddip->start_time);
 
 	if (bio->bi_status) {
 		struct cached_dev *dc = container_of(ddip->d,
@@ -1105,7 +1127,8 @@ static void detached_dev_do_request(struct bcache_device *d, struct bio *bio)
 	 */
 	ddip = kzalloc(sizeof(struct detached_dev_io_private), GFP_NOIO);
 	ddip->d = d;
-	ddip->start_time = bio_start_io_acct(bio);
+	bch_bio_start_io_acct(d->disk, bio, &ddip->start_time);
+
 	ddip->bi_end_io = bio->bi_end_io;
 	ddip->bi_private = bio->bi_private;
 	bio->bi_end_io = detached_dev_end_io;
-- 
2.26.2


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

* Re: [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device
  2020-07-25 12:00 ` [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device Coly Li
@ 2020-07-26 15:07   ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2020-07-26 15:07 UTC (permalink / raw)
  To: Coly Li; +Cc: axboe, linux-block, linux-bcache, Christoph Hellwig, stable

On Sat, Jul 25, 2020 at 08:00:39PM +0800, Coly Li wrote:
> Commit 85750aeb748f ("bcache: use bio_{start,end}_io_acct") moves the
> io account code to the location after bio_set_dev(bio, dc->bdev) in
> cached_dev_make_request(). Then the account is performed incorrectly on
> backing device, indeed the I/O should be counted to bcache device like
> /dev/bcache0.
> 
> With the mistaken I/O account, iostat does not display I/O counts for
> bcache device and all the numbers go to backing device. In writeback
> mode, the hard drive may have 340K+ IOPS which is impossible and wrong
> for spinning disk.
> 
> This patch introduces bch_bio_start_io_acct() and bch_bio_end_io_acct(),
> which switches bio->bi_disk to bcache device before calling
> bio_start_io_acct() or bio_end_io_acct(). Now the I/Os are counted to
> bcache device, and bcache device, cache device and backing device have
> their correct I/O count information back.

Please switch to use disk_{start,end}_io_acct instead of hacking around
with bi_disk assignments.

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

* Re: [PATCH 07/25] bcache: avoid nr_stripes overflow in bcache_device_init()
  2020-07-25 12:00 ` [PATCH 07/25] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
@ 2020-07-27 21:24   ` Sasha Levin
  0 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-07-27 21:24 UTC (permalink / raw)
  To: Sasha Levin, Coly Li, axboe; +Cc: linux-block, linux-bcache, stable, stable

Hi

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.7.10, v5.4.53, v4.19.134, v4.14.189, v4.9.231, v4.4.231.

v5.7.10: Failed to apply! Possible dependencies:
    46f5aa8806e3 ("bcache: Convert pr_<level> uses to a more typical style")

v5.4.53: Failed to apply! Possible dependencies:
    253a99d95d5b ("bcache: move macro btree() and btree_root() into btree.h")
    46f5aa8806e3 ("bcache: Convert pr_<level> uses to a more typical style")
    49d08d596e85 ("bcache: check return value of prio_read()")
    8e7102273f59 ("bcache: make bch_btree_check() to be multithreaded")
    aaf8dbeab586 ("bcache: add more accurate error messages in read_super()")
    b144e45fc576 ("bcache: make bch_sectors_dirty_init() to be multithreaded")
    feac1a70b806 ("bcache: add bcache_ prefix to btree_root() and btree() macros")

v4.19.134: Failed to apply! Possible dependencies:
    0b13efecf5f2 ("bcache: add return value check to bch_cached_dev_run()")
    253a99d95d5b ("bcache: move macro btree() and btree_root() into btree.h")
    2aa8c529387c ("bcache: avoid unnecessary btree nodes flushing in btree_flush_write()")
    46f5aa8806e3 ("bcache: Convert pr_<level> uses to a more typical style")
    49d08d596e85 ("bcache: check return value of prio_read()")
    4b6efb4bdbce ("bcache: more detailed error message to bcache_device_link()")
    4e361e020e72 ("bcache: update comment in sysfs.c")
    5d9e06d60eee ("bcache: fix possible memory leak in bch_cached_dev_run()")
    792732d9852c ("bcache: use kmemdup_nul for CACHED_LABEL buffer")
    88c12d42d2bb ("bcache: add error check for calling register_bdev()")
    89e0341af082 ("bcache: use sysfs_match_string() instead of __sysfs_match_string()")
    8e7102273f59 ("bcache: make bch_btree_check() to be multithreaded")
    91be66e1318f ("bcache: performance improvement for btree_flush_write()")
    aaf8dbeab586 ("bcache: add more accurate error messages in read_super()")
    cb07ad63682f ("bcache: introduce force_wake_up_gc()")
    e0faa3d7f79f ("bcache: improve error message in bch_cached_dev_run()")
    f54478c6e226 ("bcache: fix input integer overflow of congested threshold")
    feac1a70b806 ("bcache: add bcache_ prefix to btree_root() and btree() macros")

v4.14.189: Failed to apply! Possible dependencies:
    1d316e658374 ("bcache: implement PI controller for writeback rate")
    1dbe32ad0a82 ("bcache: rewrite multiple partitions support")
    25d8be77e192 ("block: move bio_alloc_pages() to bcache")
    27a40ab9269e ("bcache: add backing_request_endio() for bi_end_io")
    3b304d24a718 ("bcache: convert cached_dev.count from atomic_t to refcount_t")
    3fd47bfe55b0 ("bcache: stop dc->writeback_rate_update properly")
    46f5aa8806e3 ("bcache: Convert pr_<level> uses to a more typical style")
    5138ac6748e3 ("bcache: fix misleading error message in bch_count_io_errors()")
    539d39eb2708 ("bcache: fix wrong return value in bch_debug_init()")
    5f2b18ec8e16 ("bcache: Fix a compiler warning in bcache_device_init()")
    6ae63e3501c4 ("bcache: replace printk() by pr_*() routines")
    6f10f7d1b02b ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    771f393e8ffc ("bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags")
    804f3c6981f5 ("bcache: fix cached_dev->count usage for bch_cache_set_error()")
    b1092c9af9ed ("bcache: allow quick writeback when backing idle")
    d19936a26658 ("bcache: convert to bioset_init()/mempool_init()")
    d44c2f9e7cc0 ("bcache: update bucket_in_use in real time")

v4.9.231: Failed to apply! Possible dependencies:
    011067b05668 ("blk: replace bioset_create_nobvec() with a flags arg to bioset_create()")
    10273170fd56 ("md: fail if mddev->bio_set can't be created")
    109e37653033 ("md: add block tracing for bio_remapping")
    1dbe32ad0a82 ("bcache: rewrite multiple partitions support")
    2e52d449bcec ("md/raid1: add failfast handling for reads.")
    3b046a97cbd3 ("md/raid1: Refactor raid1_make_request")
    47e0fb461fca ("blk: make the bioset rescue_workqueue optional.")
    578b54ade8a5 ("md/raid1, raid10: add blktrace records when IO is delayed")
    5e2c7a361197 ("md/raid1: abort delayed writes when device fails.")
    5f2b18ec8e16 ("bcache: Fix a compiler warning in bcache_device_init()")
    b8c0d911ac52 ("bcache: partition support: add 16 minors per bcacheN device")
    c230e7e53526 ("md/raid1: simplify the splitting of requests.")
    f2c771a65504 ("md/raid1: fix: IO can block resync indefinitely")
    fd76863e37fe ("RAID1: a new I/O barrier implementation to remove resync window")

v4.4.231: Failed to apply! Possible dependencies:
    011067b05668 ("blk: replace bioset_create_nobvec() with a flags arg to bioset_create()")
    0e5313e2d4ef ("raid10: improve random reads performance")
    10273170fd56 ("md: fail if mddev->bio_set can't be created")
    1dbe32ad0a82 ("bcache: rewrite multiple partitions support")
    2c97cf138527 ("md-cluser: make resync_finish only called after pers->sync_request")
    41a9a0dcf895 ("md-cluster: change resync lock from asynchronous to synchronous")
    47e0fb461fca ("blk: make the bioset rescue_workqueue optional.")
    578b54ade8a5 ("md/raid1, raid10: add blktrace records when IO is delayed")
    5f2b18ec8e16 ("bcache: Fix a compiler warning in bcache_device_init()")
    81baf90af2dc ("bcache: Remove deprecated create_workqueue")
    85ad1d13ee9b ("md: set MD_CHANGE_PENDING in a atomic region")
    b8c0d911ac52 ("bcache: partition support: add 16 minors per bcacheN device")
    c230e7e53526 ("md/raid1: simplify the splitting of requests.")
    fc974ee2bffd ("md: convert to use the generic badblocks code")
    fd76863e37fe ("RAID1: a new I/O barrier implementation to remove resync window")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks
Sasha

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

* Re: [PATCH 08/25] bcache: fix overflow in offset_to_stripe()
  2020-07-25 12:00 ` [PATCH 08/25] bcache: fix overflow in offset_to_stripe() Coly Li
@ 2020-07-27 21:24   ` Sasha Levin
  0 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-07-27 21:24 UTC (permalink / raw)
  To: Sasha Levin, Coly Li, axboe; +Cc: linux-block, linux-bcache, stable, stable

Hi

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.7.10, v5.4.53, v4.19.134, v4.14.189, v4.9.231, v4.4.231.

v5.7.10: Build OK!
v5.4.53: Build OK!
v4.19.134: Build OK!
v4.14.189: Failed to apply! Possible dependencies:
    1d316e658374 ("bcache: implement PI controller for writeback rate")
    25d8be77e192 ("block: move bio_alloc_pages() to bcache")
    27a40ab9269e ("bcache: add backing_request_endio() for bi_end_io")
    3b304d24a718 ("bcache: convert cached_dev.count from atomic_t to refcount_t")
    3fd47bfe55b0 ("bcache: stop dc->writeback_rate_update properly")
    5138ac6748e3 ("bcache: fix misleading error message in bch_count_io_errors()")
    539d39eb2708 ("bcache: fix wrong return value in bch_debug_init()")
    6f10f7d1b02b ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    771f393e8ffc ("bcache: add CACHE_SET_IO_DISABLE to struct cache_set flags")
    804f3c6981f5 ("bcache: fix cached_dev->count usage for bch_cache_set_error()")
    b1092c9af9ed ("bcache: allow quick writeback when backing idle")
    d19936a26658 ("bcache: convert to bioset_init()/mempool_init()")
    d44c2f9e7cc0 ("bcache: update bucket_in_use in real time")

v4.9.231: Failed to apply! Possible dependencies:
    1d316e658374 ("bcache: implement PI controller for writeback rate")
    3a83f4677539 ("block: bio: pass bvec table to bio_init()")
    3b304d24a718 ("bcache: convert cached_dev.count from atomic_t to refcount_t")
    3fd47bfe55b0 ("bcache: stop dc->writeback_rate_update properly")
    6f10f7d1b02b ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    70fd76140a6c ("block,fs: use REQ_* flags directly")
    804f3c6981f5 ("bcache: fix cached_dev->count usage for bch_cache_set_error()")
    d19936a26658 ("bcache: convert to bioset_init()/mempool_init()")
    e806402130c9 ("block: split out request-only flags into a new namespace")
    ef295ecf090d ("block: better op and flags encoding")

v4.4.231: Failed to apply! Possible dependencies:
    1d316e658374 ("bcache: implement PI controller for writeback rate")
    3a83f4677539 ("block: bio: pass bvec table to bio_init()")
    3b304d24a718 ("bcache: convert cached_dev.count from atomic_t to refcount_t")
    3fd47bfe55b0 ("bcache: stop dc->writeback_rate_update properly")
    4e49ea4a3d27 ("block/fs/drivers: remove rw argument from submit_bio")
    6f10f7d1b02b ("bcache: style fix to replace 'unsigned' by 'unsigned int'")
    804f3c6981f5 ("bcache: fix cached_dev->count usage for bch_cache_set_error()")
    9082e87bfbf8 ("block: remove struct bio_batch")
    ad0d9e76a412 ("bcache: use bio op accessors")
    d19936a26658 ("bcache: convert to bioset_init()/mempool_init()")
    d57d611505d9 ("kernel/fs: fix I/O wait not accounted for RW O_DSYNC")
    ed996a52c868 ("block: simplify and cleanup bvec pool handling")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks
Sasha

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

end of thread, other threads:[~2020-07-27 21:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200725120039.91071-1-colyli@suse.de>
2020-07-25 12:00 ` [PATCH 02/25] bcache: allocate meta data pages as compound pages Coly Li
2020-07-25 12:00 ` [PATCH 07/25] bcache: avoid nr_stripes overflow in bcache_device_init() Coly Li
2020-07-27 21:24   ` Sasha Levin
2020-07-25 12:00 ` [PATCH 08/25] bcache: fix overflow in offset_to_stripe() Coly Li
2020-07-27 21:24   ` Sasha Levin
2020-07-25 12:00 ` [PATCH 25/25] bcache: fix bio_{start,end}_io_acct with proper device Coly Li
2020-07-26 15:07   ` Christoph Hellwig

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