stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 2/8] block: ensure bdi->io_pages is always initialized
Date: Fri, 11 Sep 2020 14:54:49 +0200	[thread overview]
Message-ID: <20200911125421.818030368@linuxfoundation.org> (raw)
In-Reply-To: <20200911125421.695645838@linuxfoundation.org>

From: Jens Axboe <axboe@kernel.dk>

[ 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 <hirofumi@mail.parknet.co.jp>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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




  parent reply	other threads:[~2020-09-11 14:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 12:54 [PATCH 4.19 0/8] 4.19.145-rc1 review Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 1/8] ALSA; firewire-tascam: exclude Tascam FE-8 from detection Greg Kroah-Hartman
2020-09-14  7:47   ` Pavel Machek
2020-09-14  7:58     ` Greg Kroah-Hartman
2020-09-16  8:16       ` Pavel Machek
2020-09-11 12:54 ` Greg Kroah-Hartman [this message]
2020-09-11 12:54 ` [PATCH 4.19 3/8] netlabel: fix problems with mapping removal Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 4/8] net: usb: dm9601: Add USB ID of Keenetic Plus DSL Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 5/8] sctp: not disable bh in the whole sctp_get_port_local() Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 6/8] tipc: fix shutdown() of connectionless socket Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 7/8] net: disable netpoll on fresh napis Greg Kroah-Hartman
2020-09-11 12:54 ` [PATCH 4.19 8/8] net/mlx5e: Dont support phys switch id if not in switchdev mode Greg Kroah-Hartman
2020-09-11 17:10 ` [PATCH 4.19 0/8] 4.19.145-rc1 review Jon Hunter
2020-09-11 22:23 ` Shuah Khan
2020-09-12  7:50 ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200911125421.818030368@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).