]> git.hungrycats.org Git - linux/commitdiff
zygo: fs/btrfs: make noise for EIO: the inline function
authorZygo Blaxell <zblaxell@serenity.furryterror.org>
Sat, 15 Aug 2015 15:44:11 +0000 (11:44 -0400)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 15 Aug 2015 16:47:27 +0000 (12:47 -0400)
(cherry picked from commit 7fcb906872148dc2b293d328e8afb902d1843d47)

zygo: fs/btrfs: make noise for EIO: the inline function in both necessary header files

(cherry picked from commit df25a98ca7c6659e55498721e3d7104687008c5b)

zygo: fs/btrfs: make noise for EIO: the one exception to the GSR rule

(cherry picked from commit 4b5daa5700309ceed3c27d071de962b1394a7208)

zygo: fs/btrfs: make noise for EIO: generalized exception markup

fs/btrfs/compression.h
fs/btrfs/ctree.h
fs/btrfs/eieio.h [new file with mode: 0644]
fs/btrfs/super.c
fs/btrfs/zlib.c

index d181f70caae01471ca80e181818a833b41f057de..a49d902fa427c72f44f7dfed871c361147ae2ba1 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef __BTRFS_COMPRESSION_
 #define __BTRFS_COMPRESSION_
 
+#include "eieio.h"
+
 void btrfs_init_compress(void);
 void btrfs_exit_compress(void);
 
index f9c89cae39ee41fd6ae37bbc36178f8eb9093044..fd535cf0bfb1542a50822e32f48a724fe99e29f1 100644 (file)
@@ -4204,4 +4204,6 @@ static inline int btrfs_test_is_dummy_root(struct btrfs_root *root)
        return 0;
 }
 
+#include "eieio.h"
+
 #endif
diff --git a/fs/btrfs/eieio.h b/fs/btrfs/eieio.h
new file mode 100644 (file)
index 0000000..9163753
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef EIEIO
+static inline int eieio(const char *func, const char *file, int line)
+{
+       printk(KERN_INFO "EIO at %s %s:%d\n", func, file, line);
+       return EIO; /* not EIEIO */
+}
+
+#define EIEIO (eieio(__FUNCTION__, __FILE__, __LINE__))
+#endif
index e477ed67a49ad3fa3a1ae03b9423367cd97789b6..c161caed31d36a118e8c1d3068fa8d0d4ece2fe9 100644 (file)
@@ -74,7 +74,7 @@ static const char *btrfs_decode_error(int errno)
        char *errstr = "unknown";
 
        switch (errno) {
-       case -EIO:
+       case -EIO: /* can't use EIEIO here */
                errstr = "IO failure";
                break;
        case -ENOMEM:
index fb22fd8d8fb8fad73cb4d2b63d4d525da3eea876..a18ff0597319f7e39151edcf51863fda1d09cac0 100644 (file)
@@ -186,7 +186,7 @@ static int zlib_compress_pages(struct list_head *ws,
        zlib_deflateEnd(&workspace->strm);
 
        if (ret != Z_STREAM_END) {
-               ret = -EIO;
+               ret = -EIO; /* Too much noise for EIEIO here */
                goto out;
        }