Commit 32240a913d9f3a5aad42175d7696590ea1bfdb08

Authored by Jan Schmidt
Committed by Chris Mason
1 parent 745c4d8e16

btrfs: mirror_num should be int, not u64

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>

Showing 3 changed files with 4 additions and 4 deletions Side-by-side Diff

... ... @@ -620,7 +620,7 @@
620 620  
621 621 static int btree_io_failed_hook(struct bio *failed_bio,
622 622 struct page *page, u64 start, u64 end,
623   - u64 mirror_num, struct extent_state *state)
  623 + int mirror_num, struct extent_state *state)
624 624 {
625 625 struct extent_io_tree *tree;
626 626 unsigned long len;
fs/btrfs/extent_io.c
... ... @@ -2285,8 +2285,8 @@
2285 2285 clean_io_failure(start, page);
2286 2286 }
2287 2287 if (!uptodate) {
2288   - u64 failed_mirror;
2289   - failed_mirror = (unsigned long)bio->bi_bdev;
  2288 + int failed_mirror;
  2289 + failed_mirror = (int)(unsigned long)bio->bi_bdev;
2290 2290 if (tree->ops && tree->ops->readpage_io_failed_hook)
2291 2291 ret = tree->ops->readpage_io_failed_hook(
2292 2292 bio, page, start, end,
fs/btrfs/extent_io.h
... ... @@ -70,7 +70,7 @@
70 70 unsigned long bio_flags);
71 71 int (*readpage_io_hook)(struct page *page, u64 start, u64 end);
72 72 int (*readpage_io_failed_hook)(struct bio *bio, struct page *page,
73   - u64 start, u64 end, u64 failed_mirror,
  73 + u64 start, u64 end, int failed_mirror,
74 74 struct extent_state *state);
75 75 int (*writepage_io_failed_hook)(struct bio *bio, struct page *page,
76 76 u64 start, u64 end,