]> git.hungrycats.org Git - linux/commitdiff
Revert "zygo: fs/btrfs: make noise for EIO: the inline function"
authorZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 9 Dec 2015 19:18:13 +0000 (14:18 -0500)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 9 Dec 2015 19:19:56 +0000 (14:19 -0500)
This reverts commit 8c05b48817587ea30e4261eb302cf7c52c34e7e0.

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

This reverts commit df25a98ca7c6659e55498721e3d7104687008c5b.

Revert "zygo: fs/btrfs: make noise for EIO: mass convert all the instances"

This reverts commit d77141e6ddb76d222b03ffb761c71eded816f4a1.

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

This reverts commit 4b5daa5700309ceed3c27d071de962b1394a7208.

Revert "zygo: fs/btrfs: make noise for EIO: the inline function"

This reverts commit 7fcb906872148dc2b293d328e8afb902d1843d47.

28 files changed:
fs/btrfs/acl.c
fs/btrfs/backref.c
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/delayed-inode.c
fs/btrfs/dev-replace.c
fs/btrfs/disk-io.c
fs/btrfs/eieio.h [deleted file]
fs/btrfs/extent-tree.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/lzo.c
fs/btrfs/ordered-data.c
fs/btrfs/raid56.c
fs/btrfs/relocation.c
fs/btrfs/scrub.c
fs/btrfs/send.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
fs/btrfs/zlib.c

index 6fc347d3597a21c14537cc543b7bdbdc85f5f94a..9a0124a95851014c9000ed7822dc5fad0a2f6995 100644 (file)
@@ -59,7 +59,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
                /* FIXME, who returns -ENOENT?  I think nobody */
                acl = NULL;
        } else {
-               acl = ERR_PTR(-EIEIO);
+               acl = ERR_PTR(-EIO);
        }
        kfree(value);
 
index 1646416fa4801d9a421c0db8ec8eee2377bbd627..46c36f1b489fa016a1973bca160a25f69c31b8fa 100644 (file)
@@ -522,7 +522,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info,
                                     0);
                if (!eb || !extent_buffer_uptodate(eb)) {
                        free_extent_buffer(eb);
-                       return -EIEIO;
+                       return -EIO;
                }
                btrfs_tree_read_lock(eb);
                if (btrfs_header_level(eb) == 0)
@@ -1065,7 +1065,7 @@ again:
                                                           ref->parent, 0);
                                if (!eb || !extent_buffer_uptodate(eb)) {
                                        free_extent_buffer(eb);
-                                       ret = -EIEIO;
+                                       ret = -EIO;
                                        goto out;
                                }
                                btrfs_tree_read_lock(eb);
@@ -1512,7 +1512,7 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
                return 0;
        }
 
-       return -EIEIO;
+       return -EIO;
 }
 
 /*
index 63909a689c4681eddefcc26fe40e0c9465ae68c9..ce62324c78e7dbc734a2793c39a89de38238e27b 100644 (file)
@@ -131,7 +131,7 @@ static int check_compressed_csum(struct inode *inode,
                           "csum failed ino %llu extent %llu csum %u wanted %u mirror %d",
                           btrfs_ino(inode), disk_start, csum, *cb_sum,
                           cb->mirror_num);
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto fail;
                }
                cb_sum++;
@@ -235,7 +235,7 @@ static noinline void end_compressed_writeback(struct inode *inode,
        int ret;
 
        if (cb->errors)
-               mapping_set_error(inode->i_mapping, -EIEIO);
+               mapping_set_error(inode->i_mapping, -EIO);
 
        while (nr_pages > 0) {
                ret = find_get_pages_contig(inode->i_mapping, index,
@@ -596,7 +596,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
                                   PAGE_CACHE_SIZE);
        read_unlock(&em_tree->lock);
        if (!em)
-               return -EIEIO;
+               return -EIO;
 
        compressed_len = em->block_len;
        cb = kmalloc(compressed_bio_size(root, compressed_len), GFP_NOFS);
index 295cec971107be7a93ceef220cd9d63473f19c34..13a4dc0436c9d3072b401312b3d3bf82a789ae4e 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef __BTRFS_COMPRESSION_
 #define __BTRFS_COMPRESSION_
 
-#include "eieio.h"
-
 void btrfs_init_compress(void);
 void btrfs_exit_compress(void);
 
index 56872aacc14b77389f325a667bebdb36a21ff12e..0f11ebc92f02ac69ffe3302624852cf9e467656a 100644 (file)
@@ -1687,7 +1687,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
                                cur = read_tree_block(root, blocknr, gen);
                                if (!cur || !extent_buffer_uptodate(cur)) {
                                        free_extent_buffer(cur);
-                                       return -EIEIO;
+                                       return -EIO;
                                }
                        } else if (!uptodate) {
                                err = btrfs_read_buffer(cur, gen);
@@ -2473,7 +2473,7 @@ read_block_for_search(struct btrfs_trans_handle *trans,
                }
                free_extent_buffer(tmp);
                btrfs_release_path(p);
-               return -EIEIO;
+               return -EIO;
        }
 
        /*
@@ -2497,12 +2497,12 @@ read_block_for_search(struct btrfs_trans_handle *trans,
        if (tmp) {
                /*
                 * If the read above didn't mark this buffer up to date,
-                * it will never end up being up to date.  Set ret to EIEIO now
+                * it will never end up being up to date.  Set ret to EIO now
                 * and give up so that our caller doesn't loop forever
                 * on our EAGAINs.
                 */
                if (!btrfs_buffer_uptodate(tmp, 0, 0))
-                       ret = -EIEIO;
+                       ret = -EIO;
                free_extent_buffer(tmp);
        }
        return ret;
index 37d6aa35fb7c2e2b3efd2e69ad90c77c15744cfe..33bad982b7094ffde9367142c52a34e1bfece82e 100644 (file)
@@ -4298,6 +4298,4 @@ static inline int btrfs_test_is_dummy_root(struct btrfs_root *root)
        return 0;
 }
 
-#include "eieio.h"
-
 #endif
index c00a830724275ad4dd5044e739a67245bfaa5343..a2ae42720a6afe92701de402b837d56dd66d03b4 100644 (file)
@@ -1166,7 +1166,7 @@ static int __btrfs_run_delayed_items(struct btrfs_trans_handle *trans,
        bool count = (nr > 0);
 
        if (trans->aborted)
-               return -EIEIO;
+               return -EIO;
 
        path = btrfs_alloc_path();
        if (!path)
index ab457217099db618127b6ecf4c1862583d6ba046..354136f418f26d3bd6da1dc142b47ccff2d71525 100644 (file)
@@ -146,7 +146,7 @@ no_valid_dev_replace_entry_found:
                 */
                if (!dev_replace->srcdev &&
                    !btrfs_test_opt(dev_root, DEGRADED)) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        btrfs_warn(fs_info,
                           "cannot mount because device replace operation is ongoing and");
                        btrfs_warn(fs_info,
@@ -155,7 +155,7 @@ no_valid_dev_replace_entry_found:
                }
                if (!dev_replace->tgtdev &&
                    !btrfs_test_opt(dev_root, DEGRADED)) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        btrfs_warn(fs_info,
                           "cannot mount because device replace operation is ongoing and");
                        btrfs_warn(fs_info,
index d918727c790d3c2be4bf1b7c37ef43d75cabcc66..011819f799206586d6f7dc68b34a765839495c28 100644 (file)
@@ -249,7 +249,7 @@ static struct extent_map *btree_get_extent(struct inode *inode,
                free_extent_map(em);
                em = lookup_extent_mapping(em_tree, start, len);
                if (!em)
-                       em = ERR_PTR(-EIEIO);
+                       em = ERR_PTR(-EIO);
        } else if (ret) {
                free_extent_map(em);
                em = ERR_PTR(ret);
@@ -456,7 +456,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_root *root,
                                                   parent_transid, 0))
                                break;
                        else
-                               ret = -EIEIO;
+                               ret = -EIO;
                }
 
                /*
@@ -550,7 +550,7 @@ static noinline int check_leaf(struct btrfs_root *root,
        if (btrfs_item_offset_nr(leaf, 0) + btrfs_item_size_nr(leaf, 0) !=
            BTRFS_LEAF_DATA_SIZE(root)) {
                CORRUPT("invalid item offset size pair", leaf, root, 0);
-               return -EIEIO;
+               return -EIO;
        }
 
        /*
@@ -567,7 +567,7 @@ static noinline int check_leaf(struct btrfs_root *root,
                /* Make sure the keys are in the right order */
                if (btrfs_comp_cpu_keys(&leaf_key, &key) >= 0) {
                        CORRUPT("bad key order", leaf, root, slot);
-                       return -EIEIO;
+                       return -EIO;
                }
 
                /*
@@ -578,7 +578,7 @@ static noinline int check_leaf(struct btrfs_root *root,
                if (btrfs_item_offset_nr(leaf, slot) !=
                        btrfs_item_end_nr(leaf, slot + 1)) {
                        CORRUPT("slot offset bad", leaf, root, slot);
-                       return -EIEIO;
+                       return -EIO;
                }
 
                /*
@@ -589,7 +589,7 @@ static noinline int check_leaf(struct btrfs_root *root,
                if (btrfs_item_end_nr(leaf, slot) >
                    BTRFS_LEAF_DATA_SIZE(root)) {
                        CORRUPT("slot end outside of leaf", leaf, root, slot);
-                       return -EIEIO;
+                       return -EIO;
                }
        }
 
@@ -623,7 +623,7 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
 
        eb->read_mirror = mirror;
        if (test_bit(EXTENT_BUFFER_READ_ERR, &eb->bflags)) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto err;
        }
 
@@ -632,20 +632,20 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
                printk_ratelimited(KERN_ERR "BTRFS (device %s): bad tree block start "
                               "%llu %llu\n",
                               eb->fs_info->sb->s_id, found_start, eb->start);
-               ret = -EIEIO;
+               ret = -EIO;
                goto err;
        }
        if (check_tree_block_fsid(root->fs_info, eb)) {
                printk_ratelimited(KERN_ERR "BTRFS (device %s): bad fsid on block %llu\n",
                               eb->fs_info->sb->s_id, eb->start);
-               ret = -EIEIO;
+               ret = -EIO;
                goto err;
        }
        found_level = btrfs_header_level(eb);
        if (found_level >= BTRFS_MAX_LEVEL) {
                btrfs_err(root->fs_info, "bad tree block level %d",
                           (int)btrfs_header_level(eb));
-               ret = -EIEIO;
+               ret = -EIO;
                goto err;
        }
 
@@ -654,18 +654,18 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
 
        ret = csum_tree_block(root->fs_info, eb, 1);
        if (ret) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto err;
        }
 
        /*
         * If this is a leaf block and it is corrupt, set the corrupt bit so
         * that we don't try and read the other copies of this block, just
-        * return -EIEIO.
+        * return -EIO.
         */
        if (found_level == 0 && check_leaf(root, eb)) {
                set_bit(EXTENT_BUFFER_CORRUPT, &eb->bflags);
-               ret = -EIEIO;
+               ret = -EIO;
        }
 
        if (!ret)
@@ -699,8 +699,8 @@ static int btree_io_failed_hook(struct page *page, int failed_mirror)
        eb->read_mirror = failed_mirror;
        atomic_dec(&eb->io_pages);
        if (test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags))
-               btree_readahead_hook(root, eb, eb->start, -EIEIO);
-       return -EIEIO;  /* we fixed nothing */
+               btree_readahead_hook(root, eb, eb->start, -EIO);
+       return -EIO;    /* we fixed nothing */
 }
 
 static void end_workqueue_bio(struct bio *bio, int err)
@@ -1105,7 +1105,7 @@ int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr,
 
        if (test_bit(EXTENT_BUFFER_CORRUPT, &buf->bflags)) {
                free_extent_buffer(buf);
-               return -EIEIO;
+               return -EIO;
        } else if (extent_buffer_uptodate(buf)) {
                *eb = buf;
        } else {
@@ -1513,7 +1513,7 @@ static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
                ret = -ENOMEM;
                goto find_fail;
        } else if (!btrfs_buffer_uptodate(root->node, generation, 0)) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto read_fail;
        }
        root->commit_root = btrfs_root_node(root);
@@ -2317,7 +2317,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
        if (fs_devices->rw_devices == 0) {
                printk(KERN_WARNING "BTRFS: log replay required "
                       "on RO media\n");
-               return -EIEIO;
+               return -EIO;
        }
 
        log_tree_root = btrfs_alloc_root(fs_info);
@@ -2335,7 +2335,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
                printk(KERN_ERR "BTRFS: failed to read log tree\n");
                free_extent_buffer(log_tree_root->node);
                kfree(log_tree_root);
-               return -EIEIO;
+               return -EIO;
        }
        /* returns with log_tree_root freed on success */
        ret = btrfs_recover_log_trees(log_tree_root);
@@ -3323,7 +3323,7 @@ static int write_dev_flush(struct btrfs_device *device, int wait)
                                      rcu_str_deref(device->name));
                        device->nobarriers = 1;
                } else if (!bio_flagged(bio, BIO_UPTODATE)) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        btrfs_dev_stat_inc_and_print(device,
                                BTRFS_DEV_STAT_FLUSH_ERRS);
                }
@@ -3402,7 +3402,7 @@ static int barrier_all_devices(struct btrfs_fs_info *info)
        }
        if (errors_send > info->num_tolerated_disk_barrier_failures ||
            errors_wait > info->num_tolerated_disk_barrier_failures)
-               return -EIEIO;
+               return -EIO;
        return 0;
 }
 
@@ -3547,9 +3547,9 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors)
                mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);
 
                /* FUA is masked off if unsupported and can't be the reason */
-               btrfs_error(root->fs_info, -EIEIO,
+               btrfs_error(root->fs_info, -EIO,
                            "%d errors while writing supers", total_errors);
-               return -EIEIO;
+               return -EIO;
        }
 
        total_errors = 0;
@@ -3565,9 +3565,9 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors)
        }
        mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);
        if (total_errors > max_errors) {
-               btrfs_error(root->fs_info, -EIEIO,
+               btrfs_error(root->fs_info, -EIO,
                            "%d errors while writing supers", total_errors);
-               return -EIEIO;
+               return -EIO;
        }
        return 0;
 }
