提交 448011e2 编写于 作者: C Christoph Hellwig 提交者: Dave Chinner

xfs: tone down writepage/releasepage WARN_ONs

I recently ran into the issue fixed by

  "xfs: kill buffers over failed write ranges properly"

which spams the log with lots of backtraces.  Make debugging any
issues like that easier by using WARN_ON_ONCE in the writeback code.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Signed-off-by: NDave Chinner <david@fromorbit.com>
上级 72208ee0
...@@ -975,7 +975,7 @@ xfs_vm_writepage( ...@@ -975,7 +975,7 @@ xfs_vm_writepage(
* Given that we do not allow direct reclaim to call us, we should * Given that we do not allow direct reclaim to call us, we should
* never be called while in a filesystem transaction. * never be called while in a filesystem transaction.
*/ */
if (WARN_ON(current->flags & PF_FSTRANS)) if (WARN_ON_ONCE(current->flags & PF_FSTRANS))
goto redirty; goto redirty;
/* Is this page beyond the end of the file? */ /* Is this page beyond the end of the file? */
...@@ -1188,9 +1188,9 @@ xfs_vm_releasepage( ...@@ -1188,9 +1188,9 @@ xfs_vm_releasepage(
xfs_count_page_state(page, &delalloc, &unwritten); xfs_count_page_state(page, &delalloc, &unwritten);
if (WARN_ON(delalloc)) if (WARN_ON_ONCE(delalloc))
return 0; return 0;
if (WARN_ON(unwritten)) if (WARN_ON_ONCE(unwritten))
return 0; return 0;
return try_to_free_buffers(page); return try_to_free_buffers(page);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册