Skip to content

Commit a7a42c1

Browse files
axboegregkh
authored andcommitted
block: ensure bdi->io_pages is always initialized
commit de1b0ee 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: 9491ae4 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b7df98a commit a7a42c1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎block/blk-core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ struct request_queue *__blk_alloc_queue(int node_id)
526526
goto fail_stats;
527527

528528
q->backing_dev_info->ra_pages = VM_READAHEAD_PAGES;
529+
q->backing_dev_info->io_pages = VM_READAHEAD_PAGES;
529530
q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK;
530531
q->node = node_id;
531532

0 commit comments

Comments
 (0)