diff --git a/fs/btrfs/eieio.h b/fs/btrfs/eieio.h
deleted file mode 100644 (file)
index 9163753..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#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 08f05866351d93b6f23cacc4f12bd743ac7708ce..65be0bf0e71c067d6944ce22bbeb08536fa1f91e 100644 (file)
@@ -1619,7 +1619,7 @@ again:
                err = -ENOENT;
                goto out;
        } else if (WARN_ON(ret)) {
-               err = -EIEIO;
+               err = -EIO;
                goto out;
        }
 
@@ -1990,7 +1990,7 @@ int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr,
                        if (!ret)
                                discarded_bytes += stripe->length;
                        else if (ret != -EOPNOTSUPP)
-                               break; /* Logic errors or -ENOMEM, or -EIEIO but I don't know how that could happen JDM */
+                               break; /* Logic errors or -ENOMEM, or -EIO but I don't know how that could happen JDM */
 
                        /*
                         * Just in case we get back EOPNOTSUPP for some reason,
@@ -2259,7 +2259,7 @@ again:
                                goto again;
                        }
                } else {
-                       err = -EIEIO;
+                       err = -EIO;
                        goto out;
                }
        }
@@ -2422,7 +2422,7 @@ select_delayed_ref(struct btrfs_delayed_ref_head *head)
 
 /*
  * Returns 0 on success or if called with an already aborted transaction.
- * Returns -ENOMEM or -EIEIO on failure and will abort the transaction.
+ * Returns -ENOMEM or -EIO on failure and will abort the transaction.
  */
 static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
                                             struct btrfs_root *root,
@@ -6906,11 +6906,11 @@ wait_block_group_cache_done(struct btrfs_block_group_cache *cache)
 
        caching_ctl = get_caching_control(cache);
        if (!caching_ctl)
-               return (cache->cached == BTRFS_CACHE_ERROR) ? -EIEIO : 0;
+               return (cache->cached == BTRFS_CACHE_ERROR) ? -EIO : 0;
 
        wait_event(caching_ctl->wait, block_group_cache_done(cache));
        if (cache->cached == BTRFS_CACHE_ERROR)
-               ret = -EIEIO;
+               ret = -EIO;
        put_caching_control(caching_ctl);
        return ret;
 }
@@ -8317,7 +8317,7 @@ walk_down:
 
                        eb = read_tree_block(root, child_bytenr, child_gen);
                        if (!eb || !extent_buffer_uptodate(eb)) {
-                               ret = -EIEIO;
+                               ret = -EIO;
                                goto out;
                        }
 
@@ -8549,7 +8549,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
                next = read_tree_block(root, bytenr, generation);
                if (!next || !extent_buffer_uptodate(next)) {
                        free_extent_buffer(next);
-                       return -EIEIO;
+                       return -EIO;
                }
                btrfs_tree_lock(next);
                btrfs_set_lock_blocking(next);
@@ -10301,7 +10301,7 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
 
        ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
        if (ret > 0)
-               ret = -EIEIO;
+               ret = -EIO;
        if (ret < 0)
                goto out;
 
index d0b16deed8c373d6cdc49505450902762915c280..8845f8864e30310f92207597067ea0da270cb19c 100644 (file)
@@ -1775,7 +1775,7 @@ int extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end,
                return 0;
 
        if ((page_ops & PAGE_SET_ERROR) && nr_pages > 0)
-               mapping_set_error(inode->i_mapping, -EIEIO);
+               mapping_set_error(inode->i_mapping, -EIO);
 
        while (nr_pages > 0) {
                ret = find_get_pages_contig(inode->i_mapping, index,
@@ -2049,7 +2049,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
 
        bio = btrfs_io_bio_alloc(GFP_NOFS, 1);
        if (!bio)
-               return -EIEIO;
+               return -EIO;
        bio->bi_iter.bi_size = 0;
        map_length = length;
 
@@ -2057,7 +2057,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
                              &map_length, &bbio, mirror_num);
        if (ret) {
                bio_put(bio);
-               return -EIEIO;
+               return -EIO;
        }
        BUG_ON(mirror_num != bbio->mirror_num);
        sector = bbio->stripes[mirror_num-1].physical >> 9;
@@ -2066,7 +2066,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
        btrfs_put_bbio(bbio);
        if (!dev || !dev->bdev || !dev->writeable) {
                bio_put(bio);
-               return -EIEIO;
+               return -EIO;
        }
        bio->bi_bdev = dev->bdev;
        bio_add_page(bio, page, length, pg_offset);
@@ -2075,7 +2075,7 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
                /* try to remap that extent elsewhere? */
                bio_put(bio);
                btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_WRITE_ERRS);
-               return -EIEIO;
+               return -EIO;
        }
 
        printk_ratelimited_in_rcu(KERN_INFO
@@ -2234,7 +2234,7 @@ int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end,
                if (!em) {
                        read_unlock(&em_tree->lock);
                        kfree(failrec);
-                       return -EIEIO;
+                       return -EIO;
                }
 
                if (em->start > start || em->start + em->len <= start) {
@@ -2244,7 +2244,7 @@ int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end,
                read_unlock(&em_tree->lock);
                if (!em) {
                        kfree(failrec);
-                       return -EIEIO;
+                       return -EIO;
                }
 
                logical = start - em->start;
@@ -2419,7 +2419,7 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
        ret = btrfs_check_repairable(inode, failed_bio, failrec, failed_mirror);
        if (!ret) {
                free_io_failure(inode, failrec);
-               return -EIEIO;
+               return -EIO;
        }
 
        if (failed_bio->bi_vcnt > 1)
@@ -2434,7 +2434,7 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
                                      NULL);
        if (!bio) {
                free_io_failure(inode, failrec);
-               return -EIEIO;
+               return -EIO;
        }
 
        pr_debug("Repair Read Error: submitting new read[%#x] to this_mirror=%d, in_validation=%d\n",
@@ -2471,7 +2471,7 @@ int end_extent_writepage(struct page *page, int err, u64 start, u64 end)
        if (!uptodate) {
                ClearPageUptodate(page);
                SetPageError(page);
-               ret = ret < 0 ? ret : -EIEIO;
+               ret = ret < 0 ? ret : -EIO;
                mapping_set_error(page->mapping, ret);
        }
        return 0;
@@ -2625,7 +2625,7 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
                         * end_bio_extent_readpage as well (if we're lucky, not
                         * in the !uptodate case). In that case it returns 0 and
                         * we just go on with the next page in our bio. If it
-                        * can't handle the error it will return -EIEIO and we
+                        * can't handle the error it will return -EIO and we
                         * remain responsible for that page.
                         */
                        ret = bio_readpage_error(bio, offset, page, start, end,
@@ -3320,7 +3320,7 @@ static noinline_for_stack int writepage_delalloc(struct inode *inode,
                         * IO is started, so we don't want to return > 0
                         * unless things are going well.
                         */
-                       ret = ret < 0 ? ret : -EIEIO;
+                       ret = ret < 0 ? ret : -EIO;
                        goto done;
                }
                /*
@@ -3597,7 +3597,7 @@ done:
                end_page_writeback(page);
        }
        if (PageError(page)) {
-               ret = ret < 0 ? ret : -EIEIO;
+               ret = ret < 0 ? ret : -EIO;
                end_extent_writepage(page, ret, start, page_end);
        }
        unlock_page(page);
@@ -3816,7 +3816,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
                        end_page_writeback(p);
                        if (atomic_sub_and_test(num_pages - i, &eb->io_pages))
                                end_extent_buffer_writeback(eb);
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
                offset += PAGE_CACHE_SIZE;
@@ -5280,7 +5280,7 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
                page = eb->pages[i];
                wait_on_page_locked(page);
                if (!PageUptodate(page))
-                       ret = -EIEIO;
+                       ret = -EIO;
        }
 
        return ret;
index c3a35637fe694bdd6cd41d029ef6697f49c8317f..c668f36898d3a4c2dd2e0e18456dd2cfa6c55747 100644 (file)
@@ -343,7 +343,7 @@ int repair_eb_io_failure(struct btrfs_root *root, struct extent_buffer *eb,
                         int mirror_num);
 
 /*
- * When IO fails, either with EIEIO or csum verification fails, we
+ * When IO fails, either with EIO or csum verification fails, we
  * try other mirrors that might have a good copy of the data.  This
  * io_failure_record is used to record state as we go through all the
  * mirrors.  If another mirror has good data, the page is set up to date
index 571651b1a4a35d5c965483d9d7b095f9161486a2..08155ae399321d2da9293e7402a688f14d182bf0 100644 (file)
@@ -1304,7 +1304,7 @@ static int prepare_uptodate_page(struct page *page, u64 pos,
                lock_page(page);
                if (!PageUptodate(page)) {
                        unlock_page(page);
-                       return -EIEIO;
+                       return -EIO;
                }
        }
        return 0;
@@ -2048,7 +2048,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
         * successful. And we also want to make sure our log doesn't contain
         * file extent items pointing to extents that weren't fully written to -
         * just like in the non fast fsync path, where we check for the ordered
-        * operation's error flag before writing to the log tree and return -EIEIO
+        * operation's error flag before writing to the log tree and return -EIO
         * if any of them had this flag set (btrfs_wait_ordered_range) -
         * therefore we need to check for errors in the ordered operations,
         * which are indicated by ctx.io_err.
@@ -2083,7 +2083,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
                ret = btrfs_end_transaction(trans, root);
        }
 out:
-       return ret > 0 ? -EIEIO : ret;
+       return ret > 0 ? -EIO : ret;
 }
 
 static const struct vm_operations_struct btrfs_file_vm_ops = {
index 64cc568fe8ef255cdfbbe54bcc6d11db5edd7beb..87d05cdd93ba98a0e655c11d500aa1b16a5f4853 100644 (file)
@@ -397,7 +397,7 @@ static int io_ctl_prepare_pages(struct btrfs_io_ctl *io_ctl, struct inode *inode
                                btrfs_err(BTRFS_I(inode)->root->fs_info,
                                           "error reading free space cache");
                                io_ctl_drop_pages(io_ctl);
-                               return -EIEIO;
+                               return -EIO;
                        }
                }
        }
@@ -456,7 +456,7 @@ static int io_ctl_check_generation(struct btrfs_io_ctl *io_ctl, u64 generation)
                                   "(%Lu) does not match inode (%Lu)\n", *gen,
                                   generation);
                io_ctl_unmap_page(io_ctl);
-               return -EIEIO;
+               return -EIO;
        }
        io_ctl->cur += sizeof(u64);
        return 0;
@@ -511,7 +511,7 @@ static int io_ctl_check_crc(struct btrfs_io_ctl *io_ctl, int index)
                printk_ratelimited(KERN_ERR "BTRFS: csum mismatch on free "
                                   "space cache\n");
                io_ctl_unmap_page(io_ctl);
-               return -EIEIO;
+               return -EIO;
        }
 
        return 0;
@@ -1235,7 +1235,7 @@ static int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
        int must_iput = 0;
 
        if (!i_size_read(inode))
-               return -EIEIO;
+               return -EIO;
 
        WARN_ON(io_ctl->pages);
        ret = io_ctl_init(io_ctl, inode, root, 1);
index df96005aec7e7eb201fccb115a7ef42425738db0..b5f035103e5cd29b47d1873344d746227aa661a4 100644 (file)
@@ -2808,7 +2808,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
        nolock = btrfs_is_free_space_inode(inode);
 
        if (test_bit(BTRFS_ORDERED_IOERR, &ordered_extent->flags)) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
@@ -3043,7 +3043,7 @@ zeroit:
        kunmap_atomic(kaddr);
        if (csum_expected == 0)
                return 0;
-       return -EIEIO;
+       return -EIO;
 }
 
 /*
@@ -4605,7 +4605,7 @@ again:
                        goto again;
                }
                if (!PageUptodate(page)) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out_unlock;
                }
        }
@@ -6870,7 +6870,7 @@ insert:
        if (em->start > start || extent_map_end(em) <= start) {
                btrfs_err(root->fs_info, "bad extent! em: [%llu %llu] passed [%llu %llu]",
                        em->start, em->len, start, len);
-               err = -EIEIO;
+               err = -EIO;
                goto out;
        }
 
@@ -7683,7 +7683,7 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
                                         failed_mirror);
        if (!ret) {
                free_io_failure(inode, failrec);
-               return -EIEIO;
+               return -EIO;
        }
 
        if (failed_bio->bi_vcnt > 1)
@@ -7697,7 +7697,7 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
                                      0, isector, repair_endio, repair_arg);
        if (!bio) {
                free_io_failure(inode, failrec);
-               return -EIEIO;
+               return -EIO;
        }
 
        btrfs_debug(BTRFS_I(inode)->root->fs_info,
@@ -8101,7 +8101,7 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip,
        ret = btrfs_map_block(root->fs_info, rw, start_sector << 9,
                              &map_length, NULL, 0);
        if (ret)
-               return -EIEIO;
+               return -EIO;
 
        if (map_length >= orig_bio->bi_iter.bi_size) {
                bio = orig_bio;
@@ -8584,7 +8584,7 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
        if (ret) {
                if (ret == -ENOMEM)
                        ret = VM_FAULT_OOM;
-               else /* -ENOSPC, -EIEIO, etc */
+               else /* -ENOSPC, -EIO, etc */
                        ret = VM_FAULT_SIGBUS;
                if (reserved)
                        goto out;
@@ -9830,7 +9830,7 @@ int btrfs_inode_check_errors(struct inode *inode)
                ret = -ENOSPC;
        if (test_bit(AS_EIO, &inode->i_mapping->flags) &&
            test_and_clear_bit(AS_EIO, &inode->i_mapping->flags))
-               ret = -EIEIO;
+               ret = -EIO;
 
        return ret;
 }
index de6739cc5ac0d6c010addb3bc77a922b19e596ea..dae6c2e6ccaf63e19206da10ecebe10db058a3b2 100644 (file)
@@ -1164,7 +1164,7 @@ again:
                        if (!PageUptodate(page)) {
                                unlock_page(page);
                                page_cache_release(page);
-                               ret = -EIEIO;
+                               ret = -EIO;
                                break;
                        }
                }
index 5bea1f9260f231f919b01e6ef3a3a1834fb3e0c8..a2f0513477313fb6edbc4f898df70262eda96aef 100644 (file)
@@ -143,7 +143,7 @@ static int lzo_compress_pages(struct list_head *ws,
                if (ret != LZO_E_OK) {
                        printk(KERN_DEBUG "BTRFS: deflate in loop returned %d\n",
                               ret);
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out;
                }
 
@@ -334,7 +334,7 @@ cont:
                                        break;
 
                                if (page_in_index + 1 >= total_pages_in) {
-                                       ret = -EIEIO;
+                                       ret = -EIO;
                                        goto done;
                                }
 
@@ -357,7 +357,7 @@ cont:
                        kunmap(pages_in[page_in_index - 1]);
                if (ret != LZO_E_OK) {
                        printk(KERN_WARNING "BTRFS: decompress failed\n");
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
 
@@ -403,12 +403,12 @@ static int lzo_decompress(struct list_head *ws, unsigned char *data_in,
        ret = lzo1x_decompress_safe(data_in, in_len, workspace->buf, &out_len);
        if (ret != LZO_E_OK) {
                printk(KERN_WARNING "BTRFS: decompress failed!\n");
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
        if (out_len < start_byte) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
index d945fee3a07c368282a82bb1f61186c33fa428dd..4761320d35583ab8a26e368c5fd3bbfd205a5829 100644 (file)
@@ -822,7 +822,7 @@ int btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len)
                btrfs_start_ordered_extent(inode, ordered, 1);
                end = ordered->file_offset;
                if (test_bit(BTRFS_ORDERED_IOERR, &ordered->flags))
-                       ret = -EIEIO;
+                       ret = -EIO;
                btrfs_put_ordered_extent(ordered);
                if (ret || end == 0 || end == start)
                        break;
index 17549639338f08f8c5ff9dc970a5eb6f8162c7f3..fa72068bd256018e27a13fbc8326b82ce49b207b 100644 (file)
@@ -891,7 +891,7 @@ static void raid_write_end_io(struct bio *bio, int err)
 
        /* OK, we have read all the stripes we need to. */
        if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
-               err = -EIEIO;
+               err = -EIO;
 
        rbio_orig_end_io(rbio, err, 0);
        return;
@@ -1318,7 +1318,7 @@ write_data:
        return;
 
 cleanup:
-       rbio_orig_end_io(rbio, -EIEIO, 0);
+       rbio_orig_end_io(rbio, -EIO, 0);
 }
 
 /*
@@ -1373,7 +1373,7 @@ static int find_logical_bio_stripe(struct btrfs_raid_bio *rbio,
 }
 
 /*
- * returns -EIEIO if we had too many failures
+ * returns -EIO if we had too many failures
  */
 static int fail_rbio_index(struct btrfs_raid_bio *rbio, int failed)
 {
@@ -1395,7 +1395,7 @@ static int fail_rbio_index(struct btrfs_raid_bio *rbio, int failed)
                rbio->failb = failed;
                atomic_inc(&rbio->error);
        } else {
-               ret = -EIEIO;
+               ret = -EIO;
        }
 out:
        spin_unlock_irqrestore(&rbio->bio_list_lock, flags);
@@ -1413,7 +1413,7 @@ static int fail_bio_stripe(struct btrfs_raid_bio *rbio,
        int failed = find_bio_stripe(rbio, bio);
 
        if (failed < 0)
-               return -EIEIO;
+               return -EIO;
 
        return fail_rbio_index(rbio, failed);
 }
@@ -1469,7 +1469,7 @@ static void raid_rmw_end_io(struct bio *bio, int err)
 
 cleanup:
 
-       rbio_orig_end_io(rbio, -EIEIO, 0);
+       rbio_orig_end_io(rbio, -EIO, 0);
 }
 
 static void async_rmw_stripe(struct btrfs_raid_bio *rbio)
@@ -1579,8 +1579,8 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
        return 0;
 
 cleanup:
-       rbio_orig_end_io(rbio, -EIEIO, 0);
-       return -EIEIO;
+       rbio_orig_end_io(rbio, -EIO, 0);
+       return -EIO;
 
 finish:
        validate_rbio_for_rmw(rbio);
@@ -1856,7 +1856,7 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
                                         * a bad data or Q stripe.
                                         * TODO, we should redo the xor here.
                                         */
-                                       err = -EIEIO;
+                                       err = -EIO;
                                        goto cleanup;
                                }
                                /*
@@ -1882,7 +1882,7 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
                        if (rbio->bbio->raid_map[failb] == RAID6_Q_STRIPE) {
                                if (rbio->bbio->raid_map[faila] ==
                                    RAID5_P_STRIPE) {
-                                       err = -EIEIO;
+                                       err = -EIO;
                                        goto cleanup;
                                }
                                /*
@@ -2002,7 +2002,7 @@ static void raid_recover_end_io(struct bio *bio, int err)
                return;
 
        if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
-               rbio_orig_end_io(rbio, -EIEIO, 0);
+               rbio_orig_end_io(rbio, -EIO, 0);
        else
                __raid_recover_end_io(rbio);
 }
@@ -2102,8 +2102,8 @@ out:
 
 cleanup:
        if (rbio->operation == BTRFS_RBIO_READ_REBUILD)
-               rbio_orig_end_io(rbio, -EIEIO, 0);
-       return -EIEIO;
+               rbio_orig_end_io(rbio, -EIO, 0);
+       return -EIO;
 }
 
 /*
@@ -2136,7 +2136,7 @@ int raid56_parity_recover(struct btrfs_root *root, struct bio *bio,
                if (generic_io)
                        btrfs_put_bbio(bbio);
                kfree(rbio);
-               return -EIEIO;
+               return -EIO;
        }
 
        if (generic_io) {
@@ -2292,7 +2292,7 @@ static void raid_write_parity_end_io(struct bio *bio, int err)
        err = 0;
 
        if (atomic_read(&rbio->error))
-               err = -EIEIO;
+               err = -EIO;
 
        rbio_orig_end_io(rbio, err, 0);
 }
@@ -2456,7 +2456,7 @@ submit_write:
        return;
 
 cleanup:
-       rbio_orig_end_io(rbio, -EIEIO, 0);
+       rbio_orig_end_io(rbio, -EIO, 0);
 }
 
 static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe)
@@ -2524,7 +2524,7 @@ static void validate_rbio_for_parity_scrub(struct btrfs_raid_bio *rbio)
        return;
 
 cleanup:
-       rbio_orig_end_io(rbio, -EIEIO, 0);
+       rbio_orig_end_io(rbio, -EIO, 0);
 }
 
 /*
@@ -2639,7 +2639,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
        return;
 
 cleanup:
-       rbio_orig_end_io(rbio, -EIEIO, 0);
+       rbio_orig_end_io(rbio, -EIO, 0);
        return;
 
 finish:
index bc41ff8c83127c5f013a0d5d3e6b7c148e39d530..74b24b01d5740041a69aab1d083391c2e03ade8b 100644 (file)
@@ -1848,7 +1848,7 @@ again:
 
                        eb = read_tree_block(dest, old_bytenr, old_ptr_gen);
                        if (!eb || !extent_buffer_uptodate(eb)) {
-                               ret = (!eb) ? -ENOMEM : -EIEIO;
+                               ret = (!eb) ? -ENOMEM : -EIO;
                                free_extent_buffer(eb);
                                break;
                        }
@@ -2004,7 +2004,7 @@ int walk_down_reloc_tree(struct btrfs_root *root, struct btrfs_path *path,
                eb = read_tree_block(root, bytenr, ptr_gen);
                if (!eb || !extent_buffer_uptodate(eb)) {
                        free_extent_buffer(eb);
-                       return -EIEIO;
+                       return -EIO;
                }
                BUG_ON(btrfs_header_level(eb) != i - 1);
                path->nodes[i - 1] = eb;
@@ -2712,7 +2712,7 @@ static int do_relocation(struct btrfs_trans_handle *trans,
                eb = read_tree_block(root, bytenr, generation);
                if (!eb || !extent_buffer_uptodate(eb)) {
                        free_extent_buffer(eb);
-                       err = -EIEIO;
+                       err = -EIO;
                        goto next;
                }
                btrfs_tree_lock(eb);
@@ -2875,7 +2875,7 @@ static int get_tree_block_key(struct reloc_control *rc,
                             block->key.offset);
        if (!eb || !extent_buffer_uptodate(eb)) {
                free_extent_buffer(eb);
-               return -EIEIO;
+               return -EIO;
        }
        WARN_ON(btrfs_header_level(eb) != block->level);
        if (block->level == 0)
@@ -3158,7 +3158,7 @@ static int relocate_file_extent_cluster(struct inode *inode,
                                page_cache_release(page);
                                btrfs_delalloc_release_metadata(inode,
                                                        PAGE_CACHE_SIZE);
-                               ret = -EIEIO;
+                               ret = -EIO;
                                goto out;
                        }
                }
index e32c936b962662e490d9e32f33497a0a84583c28..7b747acb483af026ce23faddd3e9e62b07ab7d1c 100644 (file)
@@ -732,7 +732,7 @@ static int scrub_fixup_readpage(u64 inum, u64 offset, u64 root, void *fixup_ctx)
                         * later scrub will find the bad sector again and that
                         * there's no dirty page in memory, then.
                         */
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out;
                }
                ret = repair_io_failure(inode, offset, PAGE_SIZE,
@@ -786,7 +786,7 @@ out:
                return 1;
        }
 
-       return -EIEIO;
+       return -EIO;
 }
 
 static void scrub_fixup_nodatasum(struct btrfs_work *work)
@@ -874,7 +874,7 @@ static inline void scrub_put_recover(struct scrub_recover *recover)
 
 /*
  * scrub_handle_errored_block gets called when either verification of the
- * pages failed or the bio failed to read, e.g. with EIEIO. In the latter
+ * pages failed or the bio failed to read, e.g. with EIO. In the latter
  * case, this function handles all pages in the bio, even though only one
  * may be bad.
  * The goal of this function is to repair the errored block by using the
@@ -1340,7 +1340,7 @@ static int scrub_setup_recheck_block(struct scrub_block *original_sblock,
                                       &mapped_length, &bbio, 0, 1);
                if (ret || !bbio || mapped_length < sublen) {
                        btrfs_put_bbio(bbio);
-                       return -EIEIO;
+                       return -EIO;
                }
 
                recover = kzalloc(sizeof(struct scrub_recover), GFP_NOFS);
@@ -1462,7 +1462,7 @@ static int scrub_submit_raid56_bio_wait(struct btrfs_fs_info *fs_info,
 
        wait_for_completion(&done.event);
        if (done.error)
-               return -EIEIO;
+               return -EIO;
 
        return 0;
 }
@@ -1580,19 +1580,19 @@ static int scrub_repair_page_from_good_copy(struct scrub_block *sblock_bad,
                        printk_ratelimited(KERN_WARNING "BTRFS: "
                                "scrub_repair_page_from_good_copy(bdev == NULL) "
                                "is unexpected!\n");
-                       return -EIEIO;
+                       return -EIO;
                }
 
                bio = btrfs_io_bio_alloc(GFP_NOFS, 1);
                if (!bio)
-                       return -EIEIO;
+                       return -EIO;
                bio->bi_bdev = page_bad->dev->bdev;
                bio->bi_iter.bi_sector = page_bad->physical >> 9;
 
                ret = bio_add_page(bio, page_good->page, PAGE_SIZE, 0);
                if (PAGE_SIZE != ret) {
                        bio_put(bio);
-                       return -EIEIO;
+                       return -EIO;
                }
 
                if (btrfsic_submit_bio_wait(WRITE, bio)) {
@@ -1602,7 +1602,7 @@ static int scrub_repair_page_from_good_copy(struct scrub_block *sblock_bad,
                                &sblock_bad->sctx->dev_root->fs_info->
                                dev_replace.num_write_errors);
                        bio_put(bio);
-                       return -EIEIO;
+                       return -EIO;
                }
                bio_put(bio);
        }
@@ -1703,7 +1703,7 @@ again:
                        bio_put(sbio->bio);
                        sbio->bio = NULL;
                        mutex_unlock(&wr_ctx->wr_lock);
-                       return -EIEIO;
+                       return -EIO;
                }
                scrub_wr_submit(sctx);
                goto again;
@@ -2056,7 +2056,7 @@ static void scrub_submit(struct scrub_ctx *sctx)
                 */
                printk_ratelimited(KERN_WARNING
                        "BTRFS: scrub_submit(bio bdev == NULL) is unexpected!\n");
-               bio_endio(sbio->bio, -EIEIO);
+               bio_endio(sbio->bio, -EIO);
        } else {
                btrfsic_submit_bio(READ, sbio->bio);
        }
@@ -2121,7 +2121,7 @@ again:
                if (sbio->page_count < 1) {
                        bio_put(sbio->bio);
                        sbio->bio = NULL;
-                       return -EIEIO;
+                       return -EIO;
                }
                scrub_submit(sctx);
                goto again;
@@ -3508,7 +3508,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
                        break;
                if (is_dev_replace &&
                    atomic64_read(&dev_replace->num_write_errors) > 0) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
                if (sctx->stat.malloc_errors > 0) {
@@ -3542,7 +3542,7 @@ static noinline_for_stack int scrub_supers(struct scrub_ctx *sctx,
        struct btrfs_root *root = sctx->dev_root;
 
        if (test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state))
-               return -EIEIO;
+               return -EIO;
 
        /* Seed devices of a new filesystem has their own generation. */
        if (scrub_dev->fs_devices != root->fs_info->fs_devices)
@@ -3691,7 +3691,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
        if (!dev->in_fs_metadata || dev->is_tgtdev_for_dev_replace) {
                mutex_unlock(&fs_info->scrub_lock);
                mutex_unlock(&fs_info->fs_devices->device_list_mutex);
-               return -EIEIO;
+               return -EIO;
        }
 
        btrfs_dev_replace_lock(&fs_info->dev_replace);
@@ -4166,7 +4166,7 @@ again:
                                goto again;
                        }
                        if (!PageUptodate(page)) {
-                               ret = -EIEIO;
+                               ret = -EIO;
                                goto next_page;
                        }
                }
@@ -4210,11 +4210,11 @@ static int write_page_nocow(struct scrub_ctx *sctx,
 
        dev = sctx->wr_ctx.tgtdev;
        if (!dev)
-               return -EIEIO;
+               return -EIO;
        if (!dev->bdev) {
                printk_ratelimited(KERN_WARNING
                        "BTRFS: scrub write_page_nocow(bdev == NULL) is unexpected!\n");
-               return -EIEIO;
+               return -EIO;
        }
        bio = btrfs_io_bio_alloc(GFP_NOFS, 1);
        if (!bio) {
@@ -4231,7 +4231,7 @@ static int write_page_nocow(struct scrub_ctx *sctx,
 leave_with_eio:
                bio_put(bio);
                btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_WRITE_ERRS);
-               return -EIEIO;
+               return -EIO;
        }
 
        if (btrfsic_submit_bio_wait(WRITE_SYNC, bio))
index 4572fa78b65ebea8514236aaa8d28403e2bff701..a1216f9b49171510194109c7594c61b4277298ea 100644 (file)
@@ -525,7 +525,7 @@ static int write_buf(struct file *filp, const void *buf, u32 len, loff_t *off)
                if (ret < 0)
                        goto out;
                if (ret == 0) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out;
                }
                pos += ret;
