Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4158688pxk; Tue, 8 Sep 2020 12:10:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZDMNnpjVVxI6MzIWLzR1AlRhGFY2IlzkEkEimEo4j/lZn/NE3MrCf7i5IJ7c1akkQm/lt X-Received: by 2002:a50:d65e:: with SMTP id c30mr483400edj.57.1599592233252; Tue, 08 Sep 2020 12:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599592233; cv=none; d=google.com; s=arc-20160816; b=w3crqvW2ff/yRqPIVMz42nyvEn294RFrvgHlZ7fajIon/HzZzlHc2u+rIcnrw5CvfH 9qJJjTKxaihLsB5Q1OveKGrI0m+bLEkVU/HLyySaGe4fmYdh4l2XnveQuPvZfYonvPcR //ZYM8XFX/3cQRgrB2eYZXrlnia5W7qrSyMZEYhIB4VzGPj94bKXMcpVIz0FKtk450pV Nj54ar/ib46lrFb3xgfgVyw/BvePxFQz2Pgnn2O07JbzDgIlcrXq2Ud2TEkncYWR7bG8 iGXU0Ws/vPiM+zttEpX1IR1JnIH8eK4kWftV+O/DKImTCloOvMCaKunXGdj4uo142Ijn pMuw== 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=OAzEGhWjjUQxR9g/77rITbnLDcA4Ts20y5cKL2H2Hxc=; b=P3vYM5xYops/Va9cZxJTXZpm6mYn1OvHyyyP8N7u+jmJ6XGGxJjzAcr97IttwPHILr Wt+nk8KZ1bo8huzx0L+rrJtS/41GoEByPQCcvddLvwqBHoq8SqPP60cLaODnLea9eS3Y acvpShgQtxW4MFoDFbtUVJNu8JcISzdOkAAASW6kmICi9pDMQ2ppp6v1vZDDTqq+yfk7 7vI9P10C/fLxYp+AcXS60GspQrs3FiNP7jLohAxtDsERReWWjp3MM91jhyXAn/jwIJlq 1NzeFAH70W8o4lGPKg/Wt928tLbpQHDdjzWQyDCT/swlzRKJY8VwmeVN1Bl5uRdO5z/V 2hTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MJEDcbPW; 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 w6si3198339ejz.365.2020.09.08.12.10.10; Tue, 08 Sep 2020 12:10:33 -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=MJEDcbPW; 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 S1731658AbgIHTGw (ORCPT + 99 others); Tue, 8 Sep 2020 15:06:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:52114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731177AbgIHQHV (ORCPT ); Tue, 8 Sep 2020 12:07:21 -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 88BBC23DC4; Tue, 8 Sep 2020 15:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580014; bh=xTbTZQwcFfwTu49vSPOjDxR+iw+rx0T18NBD7Z6Jznw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJEDcbPWQvFSf6PB3+UUksknb391BExWzYezHLlSwFc14IjnFlWt8fXPiDJ5e7O/z XTHpB3OlO0f2e61an5APJ7zo10ogShiNUGUcgBafLA9AjWnyFvK1vTUTmFk0YobNtg rDDal2/9mRfBN4LABufyJm9thgGx49JBfWoWsOVU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, OGAWA Hirofumi , Christoph Hellwig , Jens Axboe Subject: [PATCH 5.4 108/129] block: ensure bdi->io_pages is always initialized Date: Tue, 8 Sep 2020 17:25:49 +0200 Message-Id: <20200908152235.235494023@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152229.689878733@linuxfoundation.org> References: <20200908152229.689878733@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 commit de1b0ee490eafdf65fac9eef9925391a8369f2dc upstream. 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: Greg Kroah-Hartman --- block/blk-core.c | 1 + 1 file changed, 1 insertion(+) --- a/block/blk-core.c +++ b/block/blk-core.c @@ -502,6 +502,7 @@ struct request_queue *blk_alloc_queue_no goto fail_stats; q->backing_dev_info->ra_pages = VM_READAHEAD_PAGES; + q->backing_dev_info->io_pages = VM_READAHEAD_PAGES; q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK; q->backing_dev_info->name = "block"; q->node = node_id;