lkml.org 
[lkml]   [2021]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity
Date
On Tue, 2021-06-15 at 09:39:05 UTC, Zhihao Cheng wrote:
> Since commit b35fd7422c2f8("block: check queue's limits.discard_granularity
> in __blkdev_issue_discard()") checks rq.limits.discard_granularity in
> __blkdev_issue_discard(), we may get following warnings on formatted ftl:
>
> WARNING: CPU: 2 PID: 7313 at block/blk-lib.c:51
> __blkdev_issue_discard+0x2a7/0x390
>
> Reproducer:
> 1. ftl_format /dev/mtd0
> 2. modprobe ftl
> 3. mkfs.vfat /dev/ftla
> 4. mount -odiscard /dev/ftla temp
> 5. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct
> 6. dd if=/dev/zero of=temp/tst bs=1M count=10 oflag=direct
>
> Fix it by initializing rq.limits.discard_granularity if device supports
> discard operation.
>
> Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/fixes, thanks.

Miquel

\
 
 \ /
  Last update: 2021-07-16 00:51    [W:0.060 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site