From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22A33C47420 for ; Thu, 24 Sep 2020 06:52:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8DFC2395B for ; Thu, 24 Sep 2020 06:52:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="tKir5D9m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727241AbgIXGwI (ORCPT ); Thu, 24 Sep 2020 02:52:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727208AbgIXGv7 (ORCPT ); Thu, 24 Sep 2020 02:51:59 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52E42C0613CE; Wed, 23 Sep 2020 23:51:59 -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=+Llj/AmvV7mHR7T7gL/si/p73lK9Sq9nBxztkJ6FS3s=; b=tKir5D9mG/xQIv7GXHsh7cGgvx 3y0D7EY/xxMVq0o00qzUZIykqJjNgrs/YlOajox62YL/Iqe1EYGLVGzG+9JBHp7et96FOLh238Hhx YlzCTDKvfJ8izWf1tp3jcCDTQrNbzpfQEdmv1OoIS7ecJ3BdKSSx7cr8eRSMRiNDo76JU+baIa100 VFyFZ5UD7PdSLuwNzmfEXvOo1vGPKe0kwug7pVm0C48ljG+J0OOJy8PeZb/9gNVjhHzmwWcIBwwFF KlXPK6ixxl+tjcQ8r9oQC9V0kW8YWIzdUUgP4ynwziLtlB6+XId42Md/7Eg6wR86R1BKV04tFB9rK MW5QkZkQ==; 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 1kLL6W-00019g-Dk; Thu, 24 Sep 2020 06:51:44 +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, Jan Kara Subject: [PATCH 03/13] bcache: inherit the optimal I/O size Date: Thu, 24 Sep 2020 08:51:30 +0200 Message-Id: <20200924065140.726436-4-hch@lst.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200924065140.726436-1-hch@lst.de> References: <20200924065140.726436-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-raid@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 Reviewed-by: Jan Kara Acked-by: Coly Li --- 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