All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Make a log in dmesg when file creation fails due to no free inodes
@ 2017-10-25  7:54 Gazala Muhamed
  0 siblings, 0 replies; only message in thread
From: Gazala Muhamed @ 2017-10-25  7:54 UTC (permalink / raw)
  To: tytso, adilger.kernel, linux-ext4, linux-kernel, teamathena.nitc

The error code for both "out of disk space" and "out of inodes" is the same
This is misleading to the user. Logging the exact reason helps to find
and debug the issue from the user's side.

Fix bug 197335 - https://bugzilla.kernel.org/show_bug.cgi?id=197335

Signed-off-by: Gazala Muhamed <teamathena.nitc@gmail.com>
---
Changes in v2:
- Use ext4_warning instead of a bare printk
- Signed-off with real name
---
 fs/ext4/namei.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index c1cf020d..4b18badd 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2463,6 +2463,8 @@ static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 		ext4_journal_stop(handle);
 	if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries))
 		goto retry;
+	else if (err == -ENOSPC)
+		ext4_warning(dir->i_sb, "No space on disk, out of inodes");
 	return err;
 }
 
-- 
2.11.0

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

only message in thread, other threads:[~2017-10-25  6:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-25  7:54 [PATCH v2] Make a log in dmesg when file creation fails due to no free inodes Gazala Muhamed

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.