diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bitmap.c | 8 | ||||
-rw-r--r-- | drivers/md/md.c | 2 | ||||
-rw-r--r-- | drivers/md/raid1.c | 1 | ||||
-rw-r--r-- | drivers/md/raid5.c | 1 | ||||
-rw-r--r-- | drivers/md/raid6main.c | 1 |
5 files changed, 8 insertions, 5 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 0c2ed99a3832..70bca955e0de 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -108,7 +108,7 @@ static unsigned char *bitmap_alloc_page(struct bitmap *bitmap) | |||
108 | { | 108 | { |
109 | unsigned char *page; | 109 | unsigned char *page; |
110 | 110 | ||
111 | #if INJECT_FAULTS_1 | 111 | #ifdef INJECT_FAULTS_1 |
112 | page = NULL; | 112 | page = NULL; |
113 | #else | 113 | #else |
114 | page = kmalloc(PAGE_SIZE, GFP_NOIO); | 114 | page = kmalloc(PAGE_SIZE, GFP_NOIO); |
@@ -843,7 +843,7 @@ static int bitmap_init_from_disk(struct bitmap *bitmap, int in_sync) | |||
843 | 843 | ||
844 | BUG_ON(!file && !bitmap->offset); | 844 | BUG_ON(!file && !bitmap->offset); |
845 | 845 | ||
846 | #if INJECT_FAULTS_3 | 846 | #ifdef INJECT_FAULTS_3 |
847 | outofdate = 1; | 847 | outofdate = 1; |
848 | #else | 848 | #else |
849 | outofdate = bitmap->flags & BITMAP_STALE; | 849 | outofdate = bitmap->flags & BITMAP_STALE; |
@@ -1187,7 +1187,7 @@ static int bitmap_start_daemon(struct bitmap *bitmap, mdk_thread_t **ptr, | |||
1187 | 1187 | ||
1188 | spin_unlock_irqrestore(&bitmap->lock, flags); | 1188 | spin_unlock_irqrestore(&bitmap->lock, flags); |
1189 | 1189 | ||
1190 | #if INJECT_FATAL_FAULT_2 | 1190 | #ifdef INJECT_FATAL_FAULT_2 |
1191 | daemon = NULL; | 1191 | daemon = NULL; |
1192 | #else | 1192 | #else |
1193 | sprintf(namebuf, "%%s_%s", name); | 1193 | sprintf(namebuf, "%%s_%s", name); |
@@ -1552,7 +1552,7 @@ int bitmap_create(mddev_t *mddev) | |||
1552 | 1552 | ||
1553 | bitmap->syncchunk = ~0UL; | 1553 | bitmap->syncchunk = ~0UL; |
1554 | 1554 | ||
1555 | #if INJECT_FATAL_FAULT_1 | 1555 | #ifdef INJECT_FATAL_FAULT_1 |
1556 | bitmap->bp = NULL; | 1556 | bitmap->bp = NULL; |
1557 | #else | 1557 | #else |
1558 | bitmap->bp = kmalloc(pages * sizeof(*bitmap->bp), GFP_KERNEL); | 1558 | bitmap->bp = kmalloc(pages * sizeof(*bitmap->bp), GFP_KERNEL); |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 4a0c57db2b67..6580e0fa4a47 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -284,7 +284,7 @@ static mdk_rdev_t * find_rdev(mddev_t * mddev, dev_t dev) | |||
284 | return NULL; | 284 | return NULL; |
285 | } | 285 | } |
286 | 286 | ||
287 | inline static sector_t calc_dev_sboffset(struct block_device *bdev) | 287 | static inline sector_t calc_dev_sboffset(struct block_device *bdev) |
288 | { | 288 | { |
289 | sector_t size = bdev->bd_inode->i_size >> BLOCK_SIZE_BITS; | 289 | sector_t size = bdev->bd_inode->i_size >> BLOCK_SIZE_BITS; |
290 | return MD_NEW_SIZE_BLOCKS(size); | 290 | return MD_NEW_SIZE_BLOCKS(size); |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 5f253ee536bb..d3a64a04a6d8 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1468,6 +1468,7 @@ static int raid1_resize(mddev_t *mddev, sector_t sectors) | |||
1468 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 1468 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
1469 | } | 1469 | } |
1470 | mddev->size = mddev->array_size; | 1470 | mddev->size = mddev->array_size; |
1471 | mddev->resync_max_sectors = sectors; | ||
1471 | return 0; | 1472 | return 0; |
1472 | } | 1473 | } |
1473 | 1474 | ||
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 93a9726cc2d6..4698d5f79575 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1931,6 +1931,7 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors) | |||
1931 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 1931 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
1932 | } | 1932 | } |
1933 | mddev->size = sectors /2; | 1933 | mddev->size = sectors /2; |
1934 | mddev->resync_max_sectors = sectors; | ||
1934 | return 0; | 1935 | return 0; |
1935 | } | 1936 | } |
1936 | 1937 | ||
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c index f62ea1a73d0d..f5ee16805111 100644 --- a/drivers/md/raid6main.c +++ b/drivers/md/raid6main.c | |||
@@ -2095,6 +2095,7 @@ static int raid6_resize(mddev_t *mddev, sector_t sectors) | |||
2095 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); | 2095 | set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
2096 | } | 2096 | } |
2097 | mddev->size = sectors /2; | 2097 | mddev->size = sectors /2; |
2098 | mddev->resync_max_sectors = sectors; | ||
2098 | return 0; | 2099 | return 0; |
2099 | } | 2100 | } |
2100 | 2101 | ||