* [PATCH] block: ensure bdi->io_pages is always initialized
@ 2020-08-31 17:23 Jens Axboe
2020-08-31 17:53 ` OGAWA Hirofumi
2020-09-01 5:43 ` Christoph Hellwig
0 siblings, 2 replies; 6+ messages in thread
From: Jens Axboe @ 2020-08-31 17:23 UTC (permalink / raw)
To: linux-block@vger.kernel.org; +Cc: OGAWA Hirofumi
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
Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
diff --git a/block/blk-core.c b/block/blk-core.c
index d9d632639bd1..10c08ac50697 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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;
--
Jens Axboe
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] block: ensure bdi->io_pages is always initialized
2020-08-31 17:23 [PATCH] block: ensure bdi->io_pages is always initialized Jens Axboe
@ 2020-08-31 17:53 ` OGAWA Hirofumi
2020-08-31 18:10 ` Jens Axboe
2020-09-01 5:43 ` Christoph Hellwig
1 sibling, 1 reply; 6+ messages in thread
From: OGAWA Hirofumi @ 2020-08-31 17:53 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org, Andrew Morton
Jens Axboe <axboe@kernel.dk> writes:
> 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
> Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
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.
> ---
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index d9d632639bd1..10c08ac50697 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -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;
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: ensure bdi->io_pages is always initialized
2020-08-31 17:53 ` OGAWA Hirofumi
@ 2020-08-31 18:10 ` Jens Axboe
2020-08-31 18:20 ` OGAWA Hirofumi
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2020-08-31 18:10 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: linux-block@vger.kernel.org, Andrew Morton
On 8/31/20 11:53 AM, OGAWA Hirofumi wrote:
> Jens Axboe <axboe@kernel.dk> writes:
>
>> 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
>> Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> 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.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: ensure bdi->io_pages is always initialized
2020-08-31 18:10 ` Jens Axboe
@ 2020-08-31 18:20 ` OGAWA Hirofumi
0 siblings, 0 replies; 6+ messages in thread
From: OGAWA Hirofumi @ 2020-08-31 18:20 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org, Andrew Morton
Jens Axboe <axboe@kernel.dk> writes:
> On 8/31/20 11:53 AM, OGAWA Hirofumi wrote:
>> Jens Axboe <axboe@kernel.dk> writes:
>>
>>> 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
>>> Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>>> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>>
>> 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.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: ensure bdi->io_pages is always initialized
2020-08-31 17:23 [PATCH] block: ensure bdi->io_pages is always initialized Jens Axboe
2020-08-31 17:53 ` OGAWA Hirofumi
@ 2020-09-01 5:43 ` Christoph Hellwig
2020-09-01 14:00 ` Jens Axboe
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2020-09-01 5:43 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org, OGAWA Hirofumi
On Mon, Aug 31, 2020 at 11:23:32AM -0600, Jens Axboe wrote:
> 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
This should be a fixes for the commit originally adding ->io_pages
instead.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] block: ensure bdi->io_pages is always initialized
2020-09-01 5:43 ` Christoph Hellwig
@ 2020-09-01 14:00 ` Jens Axboe
0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2020-09-01 14:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block@vger.kernel.org, OGAWA Hirofumi
On 8/31/20 11:43 PM, Christoph Hellwig wrote:
> On Mon, Aug 31, 2020 at 11:23:32AM -0600, Jens Axboe wrote:
>> 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
>
> This should be a fixes for the commit originally adding ->io_pages
> instead.
Added that and your reviewed-by, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-01 14:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-31 17:23 [PATCH] block: ensure bdi->io_pages is always initialized Jens Axboe
2020-08-31 17:53 ` OGAWA Hirofumi
2020-08-31 18:10 ` Jens Axboe
2020-08-31 18:20 ` OGAWA Hirofumi
2020-09-01 5:43 ` Christoph Hellwig
2020-09-01 14:00 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox