btrfs: mirror_num should be int, not u64
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Sun, 20 Nov 2011 12:33:38 +0000 (07:33 -0500)
committerChris Mason <chris.mason@oracle.com>
Sun, 20 Nov 2011 12:42:14 +0000 (07:42 -0500)
My previous patch introduced some u64 for failed_mirror variables, this one
makes it consistent again.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h

index 48d30138237fe7d62add429a9f4ecdaff4ee123e..94abc25392f6d78581ad3dbe0cb72eda781132b6 100644 (file)
@@ -620,7 +620,7 @@ out:
 
 static int btree_io_failed_hook(struct bio *failed_bio,
                         struct page *page, u64 start, u64 end,
-                        u64 mirror_num, struct extent_state *state)
+                        int mirror_num, struct extent_state *state)
 {
        struct extent_io_tree *tree;
        unsigned long len;
index 47fdba7853c3462cefd94346acfd62ba136f455f..a877b8b212eb923b5c6d8ad9ce2a507ee0b2f96c 100644 (file)
@@ -2285,8 +2285,8 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
                                clean_io_failure(start, page);
                }
                if (!uptodate) {
-                       u64 failed_mirror;
-                       failed_mirror = (unsigned long)bio->bi_bdev;
+                       int failed_mirror;
+                       failed_mirror = (int)(unsigned long)bio->bi_bdev;
                        if (tree->ops && tree->ops->readpage_io_failed_hook)
                                ret = tree->ops->readpage_io_failed_hook(
                                                bio, page, start, end,
index feb9be0e23bcca09a77497d08c74a3c8864d2a8c..7604c30013227fd823b1523503f8faaeccf283c4 100644 (file)
@@ -70,7 +70,7 @@ struct extent_io_ops {
                              unsigned long bio_flags);
        int (*readpage_io_hook)(struct page *page, u64 start, u64 end);
        int (*readpage_io_failed_hook)(struct bio *bio, struct page *page,
-                                      u64 start, u64 end, u64 failed_mirror,
+                                      u64 start, u64 end, int failed_mirror,
                                       struct extent_state *state);
        int (*writepage_io_failed_hook)(struct bio *bio, struct page *page,
                                        u64 start, u64 end,