Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp313354pxk; Fri, 11 Sep 2020 07:38:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAcAhvIogvrk06ItjlVPH5+/QojXNmoa7RUk0xCUKXya2/uN9TJtJXz3LeZ8gowp7ETclQ X-Received: by 2002:a50:aa94:: with SMTP id q20mr2283348edc.119.1599835132862; Fri, 11 Sep 2020 07:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599835132; cv=none; d=google.com; s=arc-20160816; b=igJ9H/ViSZwcO9bTKRde7e/7sbW9atQv8ITRfPD3AVxK1WqiMHhBDwPGjDt/uL5Ubu KjnLTcl4++irb9CZEtno9y4bmmViQwTDpCbCbfreKBEWcCGrIKP+xl21WxLMVpApl0Rd w4D5hMd2uOgOzp1/RDeL3QOpZQOarI3b+N6Q9+nOvhOU4larOtaohdfLTnCkvCaMLjRe z4xaIJAWPzrpqLRfiOyCReQq+POyUr8h8q+5gut+RKz7ng2s5OSag2PQn5BIAUdqPNxS G2dVzBA+173DyTB7NC6wMl7nR1tioXeRD7jfCtKepz24tWiGgC4e2JLch4RbqPQRpkbg ZJiA== 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=BCDvXmfY9S4Oo0i58OCEjnfUFg7DkYfasNcjwyHGZHM=; b=U+jUWqvJpQzHbBF7Z+kXpHvwx9r898QySYQI0FOgOhvPdSa+n1Ic43bEkFAswPGAAr BHv5KCkhz2eoFNo9x+izMZCfK/XSYe3vf0sIi3KTGooVNwUVXFHvikkOgBgAU6a8tLkS Cp2PpfOVuNcexlbZ93Y70KQikNcCLF6Rv5EjIg3zRzq+i7wsn54xbtus4lj4N25TIh8j NKQyO9pIEv4I7QL4aB8WaPjvRHoKDZlmhFl268xIeBPsserVN/Vti9C1Tsvyrk7XvlXJ 8rHiW20w8zfKx+GdWKueT2AfSqjkQc8R+Me1WLK4a0nk99fv91Hiow+iTBUQ42V3EhLM gLwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g5sr7gU0; 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 x21si1464978ejb.137.2020.09.11.07.38.29; Fri, 11 Sep 2020 07:38:52 -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=g5sr7gU0; 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 S1726212AbgIKOg7 (ORCPT + 99 others); Fri, 11 Sep 2020 10:36:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:56014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbgIKNMA (ORCPT ); Fri, 11 Sep 2020 09:12:00 -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 CA7BD22460; Fri, 11 Sep 2020 13:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599829238; bh=WlNBCEI9KTfKCFK7pdkqnVaUt/mbl+s3RN+6DE4iLdg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5sr7gU0aGC8V/8M9yjmTEtD+0jQnC2RO6kVk3SNlSErxT/g/J/zODx+NnvdN/Hsp GcYQmrhoVosdYrnTTPeYkwWj+3F0O6RORtgoZPe4kboXOBzO+HLs+ygWmT6S36bfHp QEgRhf6bhvwDDb3D26fDTkFZSnwQ639OXtZzW8gQ= 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.19 2/8] block: ensure bdi->io_pages is always initialized Date: Fri, 11 Sep 2020 14:54:49 +0200 Message-Id: <20200911125421.818030368@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911125421.695645838@linuxfoundation.org> References: <20200911125421.695645838@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 ea33d6abdcfc9..ce3710404544c 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1036,6 +1036,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