From patchwork Sat Oct 29 08:08:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9403375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C081F60587 for ; Sat, 29 Oct 2016 08:26:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD2372A181 for ; Sat, 29 Oct 2016 08:26:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A09742A185; Sat, 29 Oct 2016 08:26:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A3432A181 for ; Sat, 29 Oct 2016 08:26:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942948AbcJ2IOS (ORCPT ); Sat, 29 Oct 2016 04:14:18 -0400 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 Received: by mail-pf0-f195.google.com with SMTP id u84so3379546pfj.1; Sat, 29 Oct 2016 01:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nS5KJWSVvYIFDdFlUd9U7Q27MemTsmXLpMTG9gAF3oE=; b=TiSkbcv5NB2Z7VZUqQQiHYpPfW9tdCfc7blNE1WoMpDsdNv7v8jSgA4WaJOXj3WDi/ Of4yJDOnUjti35ogik6U1xGPoNT+/cTb3vGP+FvF5/irJ07566/FdpYyi5sFDG+F/XWQ 2GTpBNZ5obg7HucT4ZyDEatIMTXanm+/evbW4o8TFD9YD7UeJ93kU2BV2DWTn0GZkLNw CKszGalO5ubS5zeqTr8McGkCmMqAPax98xeSRO67QMKJ+CCdbFUNNo9K1n+eGkQD3cFW +Z7OdK/OoM9+Ikuna0moXZUOZBHTh/YCGXtW/xJh58tQiowN/SqM9+ZmVKv1vFtBOUkE wVsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nS5KJWSVvYIFDdFlUd9U7Q27MemTsmXLpMTG9gAF3oE=; b=QWeJPs5Nwt6XdCcankRdfMsC8fVXuNBagttSIuVdQmA9EoD4r0Wbd/t48298Xoarge 4EbIxjmcgYQN+7XGIgmIIVi07PYv3zJici57dTaO+DAyXl4shcNobBK0pQAbZjilioM6 cYDF2H/CGgCGuBPWeV+JInYRqQMr8SQiG/xC5+pn5Fq4zzF9K61jmsT+cqGp2C492tCh T1Y7u9bAlKc1YpIBIJfBmSpjwAGr8H2x26Bg09JoPqCMhmIbjvoxM237TIClZPmwpVnZ fNJEstW+ZHr+zDjS0YhfVrdQV6l18c1rW2L1u3d9USeAp3jdPpTq7YoY4RQMd2L8Rtvu vCoA== X-Gm-Message-State: ABUngvcTsvxiQmS8GVqQKXQHBMD5gzjlrUWh36jB3qDInz4xJUqWSwjQyRHzf6DpA2EYWg== X-Received: by 10.99.121.2 with SMTP id u2mr26361936pgc.141.1477728852319; Sat, 29 Oct 2016 01:14:12 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id 73sm23509761pfn.45.2016.10.29.01.14.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:14:11 -0700 (PDT) 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> X-Mailer: git-send-email 2.7.4 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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }