Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758568AbcC3GwX (ORCPT ); Wed, 30 Mar 2016 02:52:23 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:45534 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028AbcC3Gvw (ORCPT ); Wed, 30 Mar 2016 02:51:52 -0400 Date: Tue, 29 Mar 2016 23:51:51 -0700 From: Christoph Hellwig To: Shaohua Li Cc: Christoph Hellwig , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com, Kernel-team@fb.com, "4.2+" , Ming Lei Subject: Re: [PATCH] block: don't make BLK_DEF_MAX_SECTORS too big Message-ID: <20160330065151.GA29666@infradead.org> References: <21cf85d32278bbe5acbc3def0a6db75db98a2670.1459269590.git.shli@fb.com> <20160329211833.GA18532@infradead.org> <20160329220053.GA1716708@devbig084.prn1.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160329220053.GA1716708@devbig084.prn1.facebook.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 529 Lines: 9 On Tue, Mar 29, 2016 at 03:01:10PM -0700, Shaohua Li wrote: > The problem is bcache allocates a big bio (with bio_alloc). The bio is > split with blk_queue_split, but it isn't split to small size because > queue limit. the bio is cloned later in md, which uses bio_alloc_bioset. > bio_alloc_bioset itself can't allocate big size bio. bcache should be fixed to not allocate larger than allowed bios then. And handling too large arguments to bio_alloc_bioset is still useful to avoid the checks in the callers and make it robust.