From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Zhihao Cheng <chengzhihao1@huawei.com>,
miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
yukuai3@huawei.com
Subject: Re: [PATCH v2] mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity
Date: Fri, 16 Jul 2021 00:50:49 +0200 [thread overview]
Message-ID: <20210715225049.66252-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20210615093905.3473709-1-chengzhihao1@huawei.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Zhihao Cheng <chengzhihao1@huawei.com>,
miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
yukuai3@huawei.com
Subject: Re: [PATCH v2] mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity
Date: Fri, 16 Jul 2021 00:50:49 +0200 [thread overview]
Message-ID: <20210715225049.66252-1-miquel.raynal@bootlin.com> (raw)
In-Reply-To: <20210615093905.3473709-1-chengzhihao1@huawei.com>
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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-07-15 22:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 9:39 [PATCH v2] mtd: mtd_blkdevs: Initialize rq.limits.discard_granularity Zhihao Cheng
2021-06-15 9:39 ` Zhihao Cheng
2021-06-18 7:52 ` Miquel Raynal
2021-06-18 7:52 ` Miquel Raynal
2021-06-18 8:55 ` Zhihao Cheng
2021-06-18 8:55 ` Zhihao Cheng
2021-07-12 13:39 ` Zhihao Cheng
2021-07-15 22:50 ` Miquel Raynal [this message]
2021-07-15 22:50 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210715225049.66252-1-miquel.raynal@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=chengzhihao1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.