aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bitmap.c9
-rw-r--r--drivers/md/raid1.c4
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index ed4900ade93a..e4fb58db5454 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1000,10 +1000,11 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
1000 page = bitmap->sb_page; 1000 page = bitmap->sb_page;
1001 offset = sizeof(bitmap_super_t); 1001 offset = sizeof(bitmap_super_t);
1002 if (!file) 1002 if (!file)
1003 read_sb_page(bitmap->mddev, 1003 page = read_sb_page(
1004 bitmap->mddev->bitmap_info.offset, 1004 bitmap->mddev,
1005 page, 1005 bitmap->mddev->bitmap_info.offset,
1006 index, count); 1006 page,
1007 index, count);
1007 } else if (file) { 1008 } else if (file) {
1008 page = read_page(file, index, bitmap, count); 1009 page = read_page(file, index, bitmap, count);
1009 offset = 0; 1010 offset = 0;
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index ad83a4dcadc3..0b830bbe1d8b 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1839,7 +1839,9 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1839 1839
1840 /* take from bio_init */ 1840 /* take from bio_init */
1841 bio->bi_next = NULL; 1841 bio->bi_next = NULL;
1842 bio->bi_flags &= ~(BIO_POOL_MASK-1);
1842 bio->bi_flags |= 1 << BIO_UPTODATE; 1843 bio->bi_flags |= 1 << BIO_UPTODATE;
1844 bio->bi_comp_cpu = -1;
1843 bio->bi_rw = READ; 1845 bio->bi_rw = READ;
1844 bio->bi_vcnt = 0; 1846 bio->bi_vcnt = 0;
1845 bio->bi_idx = 0; 1847 bio->bi_idx = 0;
@@ -1912,7 +1914,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1912 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) 1914 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
1913 break; 1915 break;
1914 BUG_ON(sync_blocks < (PAGE_SIZE>>9)); 1916 BUG_ON(sync_blocks < (PAGE_SIZE>>9));
1915 if (len > (sync_blocks<<9)) 1917 if ((len >> 9) > sync_blocks)
1916 len = sync_blocks<<9; 1918 len = sync_blocks<<9;
1917 } 1919 }
1918 1920