summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/io.c
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2018-08-11 13:19:45 +0800
committerJens Axboe <axboe@kernel.dk>2018-08-11 15:46:41 -0600
commit1fae7cf05293d3a2c9e59c1bc59372322386467c (patch)
treec6ac9b2e0c717f8a7f2f2e75cfcd941726f14d47 /drivers/md/bcache/io.c
parent6f10f7d1b02b1bbc305f88d7696445dd38b13881 (diff)
bcache: style fix to add a blank line after declarations
Signed-off-by: Coly Li <colyli@suse.de> Reviewed-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/io.c')
-rw-r--r--drivers/md/bcache/io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c
index c6b41a09f550..cfc56add799a 100644
--- a/drivers/md/bcache/io.c
+++ b/drivers/md/bcache/io.c
@@ -17,6 +17,7 @@
void bch_bbio_free(struct bio *bio, struct cache_set *c)
{
struct bbio *b = container_of(bio, struct bbio, bio);
+
mempool_free(b, &c->bio_meta);
}
@@ -45,6 +46,7 @@ void bch_submit_bbio(struct bio *bio, struct cache_set *c,
struct bkey *k, unsigned int ptr)
{
struct bbio *b = container_of(bio, struct bbio, bio);
+
bch_bkey_copy_single_ptr(&b->key, k, ptr);
__bch_submit_bbio(bio, c);
}
@@ -132,12 +134,12 @@ void bch_bbio_count_io_errors(struct cache_set *c, struct bio *bio,
if (threshold) {
unsigned int t = local_clock_us();
-
int us = t - b->submit_time_us;
int congested = atomic_read(&c->congested);
if (us > (int) threshold) {
int ms = us / 1024;
+
c->congested_last_us = t;
ms = min(ms, CONGESTED_MAX + congested);