From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:34711 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942865AbcJ2ION (ORCPT ); Sat, 29 Oct 2016 04:14:13 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , Ming Lei , Kent Overstreet , Shaohua Li , Eric Wheeler , Coly Li , Yijing Wang , Zheng Liu , Mike Christie , linux-bcache@vger.kernel.org (open list:BCACHE (BLOCK LAYER CACHE)), linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH 30/60] bcache: set flag of QUEUE_FLAG_SPLIT_MP Date: Sat, 29 Oct 2016 16:08:29 +0800 Message-Id: <1477728600-12938-31-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 --- 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