Skip to contentSkip to conversation

hfsplus: remove pr_err message on ENOSPC file extend error

PATCH In review Colin King 2 participants 2 messages Nov 6, 2020 – Nov 9, 2020

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 hfsplus: remove pr_err message on ENOSPC file extend error

From: Colin Ian King <[email protected]>

Currently ENOSPC errors that are triggered from extending a file are spamming the kernel log with messages. Since ENOSPC is being returned there is enough information to userspace to inform why the extend is failing and the error message is unnecessary and just more logging noise. This is particularly noticeable when exercising a full hfs filesystem with stress-ng file stress tests.

---
 fs/hfsplus/extents.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
fs/hfsplus/extents.c +1 -5
index a930ddd15681..6cc30482c82c 100644
@@ -446,13 +446,9 @@ int hfsplus_file_extend(struct inode *inode, bool zeroout)
 	int res;
 
 	if (sbi->alloc_file->i_size * 8 <
-	    sbi->total_blocks - sbi->free_blocks + 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);
 		return -ENOSPC;
-	}
 
 	mutex_lock(&hip->extents_lock);
 	if (hip->alloc_blocks = hip->first_blocks)
Signature · 1 line
2.28.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 24 lines · Colin King

From: Colin Ian King <[email protected]>

Currently ENOSPC errors that are triggered from extending a file are spamming the kernel log with messages. Since ENOSPC is being returned there is enough information to userspace to inform why the extend is failing and the error message is unnecessary and just more logging noise. This is particularly noticeable when exercising a full hfs filesystem with stress-ng file stress tests.

---
fs/hfsplus/extents.c | 6 +-----

1 file changed, 1 insertion(+), 5 deletions(-)
fs/hfsplus/extents.c +0 -0
index a930ddd15681..6cc30482c82c 100644
@@ -446,13 +446,9 @@ int hfsplus_file_extend(struct inode *inode, bool zeroout)
 	int res;

fs/hfsplus/extents.c int hfsplus_file_extend(struct inode *inode, bool zeroout) · line 455

Quoted 10 lines
fs/hfsplus/extents.c +1 -5
 
 	if (sbi->alloc_file->i_size * 8 <
-	    sbi->total_blocks - sbi->free_blocks + 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);
 		return -ENOSPC;
-	}

Looks good and sounds reasonable.

Thanks,
Viacheslav Dubeyko.

Quoted 6 lines
fs/hfsplus/extents.c +0 -0
 	mutex_lock(&hip->extents_lock);
 	if (hip->alloc_blocks == hip->first_blocks)
Signature · 1 line
2.28.0