block: ensure bdi->io_pages is always initialized
Jens Axboe
maintainerPATCH 1/1 block: ensure bdi->io_pages is always initialized
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.
---
block/blk-core.c +1 -0
@@ -539,6 +539,7 @@ struct request_queue *blk_alloc_queue(int node_id) 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
Jens Axboe
Quoted 9 lines · Jens Axboe
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 aroundbdi->io_pages== 0, which is somewhat messy.Initialize the default value just like we do for ->ra_pages.
Reported-by OGAWA Hirofumi <[email protected]>Signed-off-by Jens Axboe <[email protected]>
When queued to submit, please let us know to drop fatfs workaround "fat-avoid-oops-when-bdi-io_pages==0.patch" in akpm series.
Thanks.
Quoted 13 lines
---
block/blk-core.c +1
-0@@ -539,6 +539,7 @@ struct request_queue *blk_alloc_queue(int node_id) 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]>
Jens Axboe
maintainerQuoted 6 lines · OGAWA Hirofumi
Quoted 4 lines · Jens Axboe
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 aroundbdi->io_pages== 0, which is somewhat messy.
Quoted 8 lines
Quoted 5 lines
Initialize the default value just like we do for ->ra_pages.
Reported-by OGAWA Hirofumi <[email protected]>Signed-off-by Jens Axboe <[email protected]>When queued to submit, please let us know to drop fatfs workaround "fat-avoid-oops-when-bdi-io_pages==0.patch" in akpm series.
Will do - planning on submitting it for 5.9, so probably end this week.
Signature · 1 line
Jens Axboe
Quoted 13 lines · Jens Axboe
Quoted 12 lines · OGAWA Hirofumi
Quoted 9 lines · Jens Axboe
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 aroundbdi->io_pages== 0, which is somewhat messy.Initialize the default value just like we do for ->ra_pages.
Reported-by OGAWA Hirofumi <[email protected]>Signed-off-by Jens Axboe <[email protected]>
Quoted 5 lines
Quoted 2 lines
When queued to submit, please let us know to drop fatfs workaround "fat-avoid-oops-when-bdi-io_pages==0.patch" in akpm series.
Will do - planning on submitting it for 5.9, so probably end this week.
OK. Andrew, please drop fat-avoid-oops-when-bdi-io_pages==0.patch.
Thanks.
Signature · 1 line
OGAWA Hirofumi <[email protected]>
Quoted 7 lines · Jens Axboe
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 aroundbdi->io_pages== 0, which is somewhat messy.Initialize the default value just like we do for ->ra_pages.
This should be a fixes for the commit originally adding ->io_pages instead.
Otherwise looks good:
Jens Axboe
maintainerQuoted 11 lines · Christoph Hellwig
Quoted 7 lines · Jens Axboe
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 aroundbdi->io_pages== 0, which is somewhat messy.Initialize the default value just like we do for ->ra_pages.
This should be a fixes for the commit originally adding ->io_pages instead.
Added that and your reviewed-by, thanks.
Signature · 1 line
Jens Axboe