Skip to content

Commit

Permalink
btrfs: mirror_num should be int, not u64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Schmidt authored and Chris Mason committed Nov 20, 2011
1 parent 745c4d8 commit 32240a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end,

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;
Expand Down
4 changes: 2 additions & 2 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/extent_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 32240a9

Please sign in to comment.