[PATCH 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.
--- fs/xfs/xfs_aops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/xfs/xfs_aops.c +3 -3
@@ -975,7 +975,7 @@ xfs_vm_writepage(* Given that we do not allow direct reclaim to call us, we should * 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;/* Is this page beyond the end of the file? */
@@ -1225,9 +1225,9 @@ xfs_vm_releasepage(xfs_count_page_state (page, &delalloc, &unwritten); -if (WARN_ON (delalloc)) +if (WARN_ON_ONCE (delalloc))return 0 ; -if (WARN_ON (unwritten)) +if (WARN_ON_ONCE (unwritten))return 0 ;return try_to_free_buffers (page);
Signature · 6 lines
1.7.10.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Christoph Hellwig
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_ONCEin the writeback code.Signed-off-by Christoph Hellwig <[email protected]>---
The change generally seems fine to me. IIRC, we had a point in time where these issues were prevalent and noisy. We also had a few lingering ones that were hard to reproduce. I do wonder whether this would make that situation difficult to reproduce. For example, running through an xfstests run where one test might reproduce randomly and suppress output from a subsequent, perhaps more frequent reproducer. Am I correct to assume that once fired, the warning wouldn't fire again before a reboot or module reload?
Hmm, did we have asserts that covered these scenarios as well?
Brian
Quoted 35 lines
fs/xfs/xfs_aops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)fs/xfs/xfs_aops.c +3
-3@@ -975,7 +975,7 @@ xfs_vm_writepage(* Given that we do not allow direct reclaim to call us, we should * 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;/* Is this page beyond the end of the file? */ @@ -1225,9 +1225,9 @@ xfs_vm_releasepage(xfs_count_page_state (page, &delalloc, &unwritten); -if (WARN_ON (delalloc)) +if (WARN_ON_ONCE (delalloc))return 0 ; -if (WARN_ON (unwritten)) +if (WARN_ON_ONCE (unwritten))return 0 ;return try_to_free_buffers (page);Signature · 6 lines
1.7.10.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs