* [PATCH] writeback: add warning messages for not registered bdi
@ 2020-12-17 11:28 Yanjun Zhang
2020-12-22 17:59 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Yanjun Zhang @ 2020-12-17 11:28 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, linux-kernel, Yanjun Zhang
The device name is only printed for the warning case, that bdi is not
registered detected by the function __mark_inode_dirty. Besides, the
device name returned by bdi_dev_name may be "(unknown)" in some cases.
This patch add printed messages about the inode and super block. Once
trigging this warning, we could make more direct analysis.
Signed-off-by: Yanjun Zhang <zhang.yanjuna@h3c.com>
---
fs/fs-writeback.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index e6005c78b..825160cf4 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2323,7 +2323,8 @@ void __mark_inode_dirty(struct inode *inode, int flags)
WARN((wb->bdi->capabilities & BDI_CAP_WRITEBACK) &&
!test_bit(WB_registered, &wb->state),
- "bdi-%s not registered\n", bdi_dev_name(wb->bdi));
+ "bdi-%s not registered, dirtied inode %lu on %s\n",
+ bdi_dev_name(wb->bdi), inode->i_ino, sb->s_id);
inode->dirtied_when = jiffies;
if (dirtytime)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] writeback: add warning messages for not registered bdi
2020-12-17 11:28 [PATCH] writeback: add warning messages for not registered bdi Yanjun Zhang
@ 2020-12-22 17:59 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-12-22 17:59 UTC (permalink / raw)
To: Yanjun Zhang; +Cc: viro, linux-fsdevel, linux-kernel
On Thu 17-12-20 19:28:01, Yanjun Zhang wrote:
> The device name is only printed for the warning case, that bdi is not
> registered detected by the function __mark_inode_dirty. Besides, the
> device name returned by bdi_dev_name may be "(unknown)" in some cases.
>
> This patch add printed messages about the inode and super block. Once
> trigging this warning, we could make more direct analysis.
>
> Signed-off-by: Yanjun Zhang <zhang.yanjuna@h3c.com>
Thanks for the patch but I've just sent a patch to remove this warning from
the kernel a few days ago to Linus because it could result in false
positive... So your patch is not needed anymore.
Honza
> ---
> fs/fs-writeback.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index e6005c78b..825160cf4 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -2323,7 +2323,8 @@ void __mark_inode_dirty(struct inode *inode, int flags)
>
> WARN((wb->bdi->capabilities & BDI_CAP_WRITEBACK) &&
> !test_bit(WB_registered, &wb->state),
> - "bdi-%s not registered\n", bdi_dev_name(wb->bdi));
> + "bdi-%s not registered, dirtied inode %lu on %s\n",
> + bdi_dev_name(wb->bdi), inode->i_ino, sb->s_id);
>
> inode->dirtied_when = jiffies;
> if (dirtytime)
> --
> 2.17.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-22 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 11:28 [PATCH] writeback: add warning messages for not registered bdi Yanjun Zhang
2020-12-22 17:59 ` Jan Kara
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.