diff options
author | NeilBrown <neilb@suse.de> | 2014-09-30 00:23:59 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-10-13 22:08:29 -0400 |
commit | f72ffdd68616e3697bc782b21c82197aeb480fd5 (patch) | |
tree | e688042b2faf1992e4f94411a4d4c4f2f5272fe4 /drivers/md/raid5.c | |
parent | ac05f256691fe427a3e84c19261adb0b67dd73c0 (diff) |
md: remove unwanted white space from md.c
My editor shows much of this is RED.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 741134d429a4..9c66e5997fc8 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -463,7 +463,6 @@ static inline void insert_hash(struct r5conf *conf, struct stripe_head *sh) | |||
463 | hlist_add_head(&sh->hash, hp); | 463 | hlist_add_head(&sh->hash, hp); |
464 | } | 464 | } |
465 | 465 | ||
466 | |||
467 | /* find an idle stripe, make sure it is unhashed, and return it. */ | 466 | /* find an idle stripe, make sure it is unhashed, and return it. */ |
468 | static struct stripe_head *get_free_stripe(struct r5conf *conf, int hash) | 467 | static struct stripe_head *get_free_stripe(struct r5conf *conf, int hash) |
469 | { | 468 | { |
@@ -540,7 +539,6 @@ retry: | |||
540 | stripe_set_idx(sector, conf, previous, sh); | 539 | stripe_set_idx(sector, conf, previous, sh); |
541 | sh->state = 0; | 540 | sh->state = 0; |
542 | 541 | ||
543 | |||
544 | for (i = sh->disks; i--; ) { | 542 | for (i = sh->disks; i--; ) { |
545 | struct r5dev *dev = &sh->dev[i]; | 543 | struct r5dev *dev = &sh->dev[i]; |
546 | 544 | ||
@@ -1348,7 +1346,6 @@ ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) | |||
1348 | } | 1346 | } |
1349 | } | 1347 | } |
1350 | 1348 | ||
1351 | |||
1352 | static void ops_complete_prexor(void *stripe_head_ref) | 1349 | static void ops_complete_prexor(void *stripe_head_ref) |
1353 | { | 1350 | { |
1354 | struct stripe_head *sh = stripe_head_ref; | 1351 | struct stripe_head *sh = stripe_head_ref; |
@@ -2417,7 +2414,6 @@ static sector_t raid5_compute_sector(struct r5conf *conf, sector_t r_sector, | |||
2417 | return new_sector; | 2414 | return new_sector; |
2418 | } | 2415 | } |
2419 | 2416 | ||
2420 | |||
2421 | static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous) | 2417 | static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous) |
2422 | { | 2418 | { |
2423 | struct r5conf *conf = sh->raid_conf; | 2419 | struct r5conf *conf = sh->raid_conf; |
@@ -2435,7 +2431,6 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous) | |||
2435 | sector_t r_sector; | 2431 | sector_t r_sector; |
2436 | struct stripe_head sh2; | 2432 | struct stripe_head sh2; |
2437 | 2433 | ||
2438 | |||
2439 | chunk_offset = sector_div(new_sector, sectors_per_chunk); | 2434 | chunk_offset = sector_div(new_sector, sectors_per_chunk); |
2440 | stripe = new_sector; | 2435 | stripe = new_sector; |
2441 | 2436 | ||
@@ -2539,7 +2534,6 @@ static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous) | |||
2539 | return r_sector; | 2534 | return r_sector; |
2540 | } | 2535 | } |
2541 | 2536 | ||
2542 | |||
2543 | static void | 2537 | static void |
2544 | schedule_reconstruction(struct stripe_head *sh, struct stripe_head_state *s, | 2538 | schedule_reconstruction(struct stripe_head *sh, struct stripe_head_state *s, |
2545 | int rcw, int expand) | 2539 | int rcw, int expand) |
@@ -3011,7 +3005,6 @@ static void handle_stripe_fill(struct stripe_head *sh, | |||
3011 | set_bit(STRIPE_HANDLE, &sh->state); | 3005 | set_bit(STRIPE_HANDLE, &sh->state); |
3012 | } | 3006 | } |
3013 | 3007 | ||
3014 | |||
3015 | /* handle_stripe_clean_event | 3008 | /* handle_stripe_clean_event |
3016 | * any written block on an uptodate or failed drive can be returned. | 3009 | * any written block on an uptodate or failed drive can be returned. |
3017 | * Note that if we 'wrote' to a failed drive, it will be UPTODATE, but | 3010 | * Note that if we 'wrote' to a failed drive, it will be UPTODATE, but |
@@ -3302,7 +3295,6 @@ static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh, | |||
3302 | } | 3295 | } |
3303 | } | 3296 | } |
3304 | 3297 | ||
3305 | |||
3306 | static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh, | 3298 | static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh, |
3307 | struct stripe_head_state *s, | 3299 | struct stripe_head_state *s, |
3308 | int disks) | 3300 | int disks) |
@@ -3937,7 +3929,6 @@ static void handle_stripe(struct stripe_head *sh) | |||
3937 | } | 3929 | } |
3938 | } | 3930 | } |
3939 | 3931 | ||
3940 | |||
3941 | /* Finish reconstruct operations initiated by the expansion process */ | 3932 | /* Finish reconstruct operations initiated by the expansion process */ |
3942 | if (sh->reconstruct_state == reconstruct_state_result) { | 3933 | if (sh->reconstruct_state == reconstruct_state_result) { |
3943 | struct stripe_head *sh_src | 3934 | struct stripe_head *sh_src |
@@ -4135,7 +4126,6 @@ static int raid5_mergeable_bvec(struct request_queue *q, | |||
4135 | return max; | 4126 | return max; |
4136 | } | 4127 | } |
4137 | 4128 | ||
4138 | |||
4139 | static int in_chunk_boundary(struct mddev *mddev, struct bio *bio) | 4129 | static int in_chunk_boundary(struct mddev *mddev, struct bio *bio) |
4140 | { | 4130 | { |
4141 | sector_t sector = bio->bi_iter.bi_sector + get_start_sect(bio->bi_bdev); | 4131 | sector_t sector = bio->bi_iter.bi_sector + get_start_sect(bio->bi_bdev); |
@@ -4165,7 +4155,6 @@ static void add_bio_to_retry(struct bio *bi,struct r5conf *conf) | |||
4165 | md_wakeup_thread(conf->mddev->thread); | 4155 | md_wakeup_thread(conf->mddev->thread); |
4166 | } | 4156 | } |
4167 | 4157 | ||
4168 | |||
4169 | static struct bio *remove_bio_from_retry(struct r5conf *conf) | 4158 | static struct bio *remove_bio_from_retry(struct r5conf *conf) |
4170 | { | 4159 | { |
4171 | struct bio *bi; | 4160 | struct bio *bi; |
@@ -4189,7 +4178,6 @@ static struct bio *remove_bio_from_retry(struct r5conf *conf) | |||
4189 | return bi; | 4178 | return bi; |
4190 | } | 4179 | } |
4191 | 4180 | ||
4192 | |||
4193 | /* | 4181 | /* |
4194 | * The "raid5_align_endio" should check if the read succeeded and if it | 4182 | * The "raid5_align_endio" should check if the read succeeded and if it |
4195 | * did, call bio_endio on the original bio (having bio_put the new bio | 4183 | * did, call bio_endio on the original bio (having bio_put the new bio |
@@ -4222,7 +4210,6 @@ static void raid5_align_endio(struct bio *bi, int error) | |||
4222 | return; | 4210 | return; |
4223 | } | 4211 | } |
4224 | 4212 | ||
4225 | |||
4226 | pr_debug("raid5_align_endio : io error...handing IO for a retry\n"); | 4213 | pr_debug("raid5_align_endio : io error...handing IO for a retry\n"); |
4227 | 4214 | ||
4228 | add_bio_to_retry(raid_bi, conf); | 4215 | add_bio_to_retry(raid_bi, conf); |
@@ -4247,7 +4234,6 @@ static int bio_fits_rdev(struct bio *bi) | |||
4247 | return 1; | 4234 | return 1; |
4248 | } | 4235 | } |
4249 | 4236 | ||
4250 | |||
4251 | static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio) | 4237 | static int chunk_aligned_read(struct mddev *mddev, struct bio * raid_bio) |
4252 | { | 4238 | { |
4253 | struct r5conf *conf = mddev->private; | 4239 | struct r5conf *conf = mddev->private; |
@@ -5444,7 +5430,6 @@ raid5_skip_copy = __ATTR(skip_copy, S_IRUGO | S_IWUSR, | |||
5444 | raid5_show_skip_copy, | 5430 | raid5_show_skip_copy, |
5445 | raid5_store_skip_copy); | 5431 | raid5_store_skip_copy); |
5446 | 5432 | ||
5447 | |||
5448 | static ssize_t | 5433 | static ssize_t |
5449 | stripe_cache_active_show(struct mddev *mddev, char *page) | 5434 | stripe_cache_active_show(struct mddev *mddev, char *page) |
5450 | { | 5435 | { |
@@ -5896,7 +5881,6 @@ static struct r5conf *setup_conf(struct mddev *mddev) | |||
5896 | return ERR_PTR(-ENOMEM); | 5881 | return ERR_PTR(-ENOMEM); |
5897 | } | 5882 | } |
5898 | 5883 | ||
5899 | |||
5900 | static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded) | 5884 | static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded) |
5901 | { | 5885 | { |
5902 | switch (algo) { | 5886 | switch (algo) { |
@@ -5909,7 +5893,7 @@ static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded | |||
5909 | return 1; | 5893 | return 1; |
5910 | break; | 5894 | break; |
5911 | case ALGORITHM_PARITY_0_6: | 5895 | case ALGORITHM_PARITY_0_6: |
5912 | if (raid_disk == 0 || | 5896 | if (raid_disk == 0 || |
5913 | raid_disk == raid_disks - 1) | 5897 | raid_disk == raid_disks - 1) |
5914 | return 1; | 5898 | return 1; |
5915 | break; | 5899 | break; |
@@ -6163,7 +6147,6 @@ static int run(struct mddev *mddev) | |||
6163 | "reshape"); | 6147 | "reshape"); |
6164 | } | 6148 | } |
6165 | 6149 | ||
6166 | |||
6167 | /* Ok, everything is just fine now */ | 6150 | /* Ok, everything is just fine now */ |
6168 | if (mddev->to_remove == &raid5_attrs_group) | 6151 | if (mddev->to_remove == &raid5_attrs_group) |
6169 | mddev->to_remove = NULL; | 6152 | mddev->to_remove = NULL; |
@@ -6812,7 +6795,6 @@ static void raid5_quiesce(struct mddev *mddev, int state) | |||
6812 | } | 6795 | } |
6813 | } | 6796 | } |
6814 | 6797 | ||
6815 | |||
6816 | static void *raid45_takeover_raid0(struct mddev *mddev, int level) | 6798 | static void *raid45_takeover_raid0(struct mddev *mddev, int level) |
6817 | { | 6799 | { |
6818 | struct r0conf *raid0_conf = mddev->private; | 6800 | struct r0conf *raid0_conf = mddev->private; |
@@ -6839,7 +6821,6 @@ static void *raid45_takeover_raid0(struct mddev *mddev, int level) | |||
6839 | return setup_conf(mddev); | 6821 | return setup_conf(mddev); |
6840 | } | 6822 | } |
6841 | 6823 | ||
6842 | |||
6843 | static void *raid5_takeover_raid1(struct mddev *mddev) | 6824 | static void *raid5_takeover_raid1(struct mddev *mddev) |
6844 | { | 6825 | { |
6845 | int chunksect; | 6826 | int chunksect; |
@@ -6900,7 +6881,6 @@ static void *raid5_takeover_raid6(struct mddev *mddev) | |||
6900 | return setup_conf(mddev); | 6881 | return setup_conf(mddev); |
6901 | } | 6882 | } |
6902 | 6883 | ||
6903 | |||
6904 | static int raid5_check_reshape(struct mddev *mddev) | 6884 | static int raid5_check_reshape(struct mddev *mddev) |
6905 | { | 6885 | { |
6906 | /* For a 2-drive array, the layout and chunk size can be changed | 6886 | /* For a 2-drive array, the layout and chunk size can be changed |
@@ -7049,7 +7029,6 @@ static void *raid6_takeover(struct mddev *mddev) | |||
7049 | return setup_conf(mddev); | 7029 | return setup_conf(mddev); |
7050 | } | 7030 | } |
7051 | 7031 | ||
7052 | |||
7053 | static struct md_personality raid6_personality = | 7032 | static struct md_personality raid6_personality = |
7054 | { | 7033 | { |
7055 | .name = "raid6", | 7034 | .name = "raid6", |