]> git.hungrycats.org Git - linux/commitdiff
zygo: fs/btrfs/zlib: but why do we get EIO?
authorZygo Blaxell <zblaxell@serenity.furryterror.org>
Sun, 19 Apr 2015 03:48:32 +0000 (23:48 -0400)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Sun, 19 Apr 2015 03:48:32 +0000 (23:48 -0400)
fs/btrfs/zlib.c

index da8c90024dc700b46100bf7dfa5985be5325b64a..b08bde0cb3a84b35fdb073ce31c4a5b750e2159c 100644 (file)
@@ -89,6 +89,7 @@ static int zlib_compress_pages(struct list_head *ws,
        struct page *in_page = NULL;
        struct page *out_page = NULL;
        unsigned long bytes_left;
+       unsigned long saved_avail_in;
 
        *out_pages = 0;
        *total_out = 0;
@@ -181,12 +182,13 @@ static int zlib_compress_pages(struct list_head *ws,
                        workspace->strm.next_in = data_in;
                }
        }
+       saved_avail_in = workspace->strm.avail_in;
        workspace->strm.avail_in = 0;
        ret = zlib_deflate(&workspace->strm, Z_FINISH);
        zlib_deflateEnd(&workspace->strm);
 
        if (ret != Z_STREAM_END) {
-               /* zygo: this EIO is noise, ignore it */
+               printk(KERN_DEBUG "%s: ret = %d, strm.avail_in = %lu, strm.avail_out = %lu, max_out = %lu, nr_pages = %d, nr_dest_pages = %lu\n", __FUNCTION__, ret, saved_avail_in, workspace->strm.avail_out, max_out, nr_pages, nr_dest_pages);
                ret = -EIO;
                goto out;
        }