linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] fs: hfsplus: make extend error rate limited
@ 2023-07-19 12:17 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2023-07-19 12:17 UTC (permalink / raw)
  To: Andrew Morton, Alexander Potapenko, linux-fsdevel
  Cc: kernel-janitors, linux-kernel

Extending a file where there is not enough free space can trigger
frequent extend alloc file error messages and this can easily spam
the kernel log. Make the error message rate limited.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/hfsplus/extents.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 7a542f3dbe50..3c572e44f2ad 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -448,9 +448,9 @@ int hfsplus_file_extend(struct inode *inode, bool zeroout)
 	if (sbi->alloc_file->i_size * 8 <
 	    sbi->total_blocks - sbi->free_blocks + 8) {
 		/* extend alloc file */
-		pr_err("extend alloc file! (%llu,%u,%u)\n",
-		       sbi->alloc_file->i_size * 8,
-		       sbi->total_blocks, sbi->free_blocks);
+		pr_err_ratelimited("extend alloc file! (%llu,%u,%u)\n",
+				   sbi->alloc_file->i_size * 8,
+				   sbi->total_blocks, sbi->free_blocks);
 		return -ENOSPC;
 	}
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-19 12:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 12:17 [PATCH][next] fs: hfsplus: make extend error rate limited Colin Ian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).