Skip to contentSkip to conversation

block: Set default value to bdi->io_pages instead of zero

PATCH New OGAWA Hirofumi 1 participant 1 message Aug 30, 2020 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Set default value to bdi->io_pages instead of zero

This may not enough to guarantee ->io_pages is not zero though, instead of leaving ->io_pages as zero, this initializing ->io_pages to sane value. (maybe some part of NVMe driver seems to be)

---
 block/blk-core.c |    1 +
 1 file changed, 1 insertion(+)
block/blk-core.c +1 -0
index 03252af..619a3dc 100644
@@ -526,6 +526,7 @@ struct request_queue *__blk_alloc_queue(
 		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->node = node_id;
 

_

Signature · 1 line
OGAWA Hirofumi <[email protected]>