lkml.org 
[lkml]   [2016]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 30/60] bcache: set flag of QUEUE_FLAG_SPLIT_MP
Date
It isn't safe(such as bch_data_verify()) to let bcache deal with
more than 1M bio from multipage bvec, so set this flag and size of
incoming bio won't be bigger than BIO_SP_MAX_SECTORS.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
drivers/md/bcache/super.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 52876fcf2b36..fca023a1a026 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -821,6 +821,12 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size,

blk_queue_write_cache(q, true, true);

+ /*
+ * Once bcache is audited that it is ready to deal with big
+ * incoming bio with multipage bvecs, we can remove the flag.
+ */
+ set_bit(QUEUE_FLAG_SPLIT_MP, &d->disk->queue->queue_flags);
+
return 0;
}

--
2.7.4
\
 
 \ /
  Last update: 2016-10-29 10:25    [W:0.183 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site