@@ -1343,7 +1343,7 @@ static int find_extent_clone(struct send_ctx *sctx,
        if (ret < 0)
                goto out;
        if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
@@ -1388,7 +1388,7 @@ static int find_extent_clone(struct send_ctx *sctx,
 
        if (!backref_ctx->found_itself) {
                /* found a bug in backref code? */
-               ret = -EIEIO;
+               ret = -EIO;
                btrfs_err(sctx->send_root->fs_info, "did not find backref in "
                                "send_root. inode=%llu, offset=%llu, "
                                "disk_byte=%llu found extent=%llu",
@@ -4399,7 +4399,7 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len)
                        if (!PageUptodate(page)) {
                                unlock_page(page);
                                page_cache_release(page);
-                               ret = -EIEIO;
+                               ret = -EIO;
                                break;
                        }
                }
index 8b2f459b614beec9e004c710e041cbe7f8752659..5d7222244b77d2ae7949028469d4bce236a7e5d6 100644 (file)
@@ -74,7 +74,7 @@ static const char *btrfs_decode_error(int errno)
        char *errstr = "unknown";
 
        switch (errno) {
-       case -EIO: /* can't use EIEIO here */
+       case -EIO:
                errstr = "IO failure";
                break;
        case -ENOMEM:
@@ -242,7 +242,7 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function,
  * This means that error recovery at the call site is limited to freeing
  * any local memory allocations and passing the error code up without
  * further cleanup. The transaction should complete as it normally would
- * in the call path but will return -EIEIO.
+ * in the call path but will return -EIO.
  *
  * We'll complete the cleanup in btrfs_end_transaction and
  * btrfs_commit_transaction.
index cd94e7fcfe41f1b5e74a79e662026144da36b73f..e0a9749cceb4ff37d954ad01a68c4fe242c949e6 100644 (file)
@@ -889,7 +889,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
        if (trans->aborted ||
            test_bit(BTRFS_FS_STATE_ERROR, &root->fs_info->fs_state)) {
                wake_up_process(info->transaction_kthread);
-               err = -EIEIO;
+               err = -EIO;
        }
        assert_qgroups_uptodate(trans);
 
@@ -1028,7 +1028,7 @@ int btrfs_wait_marked_extents(struct btrfs_root *root,
        }
 
        if (errors && !werr)
-               werr = -EIEIO;
+               werr = -EIO;
 
        return werr;
 }
index 30545d81a3485d790b9f94a40bffecac6cc2b2e9..5e332bbcfcea5064439295958894c717c381ce6d 100644 (file)
@@ -621,7 +621,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
 
        inode = read_one_inode(root, key->objectid);
        if (!inode) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
@@ -851,7 +851,7 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
 
        inode = read_one_inode(root, location.objectid);
        if (!inode) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
@@ -1251,7 +1251,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
 
        inode = read_one_inode(root, inode_objectid);
        if (!inode) {
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
@@ -1534,7 +1534,7 @@ static noinline int fixup_inode_link_counts(struct btrfs_trans_handle *trans,
                btrfs_release_path(path);
                inode = read_one_inode(root, key.offset);
                if (!inode)
-                       return -EIEIO;
+                       return -EIO;
 
                ret = fixup_inode_link_count(trans, root, inode);
                iput(inode);
@@ -1571,7 +1571,7 @@ static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans,
 
        inode = read_one_inode(root, objectid);
        if (!inode)
-               return -EIEIO;
+               return -EIO;
 
        key.objectid = BTRFS_TREE_LOG_FIXUP_OBJECTID;
        key.type = BTRFS_ORPHAN_ITEM_KEY;
@@ -1618,7 +1618,7 @@ static noinline int insert_one_name(struct btrfs_trans_handle *trans,
        dir = read_one_inode(root, dirid);
        if (!dir) {
                iput(inode);
-               return -EIEIO;
+               return -EIO;
        }
 
        ret = btrfs_add_link(trans, dir, inode, name, name_len, 1, index);
@@ -1691,7 +1691,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans,
 
        dir = read_one_inode(root, key->objectid);
        if (!dir)
-               return -EIEIO;
+               return -EIO;
 
        name_len = btrfs_dir_name_len(eb, di);
        name = kmalloc(name_len, GFP_NOFS);
@@ -1814,7 +1814,7 @@ static noinline int replay_one_dir_item(struct btrfs_trans_handle *trans,
        while (ptr < ptr_end) {
                di = (struct btrfs_dir_item *)ptr;
                if (verify_dir_item(root, eb, di))
-                       return -EIEIO;
+                       return -EIO;
                name_len = btrfs_dir_name_len(eb, di);
                ret = replay_one_name(trans, root, path, eb, di, key);
                if (ret < 0)
@@ -1990,7 +1990,7 @@ again:
        while (ptr < ptr_end) {
                di = (struct btrfs_dir_item *)ptr;
                if (verify_dir_item(root, eb, di)) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out;
                }
 
@@ -2021,7 +2021,7 @@ again:
                        inode = read_one_inode(root, location.objectid);
                        if (!inode) {
                                kfree(name);
-                               return -EIEIO;
+                               return -EIO;
                        }
 
                        ret = link_to_fixup_dir(trans, root,
@@ -4047,7 +4047,7 @@ static int log_one_extent(struct btrfs_trans_handle *trans,
                return ret;
 
        if (ordered_io_err) {
-               ctx->io_err = -EIEIO;
+               ctx->io_err = -EIO;
                return 0;
        }
 
index fd7a57144fc6298b086ea3ff4795498dfddd617a..84d7b995fc909ca3532a2e2aa19c4010f4a7ed14 100644 (file)
@@ -2560,7 +2560,7 @@ static int btrfs_del_sys_chunk(struct btrfs_root *root, u64 chunk_objectid, u64
                        num_stripes = btrfs_stack_chunk_num_stripes(chunk);
                        len += btrfs_chunk_item_size(num_stripes);
                } else {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
                if (key.objectid == chunk_objectid &&
@@ -5222,7 +5222,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
                 * the last one to the array of stripes. For READ, it also
                 * needs to be supported using the same mirror number.
                 * If the requested block is not left of the left cursor,
-                * EIEIO is returned. This can happen because btrfs_num_copies()
+                * EIO is returned. This can happen because btrfs_num_copies()
                 * returns one more in the dev-replace case.
                 */
                u64 tmp_length = *length;
@@ -5247,7 +5247,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
                         * mirror, that means that the requested area
                         * is not left of the left cursor
                         */
-                       ret = -EIEIO;
+                       ret = -EIO;
                        btrfs_put_bbio(tmp_bbio);
                        goto out;
                }
@@ -5282,7 +5282,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
                        physical_to_patch_in_first_stripe = physical_of_found;
                } else {
                        WARN_ON(1);
-                       ret = -EIEIO;
+                       ret = -EIO;
                        btrfs_put_bbio(tmp_bbio);
                        goto out;
                }
@@ -5678,14 +5678,14 @@ int btrfs_rmap_block(struct btrfs_mapping_tree *map_tree,
        if (!em) {
                printk(KERN_ERR "BTRFS: couldn't find em for chunk %Lu\n",
                       chunk_start);
-               return -EIEIO;
+               return -EIO;
        }
 
        if (em->start != chunk_start) {
                printk(KERN_ERR "BTRFS: bad chunk start, em=%Lu, wanted=%Lu\n",
                       em->start, chunk_start);
                free_extent_map(em);
-               return -EIEIO;
+               return -EIO;
        }
        map = (struct map_lookup *)em->bdev;
 
@@ -5760,7 +5760,7 @@ static void btrfs_end_bio(struct bio *bio, int err)
 
        if (err) {
                atomic_inc(&bbio->error);
-               if (err == -EIEIO || err == -EREMOTEIO) {
+               if (err == -EIO || err == -EREMOTEIO) {
                        unsigned int stripe_index =
                                btrfs_io_bio(bio)->stripe_index;
 
@@ -5799,7 +5799,7 @@ static void btrfs_end_bio(struct bio *bio, int err)
                 * beyond the tolerance of the btrfs bio
                 */
                if (atomic_read(&bbio->error) > bbio->max_errors) {
-                       err = -EIEIO;
+                       err = -EIO;
                } else {
                        /*
                         * this bio is actually up to date, we didn't
@@ -5830,7 +5830,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_root *root,
        struct btrfs_pending_bios *pending_bios;
 
        if (device->missing || !device->bdev) {
-               bio_endio(bio, -EIEIO);
+               bio_endio(bio, -EIO);
                return;
        }
 
@@ -5980,7 +5980,7 @@ static void bbio_error(struct btrfs_bio *bbio, struct bio *bio, u64 logical)
                btrfs_io_bio(bio)->mirror_num = bbio->mirror_num;
                bio->bi_iter.bi_sector = logical >> 9;
 
-               btrfs_end_bbio(bbio, bio, -EIEIO);
+               btrfs_end_bbio(bbio, bio, -EIO);
        }
 }
 
@@ -6227,7 +6227,7 @@ static int read_one_chunk(struct btrfs_root *root, struct btrfs_key *key,
                                                        uuid, NULL);
                if (!map->stripes[i].dev && !btrfs_test_opt(root, DEGRADED)) {
                        free_extent_map(em);
-                       return -EIEIO;
+                       return -EIO;
                }
                if (!map->stripes[i].dev) {
                        map->stripes[i].dev =
@@ -6235,7 +6235,7 @@ static int read_one_chunk(struct btrfs_root *root, struct btrfs_key *key,
                                                devid, uuid);
                        if (!map->stripes[i].dev) {
                                free_extent_map(em);
-                               return -EIEIO;
+                               return -EIO;
                        }
                }
                map->stripes[i].dev->in_fs_metadata = 1;
@@ -6354,7 +6354,7 @@ static int read_one_dev(struct btrfs_root *root,
        device = btrfs_find_device(root->fs_info, devid, dev_uuid, fs_uuid);
        if (!device) {
                if (!btrfs_test_opt(root, DEGRADED))
-                       return -EIEIO;
+                       return -EIO;
 
                btrfs_warn(root->fs_info, "devid %llu missing", devid);
                device = add_missing_dev(root, fs_devices, devid, dev_uuid);
@@ -6362,7 +6362,7 @@ static int read_one_dev(struct btrfs_root *root,
                        return -ENOMEM;
        } else {
                if (!device->bdev && !btrfs_test_opt(root, DEGRADED))
-                       return -EIEIO;
+                       return -EIO;
 
                if(!device->bdev && !device->missing) {
                        /*
@@ -6489,7 +6489,7 @@ int btrfs_read_sys_array(struct btrfs_root *root)
                        if (ret)
                                break;
                } else {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
                array_ptr += len;
@@ -6503,7 +6503,7 @@ out_short_read:
        printk(KERN_ERR "BTRFS: sys_array too short to read %u bytes at offset %u\n",
                        len, cur_offset);
        free_extent_buffer(sb);
-       return -EIEIO;
+       return -EIO;
 }
 
 int btrfs_read_chunk_tree(struct btrfs_root *root)
index eb59a00667e15c101e7e84d1bdf39340f079d48d..82990b8f872b6d455be25196ee88a97eb82bd932 100644 (file)
@@ -96,7 +96,7 @@ static int zlib_compress_pages(struct list_head *ws,
 
        if (Z_OK != zlib_deflateInit(&workspace->strm, 3)) {
                printk(KERN_WARNING "BTRFS: deflateInit failed\n");
-               ret = -EIEIO;
+               ret = -EIO;
                goto out;
        }
 
@@ -126,7 +126,7 @@ static int zlib_compress_pages(struct list_head *ws,
                        printk(KERN_DEBUG "BTRFS: deflate in loop returned %d\n",
                               ret);
                        zlib_deflateEnd(&workspace->strm);
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out;
                }
 
@@ -186,7 +186,7 @@ static int zlib_compress_pages(struct list_head *ws,
        zlib_deflateEnd(&workspace->strm);
 
        if (ret != Z_STREAM_END) {
-               ret = -EIO; /* Too much noise for EIEIO here */
+               ret = -EIO;
                goto out;
        }
 
@@ -250,7 +250,7 @@ static int zlib_decompress_biovec(struct list_head *ws, struct page **pages_in,
 
        if (Z_OK != zlib_inflateInit2(&workspace->strm, wbits)) {
                printk(KERN_WARNING "BTRFS: inflateInit failed\n");
-               return -EIEIO;
+               return -EIO;
        }
        while (workspace->strm.total_in < srclen) {
                ret = zlib_inflate(&workspace->strm, Z_NO_FLUSH);
@@ -292,7 +292,7 @@ static int zlib_decompress_biovec(struct list_head *ws, struct page **pages_in,
                }
        }
        if (ret != Z_STREAM_END)
-               ret = -EIEIO;
+               ret = -EIO;
        else
                ret = 0;
 done:
@@ -340,7 +340,7 @@ static int zlib_decompress(struct list_head *ws, unsigned char *data_in,
 
        if (Z_OK != zlib_inflateInit2(&workspace->strm, wbits)) {
                printk(KERN_WARNING "BTRFS: inflateInit failed\n");
-               return -EIEIO;
+               return -EIO;
        }
 
        while (bytes_left > 0) {
@@ -356,7 +356,7 @@ static int zlib_decompress(struct list_head *ws, unsigned char *data_in,
                total_out = workspace->strm.total_out;
 
                if (total_out == buf_start) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
 
@@ -384,7 +384,7 @@ next:
        }
 
        if (ret != Z_STREAM_END && bytes_left != 0)
-               ret = -EIO; /* not EIEIO because it happens very often and is harmless */
+               ret = -EIO;
        else
                ret = 0;