Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp396565pxk; Fri, 11 Sep 2020 09:47:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeVVBJQmmaBcLLiysUYVqMs41schMMYdPqd4//rRRU91Z3myiYVwpalK93kSV7+x6X5uTA X-Received: by 2002:a05:6402:515:: with SMTP id m21mr3135142edv.348.1599842862388; Fri, 11 Sep 2020 09:47:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599842862; cv=none; d=google.com; s=arc-20160816; b=TKaBUj6XTFJkZqeBx8shsyvNKLboanjWXjOSpBYCwY5cz62U9n9nWxz4YVXwG2oTMQ 5cIbjpjl/yvbJGPYR6+B77dk7C1kc2DbcpqYqIe606VdROaeXqSBqGT6qmjJ/fURzvKK qZ8sd8NsI1ElPIal4sA+UetA19vqExACv35TVQa/6UU/erqBycpXW2EvVMb/k9mQmagw I6zS+6SSqo8eyyN3EWlRD5aKlz5ankf/yD5VI0gIP/x5bHxo6/PzKxTlCmmXujDWJw1/ XT8/Tx/uYcTQiCq2oFw1x/mOG4lTFQxpwuVJHkQD2rrTV5Iuls6INBA2VfFjG/r8P+2f o3DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gpQ6ZySGcVv1umR4L+3DsD4m4QvGEy10p1IRP02RpLQ=; b=IVIJ+ou9ifTNvCK02QrddpAUC8BuI/WsXvdxXx48o8A9Gyo+wYXYeK8sJRx0uMlHXw 7o53arxgMDCyY0Sp5cXpx704N+NX22uWg9Y6Ih7FlqLZIVfzCJRIETOj0f4S9NSRaGX1 ugz8w/FTjJJB3RV6xPjFUT8Owsb5qp5od9RZQWPrQDiKRDnHdCX7lgruzugm99H4X57n WOMvep4jYZxC7fLJARkw1vtaHCBJYZ/7S0jMhXgzeGrJrryFGRFG9qclMVyFZ+Mvtrqm UCF29snWe2X0Pc4YEBQGOGPt+p3zggK8voBk0zX/kD7URAsbZwc5YLkHyHQn28EnEOFp ZoVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JtrIUVBq; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si1578975ejs.214.2020.09.11.09.47.17; Fri, 11 Sep 2020 09:47:42 -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=@kernel.org header.s=default header.b=JtrIUVBq; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgIKQqm (ORCPT + 99 others); Fri, 11 Sep 2020 12:46:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:49580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbgIKPIE (ORCPT ); Fri, 11 Sep 2020 11:08:04 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E462223FB; Fri, 11 Sep 2020 12:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599829145; bh=+GANnE8x2AjIJ0n2g8xz0D6nOtdB9ZiU2pb8fbn4/8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JtrIUVBq2ENAJHFb9J2EwbhirDMcATTn/K49jwUsjF/BchIPFnTPrwHWF0FEUvyCx yFv9Y23uFs0LQeJVtqQhAAkv4UMuwc7s8jRtB7bdsay5AwsLDdDthxuRlhY7h+tl5k RAN0tQKITBNE2jxRPXCl94/AtPoxKxPnqvhuOpGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, OGAWA Hirofumi , Christoph Hellwig , Jens Axboe , Sasha Levin Subject: [PATCH 4.14 02/12] block: ensure bdi->io_pages is always initialized Date: Fri, 11 Sep 2020 14:46:56 +0200 Message-Id: <20200911122458.540739890@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122458.413137406@linuxfoundation.org> References: <20200911122458.413137406@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jens Axboe [ Upstream commit de1b0ee490eafdf65fac9eef9925391a8369f2dc ] If a driver leaves the limit settings as the defaults, then we don't initialize bdi->io_pages. This means that file systems may need to work around bdi->io_pages == 0, which is somewhat messy. Initialize the default value just like we do for ->ra_pages. Cc: stable@vger.kernel.org Fixes: 9491ae4aade6 ("mm: don't cap request size based on read-ahead setting") Reported-by: OGAWA Hirofumi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 4e04c79aa2c27..2407c898ba7d8 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -852,6 +852,8 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) q->backing_dev_info->ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_SIZE; + q->backing_dev_info->io_pages = + (VM_MAX_READAHEAD * 1024) / PAGE_SIZE; q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK; q->backing_dev_info->name = "block"; q->node = node_id; -- 2.25.1