* [PATCH 0/2] Update errno messages
@ 2020-04-28 15:10 David Sterba
2020-04-28 15:10 ` [PATCH 1/2] btrfs: sort error decoder entries David Sterba
2020-04-28 15:10 ` [PATCH 2/2] btrfs: add more codes to decoder table David Sterba
0 siblings, 2 replies; 5+ messages in thread
From: David Sterba @ 2020-04-28 15:10 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
We have a errno -> string decoder that's used to print verbose messages,
some of the codes that can be found in the wild have been missing in the
table.
David Sterba (2):
btrfs: sort error decoder entries
btrfs: add more codes to decoder table
fs/btrfs/super.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
--
2.25.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] btrfs: sort error decoder entries
2020-04-28 15:10 [PATCH 0/2] Update errno messages David Sterba
@ 2020-04-28 15:10 ` David Sterba
2020-04-28 15:26 ` Anand Jain
2020-04-28 15:10 ` [PATCH 2/2] btrfs: add more codes to decoder table David Sterba
1 sibling, 1 reply; 5+ messages in thread
From: David Sterba @ 2020-04-28 15:10 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
Add the raw errnos and sort them accordingly.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/super.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 7932d8d07cff..9e5d723a0d99 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -72,23 +72,23 @@ const char * __attribute_const__ btrfs_decode_error(int errno)
char *errstr = "unknown";
switch (errno) {
- case -EIO:
+ case -ENOENT: /* -2 */
+ errstr = "No such entry";
+ break;
+ case -EIO: /* -5 */
errstr = "IO failure";
break;
- case -ENOMEM:
+ case -ENOMEM: /* -12*/
errstr = "Out of memory";
break;
- case -EROFS:
- errstr = "Readonly filesystem";
- break;
- case -EEXIST:
+ case -EEXIST: /* -17 */
errstr = "Object already exists";
break;
- case -ENOSPC:
+ case -ENOSPC: /* -28 */
errstr = "No space left";
break;
- case -ENOENT:
- errstr = "No such entry";
+ case -EROFS: /* -30 */
+ errstr = "Readonly filesystem";
break;
}
--
2.25.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] btrfs: add more codes to decoder table
2020-04-28 15:10 [PATCH 0/2] Update errno messages David Sterba
2020-04-28 15:10 ` [PATCH 1/2] btrfs: sort error decoder entries David Sterba
@ 2020-04-28 15:10 ` David Sterba
2020-04-28 15:27 ` Anand Jain
1 sibling, 1 reply; 5+ messages in thread
From: David Sterba @ 2020-04-28 15:10 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
I've grepped logs for 'errno=.*unknown' and found -95, -117 and -122,
now added to the table. The wording is adjusted so it makes sense in
context of filesystem.
Signed-off-by: David Sterba <dsterba@suse.com>
---
fs/btrfs/super.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 9e5d723a0d99..438ecba26557 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -90,6 +90,15 @@ const char * __attribute_const__ btrfs_decode_error(int errno)
case -EROFS: /* -30 */
errstr = "Readonly filesystem";
break;
+ case -EOPNOTSUPP: /* -95 */
+ errstr = "Operation not supported";
+ break;
+ case -EUCLEAN: /* -117 */
+ errstr = "Filesystem corrupted";
+ break;
+ case -EDQUOT: /* -122 */
+ errstr = "Quota exceeded";
+ break;
}
return errstr;
--
2.25.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] btrfs: sort error decoder entries
2020-04-28 15:10 ` [PATCH 1/2] btrfs: sort error decoder entries David Sterba
@ 2020-04-28 15:26 ` Anand Jain
0 siblings, 0 replies; 5+ messages in thread
From: Anand Jain @ 2020-04-28 15:26 UTC (permalink / raw)
To: David Sterba, linux-btrfs
Reviewed-by: Anand Jain <anand.jain@oracle.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] btrfs: add more codes to decoder table
2020-04-28 15:10 ` [PATCH 2/2] btrfs: add more codes to decoder table David Sterba
@ 2020-04-28 15:27 ` Anand Jain
0 siblings, 0 replies; 5+ messages in thread
From: Anand Jain @ 2020-04-28 15:27 UTC (permalink / raw)
To: David Sterba, linux-btrfs
Reviewed-by: Anand Jain <anand.jain@oracle.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-28 15:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 15:10 [PATCH 0/2] Update errno messages David Sterba
2020-04-28 15:10 ` [PATCH 1/2] btrfs: sort error decoder entries David Sterba
2020-04-28 15:26 ` Anand Jain
2020-04-28 15:10 ` [PATCH 2/2] btrfs: add more codes to decoder table David Sterba
2020-04-28 15:27 ` Anand Jain
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.