Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread OGAWA Hirofumi
Jens Axboe writes: > On 8/31/20 10:56 AM, Matthew Wilcox wrote: >> On Mon, Aug 31, 2020 at 10:39:26AM -0600, Jens Axboe wrote: >>> We really should ensure that ->io_pages is always set, imho, instead of >>> having to work-around it in other spots. >> >> Interestingly, there are only three places

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread Jens Axboe
On 8/31/20 11:16 AM, OGAWA Hirofumi wrote: > Jens Axboe writes: > >> On 8/31/20 10:37 AM, OGAWA Hirofumi wrote: >>> Jens Axboe writes: >>> I don't think we should work-around this here. What device is this on? Something like the below may help. >>> >>> The reported bug is from nvme sta

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread OGAWA Hirofumi
Jens Axboe writes: > On 8/31/20 10:37 AM, OGAWA Hirofumi wrote: >> Jens Axboe writes: >> >>> I don't think we should work-around this here. What device is this on? >>> Something like the below may help. >> >> The reported bug is from nvme stack, and the below patch (I submitted >> same patch t

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread Jens Axboe
On 8/31/20 10:56 AM, Matthew Wilcox wrote: > On Mon, Aug 31, 2020 at 10:39:26AM -0600, Jens Axboe wrote: >> We really should ensure that ->io_pages is always set, imho, instead of >> having to work-around it in other spots. > > Interestingly, there are only three places in the entire kernel which

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread Matthew Wilcox
On Mon, Aug 31, 2020 at 10:39:26AM -0600, Jens Axboe wrote: > We really should ensure that ->io_pages is always set, imho, instead of > having to work-around it in other spots. Interestingly, there are only three places in the entire kernel which _use_ bdi->io_pages. FAT, Verity and the pagecache

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread Jens Axboe
On 8/31/20 10:37 AM, OGAWA Hirofumi wrote: > Jens Axboe writes: > >> On Sat, Aug 29, 2020 at 7:08 PM OGAWA Hirofumi >> wrote: >>> >>> On one system, there was bdi->io_pages==0. This seems to be the bug of >>> a driver somewhere, and should fix it though. Anyway, it is better to >>> avoid the di

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread OGAWA Hirofumi
Jens Axboe writes: > On Sat, Aug 29, 2020 at 7:08 PM OGAWA Hirofumi > wrote: >> >> On one system, there was bdi->io_pages==0. This seems to be the bug of >> a driver somewhere, and should fix it though. Anyway, it is better to >> avoid the divide-by-zero Oops. >> >> So this check it. >> >> Sign

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-31 Thread Jens Axboe
On Sat, Aug 29, 2020 at 7:08 PM OGAWA Hirofumi wrote: > > On one system, there was bdi->io_pages==0. This seems to be the bug of > a driver somewhere, and should fix it though. Anyway, it is better to > avoid the divide-by-zero Oops. > > So this check it. > > Signed-off-by: OGAWA Hirofumi > Cc:

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-30 Thread OGAWA Hirofumi
Sasha Levin writes: > Hi > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v5.8.5, v5.4.61, v4.19.142, > v4.14.195, v4.9.234

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-30 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.8.5, v5.4.61, v4.19.142, v4.14.195, v4.9.234, v4.4.234. v5.8.5: Build OK! v5.4.6

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-30 Thread OGAWA Hirofumi
Matthew Wilcox writes: > On Sun, Aug 30, 2020 at 10:54:35AM +0900, OGAWA Hirofumi wrote: >> Matthew Wilcox writes: >> >> Hm, io_pages is limited by driver setting too, and io_pages can be lower >> than ra_pages, e.g. usb storage. >> >> Assuming ra_pages is user intent of readahead window. So i

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-29 Thread Matthew Wilcox
On Sun, Aug 30, 2020 at 10:54:35AM +0900, OGAWA Hirofumi wrote: > Matthew Wilcox writes: > > > On Sun, Aug 30, 2020 at 09:59:41AM +0900, OGAWA Hirofumi wrote: > >> On one system, there was bdi->io_pages==0. This seems to be the bug of > >> a driver somewhere, and should fix it though. Anyway, it

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-29 Thread OGAWA Hirofumi
Matthew Wilcox writes: > On Sun, Aug 30, 2020 at 09:59:41AM +0900, OGAWA Hirofumi wrote: >> On one system, there was bdi->io_pages==0. This seems to be the bug of >> a driver somewhere, and should fix it though. Anyway, it is better to >> avoid the divide-by-zero Oops. >> >> So this check it. >>

Re: [PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-29 Thread Matthew Wilcox
On Sun, Aug 30, 2020 at 09:59:41AM +0900, OGAWA Hirofumi wrote: > On one system, there was bdi->io_pages==0. This seems to be the bug of > a driver somewhere, and should fix it though. Anyway, it is better to > avoid the divide-by-zero Oops. > > So this check it. > > Signed-off-by: OGAWA Hirofumi

[PATCH] fat: Avoid oops when bdi->io_pages==0

2020-08-29 Thread OGAWA Hirofumi
On one system, there was bdi->io_pages==0. This seems to be the bug of a driver somewhere, and should fix it though. Anyway, it is better to avoid the divide-by-zero Oops. So this check it. Signed-off-by: OGAWA Hirofumi Cc: --- fs/fat/fatent.c |2 +- 1 file changed, 1 insertion(+), 1 delet