]> git.hungrycats.org Git - linux/commitdiff
Revert "zygo: fs/btrfs: more EIOs in v4.0"
authorZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 17 Jun 2015 14:33:16 +0000 (10:33 -0400)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Wed, 17 Jun 2015 14:33:16 +0000 (10:33 -0400)
This reverts commit 7556d7563b4a199603674dfc1280bfaff80245f0.

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/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/volumes.h
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 8b66cfdc1d44a2a4ce984f88d1ed938873799b87..8d47380192dde1375dc542f341cf0de33047a3fe 100644 (file)
@@ -493,7 +493,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)
@@ -1036,7 +1036,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);
@@ -1483,7 +1483,7 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
                return 0;
        }
 
-       return -EIEIO;
+       return -EIO;
 }
 
 /*
index a7bf4f87827306f1b13a44d724fdb94a7e11f9a4..e9df8862012c6291be4ff802918ba15a6dda6744 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++;
@@ -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 3784203e3c5f0e0715e90d50ad7deeb0a5c12ebe..d181f70caae01471ca80e181818a833b41f057de 100644 (file)
@@ -80,12 +80,4 @@ struct btrfs_compress_op {
 extern struct btrfs_compress_op btrfs_zlib_compress;
 extern struct btrfs_compress_op btrfs_lzo_compress;
 
-#ifndef EIEIO
-static inline int eieio(const char *file, int line, const char *function) {
-       printk(KERN_DEBUG "EIO calculated at %s:%d in %s\n", file, line, function);
-       return EIO;
-}
-#define EIEIO (eieio(__FILE__, __LINE__, __FUNCTION__))
-#endif
-
 #endif
index c02dff5fd1927c387ecb38755a7703b0273ca883..6d67f32e648df72bc5f5b5d707ff39ce8fa4302b 100644 (file)
@@ -1688,7 +1688,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);
@@ -2474,7 +2474,7 @@ read_block_for_search(struct btrfs_trans_handle *trans,
                }
                free_extent_buffer(tmp);
                btrfs_release_path(p);
-               return -EIEIO;
+               return -EIO;
        }
 
        /*
@@ -2498,12 +2498,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 03ebf008e37c890e1d9eb34127c2425ce9c51381..f9c89cae39ee41fd6ae37bbc36178f8eb9093044 100644 (file)
@@ -4204,12 +4204,4 @@ static inline int btrfs_test_is_dummy_root(struct btrfs_root *root)
        return 0;
 }
 
-#ifndef EIEIO
-static inline int eieio(const char *file, int line, const char *function) {
-       printk(KERN_DEBUG "EIO calculated at %s:%d in %s\n", file, line, function);
-       return EIO;
-}
-#define EIEIO (eieio(__FILE__, __LINE__, __FUNCTION__))
-#endif
-
 #endif
index 45a8f8baddd17078c5ded4fa736b0ad3ecab1cce..82f0c7c954747363859fff768917f34ec67765ab 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 17daf2e1e6e24d363a74d33512b8b904d86da572..5ec03d999c37bfb3e48d937abd79b6dc57cd5257 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 553648a51193272399d9be154d71ecd84636830e..639f2663ed3f8f40dc925451618702632e8b9109 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);
@@ -461,7 +461,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_root *root,
                                                   parent_transid, 0))
                                break;
                        else
-                               ret = -EIEIO;
+                               ret = -EIO;
                }
 
                /*
@@ -555,7 +555,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;
        }
 
        /*
@@ -572,7 +572,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;
                }
 
                /*
@@ -583,7 +583,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;
                }
 
                /*
@@ -594,7 +594,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;
                }
        }
 
@@ -628,7 +628,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;
        }
 
@@ -637,20 +637,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, 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;
        }
 
@@ -659,18 +659,18 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
 
        ret = csum_tree_block(root, 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)
@@ -704,8 +704,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)
@@ -1110,7 +1110,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 {
@@ -1519,7 +1519,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);
@@ -2869,7 +2869,7 @@ retry_root_backup:
                if (fs_devices->rw_devices == 0) {
                        printk(KERN_WARNING "BTRFS: log replay required "
                               "on RO media\n");
-                       err = -EIEIO;
+                       err = -EIO;
                        goto fail_qgroup;
                }
 
@@ -3262,7 +3262,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);
                }
@@ -3341,7 +3341,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;
 }
 
@@ -3490,9 +3490,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;
@@ -3508,9 +3508,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;
 }
index 68b0f1daee8105a8191229734ef8df6dc9709dc0..848e2a499b3292e75061b000af9169ad8479cdb8 100644 (file)
@@ -1546,7 +1546,7 @@ again:
                err = -ENOENT;
                goto out;
        } else if (WARN_ON(ret)) {
-               err = -EIEIO;
+               err = -EIO;
                goto out;
        }
 
@@ -1917,7 +1917,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,
@@ -2186,7 +2186,7 @@ again:
                                goto again;
                        }
                } else {
-                       err = -EIEIO;
+                       err = -EIO;
                        goto out;
                }
        }
@@ -2349,7 +2349,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,
@@ -6320,11 +6320,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;
 }
@@ -7647,7 +7647,7 @@ walk_down:
 
                        eb = read_tree_block(root, child_bytenr, child_gen);
                        if (!eb || !extent_buffer_uptodate(eb)) {
-                               ret = -EIEIO;
+                               ret = -EIO;
                                goto out;
                        }
 
@@ -7879,7 +7879,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);
@@ -9543,7 +9543,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 61dec55498ed4858463da4e663520d91b4dbf4e1..e20006a412108b69c569ecb56b85808a619d3f4d 100644 (file)
@@ -2044,7 +2044,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;
 
@@ -2052,7 +2052,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;
@@ -2061,7 +2061,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);
@@ -2070,7 +2070,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
@@ -2229,7 +2229,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) {
@@ -2239,7 +2239,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;
@@ -2414,7 +2414,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)
@@ -2429,7 +2429,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",
@@ -2466,7 +2466,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;
@@ -2620,7 +2620,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,
@@ -3260,7 +3260,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;
                }
                /*
@@ -3537,7 +3537,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);
@@ -3756,7 +3756,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;
@@ -5215,7 +5215,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 b1b73021447ca6a7dae27af88a226d4b3387cc6f..695b0ccfb7553e786f4c9634d3a86c0263c86321 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 fc696958492c592bff497839503b1c95ef88bf77..30982bbd31c30c2b154836b0f51b94c37e22923c 100644 (file)
@@ -1300,7 +1300,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;
@@ -2042,7 +2042,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.
@@ -2074,7 +2074,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 e509a01da84abf33e17862a97dcbca8727492a91..a71978578fa71a11d83f8c435541b807eedc2b51 100644 (file)
@@ -370,7 +370,7 @@ static int io_ctl_prepare_pages(struct 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;
                        }
                }
        }
@@ -429,7 +429,7 @@ static int io_ctl_check_generation(struct 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;
@@ -486,7 +486,7 @@ static int io_ctl_check_crc(struct 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;
index de18c111827c959ddc616cafb307a2c9f2085ea2..c3d10bb6745e6105ca286e9356f9e8331cec2a7c 100644 (file)
@@ -2802,7 +2802,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;
        }
 
@@ -3037,7 +3037,7 @@ zeroit:
        kunmap_atomic(kaddr);
        if (csum_expected == 0)
                return 0;
-       return -EIEIO;
+       return -EIO;
 }
 
 /*
@@ -4475,7 +4475,7 @@ again:
                        goto again;
                }
                if (!PageUptodate(page)) {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        goto out_unlock;
                }
        }
@@ -6697,7 +6697,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;
        }
 
@@ -7515,7 +7515,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)
@@ -7529,7 +7529,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,
@@ -7933,7 +7933,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;
@@ -8416,7 +8416,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;
index a43d040427182f8d0384f3abda13bc9343fc4fb1..8e12d3d280cf74c99e071b3da8e03f2d87df30e5 100644 (file)
@@ -1156,7 +1156,7 @@ again:
                        if (!PageUptodate(page)) {
                                unlock_page(page);
                                page_cache_release(page);
-                               ret = -EIEIO;
+                               ret = -EIO;
                                break;
                        }
                }
index 102871ec237f38a9888e5c3af7f1ceceabd4d217..617553cdb7d3b36b1b8ca6a87b28526c5a060b4d 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 04df4a0ca83f06fc378981f9a418a38dcd735f85..157cc54fc63486e485a95bf6d8d6da692ef171ca 100644 (file)
@@ -761,7 +761,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 b69d936c5b6b69e6a73e4c7db550a6f3c6d72a50..5264858ed7683f2306ccba372bf510c4509862fa 100644 (file)
@@ -898,7 +898,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;
@@ -1325,7 +1325,7 @@ write_data:
        return;
 
 cleanup:
-       rbio_orig_end_io(rbio, -EIEIO, 0);
+       rbio_orig_end_io(rbio, -EIO, 0);
 }
 
 /*
@@ -1380,7 +1380,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)
 {
@@ -1402,7 +1402,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);
@@ -1420,7 +1420,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);
 }
@@ -1476,7 +1476,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)
@@ -1586,8 +1586,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);
@@ -1864,7 +1864,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;
                                }
                                /*
@@ -1890,7 +1890,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;
                                }
                                /*
@@ -2010,7 +2010,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);
 }
@@ -2110,8 +2110,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;
 }
 
 /*
@@ -2144,7 +2144,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) {
index 3946461241362e614d0dd276b56d71ea8312f2d0..d83085381bccfa745ee0258b8cab5558afbcd639 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 f165f490d3e038fb1f6d44f235bf18344a53a540..ec57687c9a4d8a079466d6e9f95724188ec03bc7 100644 (file)
@@ -737,7 +737,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,
@@ -791,7 +791,7 @@ out:
                return 1;
        }
 
-       return -EIEIO;
+       return -EIO;
 }
 
 static void scrub_fixup_nodatasum(struct btrfs_work *work)
@@ -879,7 +879,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
@@ -1352,7 +1352,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);
@@ -1633,19 +1633,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)) {
@@ -1655,7 +1655,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);
        }
@@ -1756,7 +1756,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;
@@ -2099,7 +2099,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);
        }
@@ -2164,7 +2164,7 @@ again:
                if (sbio->page_count < 1) {
                        bio_put(sbio->bio);
                        sbio->bio = NULL;
-                       return -EIEIO;
+                       return -EIO;
                }
                scrub_submit(sctx);
                goto again;
@@ -3497,7 +3497,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) {
@@ -3531,7 +3531,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)
@@ -3680,7 +3680,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);
@@ -4155,7 +4155,7 @@ again:
                                goto again;
                        }
                        if (!PageUptodate(page)) {
-                               ret = -EIEIO;
+                               ret = -EIO;
                                goto next_page;
                        }
                }
@@ -4199,11 +4199,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) {
@@ -4220,7 +4220,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 3c67973d750d59b7b2a7f8127bbd76adf06827b3..d6033f540cc75cfb49ddbe5f07689d67fdefc492 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",
@@ -4441,7 +4441,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 7bc7ca931236df670c40d1fd6e6ebd3a49e0054b..05fef198ff94fc8df4eb126a62195af8452fb18d 100644 (file)
@@ -75,7 +75,6 @@ static const char *btrfs_decode_error(int errno)
 
        switch (errno) {
        case -EIO:
-               EIEIO;
                errstr = "IO failure";
                break;
        case -ENOMEM:
@@ -243,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 e3a420ea90936aaa03e676be413fa890e94627ac..8be4278e25e8e06e32d52b5ac412201d7b20a53c 100644 (file)
@@ -825,7 +825,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);
 
@@ -964,7 +964,7 @@ int btrfs_wait_marked_extents(struct btrfs_root *root,
        }
 
        if (errors && !werr)
-               werr = -EIEIO;
+               werr = -EIO;
 
        return werr;
 }
index 7a521767159767ac341c1219308a32a359a5e2ce..c5b8ba37f88e31fa188258af9c6e13036c2df18f 100644 (file)
@@ -613,7 +613,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;
        }
 
@@ -789,7 +789,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;
        }
 
@@ -1189,7 +1189,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;
        }
 
@@ -1472,7 +1472,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);
@@ -1509,7 +1509,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;
@@ -1557,7 +1557,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);
@@ -1626,7 +1626,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);
@@ -1744,7 +1744,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)
@@ -1873,7 +1873,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;
                }
 
@@ -1904,7 +1904,7 @@ again:
                        inode = read_one_inode(root, location.objectid);
                        if (!inode) {
                                kfree(name);
-                               return -EIEIO;
+                               return -EIO;
                        }
 
                        ret = link_to_fixup_dir(trans, root,
@@ -3803,7 +3803,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 2f39ba7151362b2d228b6aa78e5a4862a1f0bd96..44a7e0398d970d284b5101afa227faaf70514bb4 100644 (file)
@@ -2554,7 +2554,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 &&
@@ -5063,7 +5063,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;
@@ -5088,7 +5088,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;
                }
@@ -5123,7 +5123,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;
                }
@@ -5521,14 +5521,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;
 
@@ -5603,7 +5603,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;
 
@@ -5642,7 +5642,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
@@ -5673,7 +5673,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;
        }
 
@@ -5823,7 +5823,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);
        }
 }
 
@@ -6073,7 +6073,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 =
@@ -6081,7 +6081,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;
@@ -6200,7 +6200,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);
@@ -6208,7 +6208,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) {
                        /*
@@ -6335,7 +6335,7 @@ int btrfs_read_sys_array(struct btrfs_root *root)
                        if (ret)
                                break;
                } else {
-                       ret = -EIEIO;
+                       ret = -EIO;
                        break;
                }
                array_ptr += len;
@@ -6349,7 +6349,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 28b897f9874b0fb6e82dae6d9e5fa76a7f8d3024..83069dec6898a1a024baa28b98dca3174a3959c0 100644 (file)
@@ -538,12 +538,5 @@ static inline void unlock_chunks(struct btrfs_root *root)
        mutex_unlock(&root->fs_info->chunk_mutex);
 }
 
-#ifndef EIEIO
-static inline int eieio(const char *file, int line, const char *function) {
-       printk(KERN_DEBUG "EIO calculated at %s:%d in %s\n", file, line, function);
-       return EIO;
-}
-#define EIEIO (eieio(__FILE__, __LINE__, __FUNCTION__))
-#endif
 
 #endif
index 4afdde1ca06c26429cfca1f623c5a818818f9ee6..fb22fd8d8fb8fad73cb4d2b63d4d525da3eea876 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 = -EIEIO;
+               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 = -EIEIO;
+               ret = -EIO;
        else
                ret = 0;