diff options
Diffstat (limited to 'fs/btrfs/raid56.c')
-rw-r--r-- | fs/btrfs/raid56.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 24ac21840a9a..9af0b25d991a 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c | |||
@@ -1032,8 +1032,8 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio, | |||
1032 | 1032 | ||
1033 | /* see if we can add this page onto our existing bio */ | 1033 | /* see if we can add this page onto our existing bio */ |
1034 | if (last) { | 1034 | if (last) { |
1035 | last_end = (u64)last->bi_sector << 9; | 1035 | last_end = (u64)last->bi_iter.bi_sector << 9; |
1036 | last_end += last->bi_size; | 1036 | last_end += last->bi_iter.bi_size; |
1037 | 1037 | ||
1038 | /* | 1038 | /* |
1039 | * we can't merge these if they are from different | 1039 | * we can't merge these if they are from different |
@@ -1053,9 +1053,9 @@ static int rbio_add_io_page(struct btrfs_raid_bio *rbio, | |||
1053 | if (!bio) | 1053 | if (!bio) |
1054 | return -ENOMEM; | 1054 | return -ENOMEM; |
1055 | 1055 | ||
1056 | bio->bi_size = 0; | 1056 | bio->bi_iter.bi_size = 0; |
1057 | bio->bi_bdev = stripe->dev->bdev; | 1057 | bio->bi_bdev = stripe->dev->bdev; |
1058 | bio->bi_sector = disk_start >> 9; | 1058 | bio->bi_iter.bi_sector = disk_start >> 9; |
1059 | set_bit(BIO_UPTODATE, &bio->bi_flags); | 1059 | set_bit(BIO_UPTODATE, &bio->bi_flags); |
1060 | 1060 | ||
1061 | bio_add_page(bio, page, PAGE_CACHE_SIZE, 0); | 1061 | bio_add_page(bio, page, PAGE_CACHE_SIZE, 0); |
@@ -1111,7 +1111,7 @@ static void index_rbio_pages(struct btrfs_raid_bio *rbio) | |||
1111 | 1111 | ||
1112 | spin_lock_irq(&rbio->bio_list_lock); | 1112 | spin_lock_irq(&rbio->bio_list_lock); |
1113 | bio_list_for_each(bio, &rbio->bio_list) { | 1113 | bio_list_for_each(bio, &rbio->bio_list) { |
1114 | start = (u64)bio->bi_sector << 9; | 1114 | start = (u64)bio->bi_iter.bi_sector << 9; |
1115 | stripe_offset = start - rbio->raid_map[0]; | 1115 | stripe_offset = start - rbio->raid_map[0]; |
1116 | page_index = stripe_offset >> PAGE_CACHE_SHIFT; | 1116 | page_index = stripe_offset >> PAGE_CACHE_SHIFT; |
1117 | 1117 | ||
@@ -1272,7 +1272,7 @@ cleanup: | |||
1272 | static int find_bio_stripe(struct btrfs_raid_bio *rbio, | 1272 | static int find_bio_stripe(struct btrfs_raid_bio *rbio, |
1273 | struct bio *bio) | 1273 | struct bio *bio) |
1274 | { | 1274 | { |
1275 | u64 physical = bio->bi_sector; | 1275 | u64 physical = bio->bi_iter.bi_sector; |
1276 | u64 stripe_start; | 1276 | u64 stripe_start; |
1277 | int i; | 1277 | int i; |
1278 | struct btrfs_bio_stripe *stripe; | 1278 | struct btrfs_bio_stripe *stripe; |
@@ -1298,7 +1298,7 @@ static int find_bio_stripe(struct btrfs_raid_bio *rbio, | |||
1298 | static int find_logical_bio_stripe(struct btrfs_raid_bio *rbio, | 1298 | static int find_logical_bio_stripe(struct btrfs_raid_bio *rbio, |
1299 | struct bio *bio) | 1299 | struct bio *bio) |
1300 | { | 1300 | { |
1301 | u64 logical = bio->bi_sector; | 1301 | u64 logical = bio->bi_iter.bi_sector; |
1302 | u64 stripe_start; | 1302 | u64 stripe_start; |
1303 | int i; | 1303 | int i; |
1304 | 1304 | ||
@@ -1602,8 +1602,8 @@ static int plug_cmp(void *priv, struct list_head *a, struct list_head *b) | |||
1602 | plug_list); | 1602 | plug_list); |
1603 | struct btrfs_raid_bio *rb = container_of(b, struct btrfs_raid_bio, | 1603 | struct btrfs_raid_bio *rb = container_of(b, struct btrfs_raid_bio, |
1604 | plug_list); | 1604 | plug_list); |
1605 | u64 a_sector = ra->bio_list.head->bi_sector; | 1605 | u64 a_sector = ra->bio_list.head->bi_iter.bi_sector; |
1606 | u64 b_sector = rb->bio_list.head->bi_sector; | 1606 | u64 b_sector = rb->bio_list.head->bi_iter.bi_sector; |
1607 | 1607 | ||
1608 | if (a_sector < b_sector) | 1608 | if (a_sector < b_sector) |
1609 | return -1; | 1609 | return -1; |
@@ -1691,7 +1691,7 @@ int raid56_parity_write(struct btrfs_root *root, struct bio *bio, | |||
1691 | if (IS_ERR(rbio)) | 1691 | if (IS_ERR(rbio)) |
1692 | return PTR_ERR(rbio); | 1692 | return PTR_ERR(rbio); |
1693 | bio_list_add(&rbio->bio_list, bio); | 1693 | bio_list_add(&rbio->bio_list, bio); |
1694 | rbio->bio_list_bytes = bio->bi_size; | 1694 | rbio->bio_list_bytes = bio->bi_iter.bi_size; |
1695 | 1695 | ||
1696 | /* | 1696 | /* |
1697 | * don't plug on full rbios, just get them out the door | 1697 | * don't plug on full rbios, just get them out the door |
@@ -2044,7 +2044,7 @@ int raid56_parity_recover(struct btrfs_root *root, struct bio *bio, | |||
2044 | 2044 | ||
2045 | rbio->read_rebuild = 1; | 2045 | rbio->read_rebuild = 1; |
2046 | bio_list_add(&rbio->bio_list, bio); | 2046 | bio_list_add(&rbio->bio_list, bio); |
2047 | rbio->bio_list_bytes = bio->bi_size; | 2047 | rbio->bio_list_bytes = bio->bi_iter.bi_size; |
2048 | 2048 | ||
2049 | rbio->faila = find_logical_bio_stripe(rbio, bio); | 2049 | rbio->faila = find_logical_bio_stripe(rbio, bio); |
2050 | if (rbio->faila == -1) { | 2050 | if (rbio->faila == -1) { |