btrfs: use E2BIG instead of EIO if compression does not help
authorDavid Sterba <dsterba@suse.cz>
Fri, 20 Jun 2014 09:43:20 +0000 (11:43 +0200)
committerChris Mason <clm@fb.com>
Thu, 3 Jul 2014 14:04:13 +0000 (07:04 -0700)
Return codes got updated in 60e1975acb48fc3d74a3422b21dde74c977ac3d5
(btrfs: return errno instead of -1 from compression)
lzo wrapper returns E2BIG in this case, do the same for zlib.

Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/zlib.c

index 4f196314c0c152a3b80bc696723e554a6bae3005..b67d8fc81277675edb3fdb7beb9b8c4db2c919ad 100644 (file)
@@ -136,7 +136,7 @@ static int zlib_compress_pages(struct list_head *ws,
                if (workspace->def_strm.total_in > 8192 &&
                    workspace->def_strm.total_in <
                    workspace->def_strm.total_out) {
-                       ret = -EIO;
+                       ret = -E2BIG;
                        goto out;
                }
                /* we need another page for writing out.  Test this