Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2956352pxk; Mon, 21 Sep 2020 01:11:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6LdzUY9LdQdWEsWT8MW32wyktn8oJKDMGWg096UGX3Bg5UZdo4Jpx2/AFmGtQWx+sAKku X-Received: by 2002:a05:6402:17b9:: with SMTP id j25mr51369737edy.203.1600675919739; Mon, 21 Sep 2020 01:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600675919; cv=none; d=google.com; s=arc-20160816; b=heVDOaunpR6ogoLxt32FjhEuJmO/iuSB1dy/WQkbvju85bTLj/NHCnRJepSt2NTV58 lom5HgNrnBZu3LodWhZURs7Ovwz9J47rvdobHyweHS1EEJIXuXmMMTwP6Bb8ZRe3Cj6N YoHjNtP9O/zsqwJDgQ4oDlyxl9ZHZYuYxDlsWkYaT5i0NKYhknXJVM19Vh4rophI+clV GHj3PhK8whwKs/RG1CCFiC92qAQaxLRDZQ+xdkcrFJdoE1r9/re9hZYARUPFscg3REK+ NpNcl/KRPoDBWmAocdjoFE0IeMbpMsjk/D9lnXl+mLYZ/jwncdQvMNsncPJ5va3Db+7e y40A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1Wl4CR3g3QHDQhZ33f8Oe6qI9aP7fMZeE5hKlObwJ0M=; b=n4Ae3pv0nXlBzkpTt8bzfr9bn6zxmvB7FRZX+ZVjBcbMgm8cJAWX3d1FBCjcV0ANq4 dSpNocxTv3L/53mWMpZLMhJcCvBtdyyGIaY3vYZJsTeC6Q9HxWLSwewutMIlqeuNnjTt gaK/DB2uysOhZSKaVu4B0nPMLqB4mcQSsBC/exwFhXZud0Jv0hVi9wCbYkLaOvuZWn4K zTyMMVhKdyZt5s5cl556jEn7z/4FWzqANUZEmwP03SI13d4jRLPPe9InQLf305/5Hotk BuwtvGqvrejYruGTjTaBVpaN8KavhoWaf5d7cyRawiGN8YOWzS6x/gaDIAv0iiPaNcLV ybsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="EQwu/cR2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds2si7581323ejc.117.2020.09.21.01.11.36; Mon, 21 Sep 2020 01:11:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="EQwu/cR2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbgIUIJa (ORCPT + 99 others); Mon, 21 Sep 2020 04:09:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726324AbgIUIH4 (ORCPT ); Mon, 21 Sep 2020 04:07:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 221B3C061755; Mon, 21 Sep 2020 01:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=1Wl4CR3g3QHDQhZ33f8Oe6qI9aP7fMZeE5hKlObwJ0M=; b=EQwu/cR2LodCQaFHG05hYNpozm U++iiQM/OeP2AkVo1WTUpU+dI2Dxy9PU9SMGZkQIchixHl5Jx7a0QZk5QjsM3mKR+reWMYdC5dYVn 1/RyKrVkK9YLy3fmeQEtMZdYZZY5sO+JS6B15u1VfcYsZYeIJhvelBd9tWQF1KMWdpSxOaOX7AQ3C wizDdm3VvY8FkkLVnDPzz1aL3YJazDYKgNWRltE/h20ULbz8zDeUg/9HS2R2SkDzVSLHKIMcr5zcW Ycx/mTaN0ejniWyn1jkIqStX3tT5JOPuH+P5WFBTHwcT/t8jMI83iRyfSIeaANZdLu8MwdwI6fNNq LsuftJjQ==; Received: from p4fdb0c34.dip0.t-ipconnect.de ([79.219.12.52] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKGrD-0006WA-MD; Mon, 21 Sep 2020 08:07:32 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Song Liu , Hans de Goede , Coly Li , Richard Weinberger , Minchan Kim , Johannes Thumshirn , Justin Sanders , linux-mtd@lists.infradead.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org Subject: [PATCH 03/13] bcache: inherit the optimal I/O size Date: Mon, 21 Sep 2020 10:07:24 +0200 Message-Id: <20200921080734.452759-4-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921080734.452759-1-hch@lst.de> References: <20200921080734.452759-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Inherit the optimal I/O size setting just like the readahead window, as any reason to do larger I/O does not apply to just readahead. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 1bbdc410ee3c51..48113005ed86ad 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1430,6 +1430,8 @@ static int cached_dev_init(struct cached_dev *dc, unsigned int block_size) dc->disk.disk->queue->backing_dev_info->ra_pages = max(dc->disk.disk->queue->backing_dev_info->ra_pages, q->backing_dev_info->ra_pages); + blk_queue_io_opt(dc->disk.disk->queue, + max(queue_io_opt(dc->disk.disk->queue), queue_io_opt(q))); atomic_set(&dc->io_errors, 0); dc->io_disable = false; -- 2.28.0