Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md

Pull MD fix from Shaohua Li:
"As you know, Neil steps down from MD. I'm looking after it. Here are
some patches queued.

A build fix from Gayatri and several trival patches from me"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
md-cluster: delete useless code
md-cluster: fix missing memory free
raid6/algos.c : bug fix : Add the missing definitions to the pq.h file
MD: add myself as MD maintainer
MD: rename some functions

+61 -56
+1
MAINTAINERS
··· 10154 10154 F: drivers/media/pci/solo6x10/ 10155 10155 10156 10156 SOFTWARE RAID (Multiple Disks) SUPPORT 10157 + M: Shaohua Li <shli@kernel.org> 10157 10158 L: linux-raid@vger.kernel.org 10158 10159 T: git git://neil.brown.name/md 10159 10160 S: Supported
-4
drivers/md/bitmap.c
··· 210 210 struct block_device *bdev; 211 211 struct mddev *mddev = bitmap->mddev; 212 212 struct bitmap_storage *store = &bitmap->storage; 213 - int node_offset = 0; 214 - 215 - if (mddev_is_clustered(bitmap->mddev)) 216 - node_offset = bitmap->cluster_slot * store->file_pages; 217 213 218 214 while ((rdev = next_active_rdev(rdev, mddev)) != NULL) { 219 215 int size = PAGE_SIZE;
+9 -9
drivers/md/faulty.c
··· 170 170 conf->nfaults = n+1; 171 171 } 172 172 173 - static void make_request(struct mddev *mddev, struct bio *bio) 173 + static void faulty_make_request(struct mddev *mddev, struct bio *bio) 174 174 { 175 175 struct faulty_conf *conf = mddev->private; 176 176 int failit = 0; ··· 226 226 generic_make_request(bio); 227 227 } 228 228 229 - static void status(struct seq_file *seq, struct mddev *mddev) 229 + static void faulty_status(struct seq_file *seq, struct mddev *mddev) 230 230 { 231 231 struct faulty_conf *conf = mddev->private; 232 232 int n; ··· 259 259 } 260 260 261 261 262 - static int reshape(struct mddev *mddev) 262 + static int faulty_reshape(struct mddev *mddev) 263 263 { 264 264 int mode = mddev->new_layout & ModeMask; 265 265 int count = mddev->new_layout >> ModeShift; ··· 299 299 return sectors; 300 300 } 301 301 302 - static int run(struct mddev *mddev) 302 + static int faulty_run(struct mddev *mddev) 303 303 { 304 304 struct md_rdev *rdev; 305 305 int i; ··· 327 327 md_set_array_sectors(mddev, faulty_size(mddev, 0, 0)); 328 328 mddev->private = conf; 329 329 330 - reshape(mddev); 330 + faulty_reshape(mddev); 331 331 332 332 return 0; 333 333 } ··· 344 344 .name = "faulty", 345 345 .level = LEVEL_FAULTY, 346 346 .owner = THIS_MODULE, 347 - .make_request = make_request, 348 - .run = run, 347 + .make_request = faulty_make_request, 348 + .run = faulty_run, 349 349 .free = faulty_free, 350 - .status = status, 351 - .check_reshape = reshape, 350 + .status = faulty_status, 351 + .check_reshape = faulty_reshape, 352 352 .size = faulty_size, 353 353 }; 354 354
+5 -1
drivers/md/md-cluster.c
··· 293 293 dlm_unlock: 294 294 dlm_unlock_sync(bm_lockres); 295 295 clear_bit: 296 + lockres_free(bm_lockres); 296 297 clear_bit(slot, &cinfo->recovery_map); 297 298 } 298 299 } ··· 683 682 bm_lockres = lockres_init(mddev, str, NULL, 1); 684 683 if (!bm_lockres) 685 684 return -ENOMEM; 686 - if (i == (cinfo->slot_number - 1)) 685 + if (i == (cinfo->slot_number - 1)) { 686 + lockres_free(bm_lockres); 687 687 continue; 688 + } 688 689 689 690 bm_lockres->flags |= DLM_LKF_NOQUEUE; 690 691 ret = dlm_lock_sync(bm_lockres, DLM_LOCK_PW); ··· 861 858 lockres_free(cinfo->token_lockres); 862 859 lockres_free(cinfo->ack_lockres); 863 860 lockres_free(cinfo->no_new_dev_lockres); 861 + lockres_free(cinfo->resync_lockres); 864 862 lockres_free(cinfo->bitmap_lockres); 865 863 unlock_all_bitmaps(mddev); 866 864 dlm_release_lockspace(cinfo->lockspace, 2);
+11 -10
drivers/md/raid1.c
··· 1044 1044 kfree(plug); 1045 1045 } 1046 1046 1047 - static void make_request(struct mddev *mddev, struct bio * bio) 1047 + static void raid1_make_request(struct mddev *mddev, struct bio * bio) 1048 1048 { 1049 1049 struct r1conf *conf = mddev->private; 1050 1050 struct raid1_info *mirror; ··· 1422 1422 wake_up(&conf->wait_barrier); 1423 1423 } 1424 1424 1425 - static void status(struct seq_file *seq, struct mddev *mddev) 1425 + static void raid1_status(struct seq_file *seq, struct mddev *mddev) 1426 1426 { 1427 1427 struct r1conf *conf = mddev->private; 1428 1428 int i; ··· 1439 1439 seq_printf(seq, "]"); 1440 1440 } 1441 1441 1442 - static void error(struct mddev *mddev, struct md_rdev *rdev) 1442 + static void raid1_error(struct mddev *mddev, struct md_rdev *rdev) 1443 1443 { 1444 1444 char b[BDEVNAME_SIZE]; 1445 1445 struct r1conf *conf = mddev->private; ··· 2472 2472 * that can be installed to exclude normal IO requests. 2473 2473 */ 2474 2474 2475 - static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipped) 2475 + static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr, 2476 + int *skipped) 2476 2477 { 2477 2478 struct r1conf *conf = mddev->private; 2478 2479 struct r1bio *r1_bio; ··· 2891 2890 } 2892 2891 2893 2892 static void raid1_free(struct mddev *mddev, void *priv); 2894 - static int run(struct mddev *mddev) 2893 + static int raid1_run(struct mddev *mddev) 2895 2894 { 2896 2895 struct r1conf *conf; 2897 2896 int i; ··· 3171 3170 .name = "raid1", 3172 3171 .level = 1, 3173 3172 .owner = THIS_MODULE, 3174 - .make_request = make_request, 3175 - .run = run, 3173 + .make_request = raid1_make_request, 3174 + .run = raid1_run, 3176 3175 .free = raid1_free, 3177 - .status = status, 3178 - .error_handler = error, 3176 + .status = raid1_status, 3177 + .error_handler = raid1_error, 3179 3178 .hot_add_disk = raid1_add_disk, 3180 3179 .hot_remove_disk= raid1_remove_disk, 3181 3180 .spare_active = raid1_spare_active, 3182 - .sync_request = sync_request, 3181 + .sync_request = raid1_sync_request, 3183 3182 .resize = raid1_resize, 3184 3183 .size = raid1_size, 3185 3184 .check_reshape = raid1_reshape,
+10 -10
drivers/md/raid10.c
··· 1442 1442 one_write_done(r10_bio); 1443 1443 } 1444 1444 1445 - static void make_request(struct mddev *mddev, struct bio *bio) 1445 + static void raid10_make_request(struct mddev *mddev, struct bio *bio) 1446 1446 { 1447 1447 struct r10conf *conf = mddev->private; 1448 1448 sector_t chunk_mask = (conf->geo.chunk_mask & conf->prev.chunk_mask); ··· 1484 1484 wake_up(&conf->wait_barrier); 1485 1485 } 1486 1486 1487 - static void status(struct seq_file *seq, struct mddev *mddev) 1487 + static void raid10_status(struct seq_file *seq, struct mddev *mddev) 1488 1488 { 1489 1489 struct r10conf *conf = mddev->private; 1490 1490 int i; ··· 1562 1562 _enough(conf, 1, ignore); 1563 1563 } 1564 1564 1565 - static void error(struct mddev *mddev, struct md_rdev *rdev) 1565 + static void raid10_error(struct mddev *mddev, struct md_rdev *rdev) 1566 1566 { 1567 1567 char b[BDEVNAME_SIZE]; 1568 1568 struct r10conf *conf = mddev->private; ··· 2802 2802 * 2803 2803 */ 2804 2804 2805 - static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, 2805 + static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr, 2806 2806 int *skipped) 2807 2807 { 2808 2808 struct r10conf *conf = mddev->private; ··· 3523 3523 return ERR_PTR(err); 3524 3524 } 3525 3525 3526 - static int run(struct mddev *mddev) 3526 + static int raid10_run(struct mddev *mddev) 3527 3527 { 3528 3528 struct r10conf *conf; 3529 3529 int i, disk_idx, chunk_size; ··· 4617 4617 .name = "raid10", 4618 4618 .level = 10, 4619 4619 .owner = THIS_MODULE, 4620 - .make_request = make_request, 4621 - .run = run, 4620 + .make_request = raid10_make_request, 4621 + .run = raid10_run, 4622 4622 .free = raid10_free, 4623 - .status = status, 4624 - .error_handler = error, 4623 + .status = raid10_status, 4624 + .error_handler = raid10_error, 4625 4625 .hot_add_disk = raid10_add_disk, 4626 4626 .hot_remove_disk= raid10_remove_disk, 4627 4627 .spare_active = raid10_spare_active, 4628 - .sync_request = sync_request, 4628 + .sync_request = raid10_sync_request, 4629 4629 .quiesce = raid10_quiesce, 4630 4630 .size = raid10_size, 4631 4631 .resize = raid10_resize,
+23 -22
drivers/md/raid5.c
··· 2496 2496 dev->sector = raid5_compute_blocknr(sh, i, previous); 2497 2497 } 2498 2498 2499 - static void error(struct mddev *mddev, struct md_rdev *rdev) 2499 + static void raid5_error(struct mddev *mddev, struct md_rdev *rdev) 2500 2500 { 2501 2501 char b[BDEVNAME_SIZE]; 2502 2502 struct r5conf *conf = mddev->private; ··· 2958 2958 * If several bio share a stripe. The bio bi_phys_segments acts as a 2959 2959 * reference count to avoid race. The reference count should already be 2960 2960 * increased before this function is called (for example, in 2961 - * make_request()), so other bio sharing this stripe will not free the 2961 + * raid5_make_request()), so other bio sharing this stripe will not free the 2962 2962 * stripe. If a stripe is owned by one stripe, the stripe lock will 2963 2963 * protect it. 2964 2964 */ ··· 5135 5135 } 5136 5136 } 5137 5137 5138 - static void make_request(struct mddev *mddev, struct bio * bi) 5138 + static void raid5_make_request(struct mddev *mddev, struct bio * bi) 5139 5139 { 5140 5140 struct r5conf *conf = mddev->private; 5141 5141 int dd_idx; ··· 5225 5225 new_sector = raid5_compute_sector(conf, logical_sector, 5226 5226 previous, 5227 5227 &dd_idx, NULL); 5228 - pr_debug("raid456: make_request, sector %llu logical %llu\n", 5228 + pr_debug("raid456: raid5_make_request, sector %llu logical %llu\n", 5229 5229 (unsigned long long)new_sector, 5230 5230 (unsigned long long)logical_sector); 5231 5231 ··· 5575 5575 return retn; 5576 5576 } 5577 5577 5578 - static inline sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipped) 5578 + static inline sector_t raid5_sync_request(struct mddev *mddev, sector_t sector_nr, 5579 + int *skipped) 5579 5580 { 5580 5581 struct r5conf *conf = mddev->private; 5581 5582 struct stripe_head *sh; ··· 6675 6674 return 0; 6676 6675 } 6677 6676 6678 - static int run(struct mddev *mddev) 6677 + static int raid5_run(struct mddev *mddev) 6679 6678 { 6680 6679 struct r5conf *conf; 6681 6680 int working_disks = 0; ··· 7049 7048 mddev->to_remove = &raid5_attrs_group; 7050 7049 } 7051 7050 7052 - static void status(struct seq_file *seq, struct mddev *mddev) 7051 + static void raid5_status(struct seq_file *seq, struct mddev *mddev) 7053 7052 { 7054 7053 struct r5conf *conf = mddev->private; 7055 7054 int i; ··· 7865 7864 .name = "raid6", 7866 7865 .level = 6, 7867 7866 .owner = THIS_MODULE, 7868 - .make_request = make_request, 7869 - .run = run, 7867 + .make_request = raid5_make_request, 7868 + .run = raid5_run, 7870 7869 .free = raid5_free, 7871 - .status = status, 7872 - .error_handler = error, 7870 + .status = raid5_status, 7871 + .error_handler = raid5_error, 7873 7872 .hot_add_disk = raid5_add_disk, 7874 7873 .hot_remove_disk= raid5_remove_disk, 7875 7874 .spare_active = raid5_spare_active, 7876 - .sync_request = sync_request, 7875 + .sync_request = raid5_sync_request, 7877 7876 .resize = raid5_resize, 7878 7877 .size = raid5_size, 7879 7878 .check_reshape = raid6_check_reshape, ··· 7888 7887 .name = "raid5", 7889 7888 .level = 5, 7890 7889 .owner = THIS_MODULE, 7891 - .make_request = make_request, 7892 - .run = run, 7890 + .make_request = raid5_make_request, 7891 + .run = raid5_run, 7893 7892 .free = raid5_free, 7894 - .status = status, 7895 - .error_handler = error, 7893 + .status = raid5_status, 7894 + .error_handler = raid5_error, 7896 7895 .hot_add_disk = raid5_add_disk, 7897 7896 .hot_remove_disk= raid5_remove_disk, 7898 7897 .spare_active = raid5_spare_active, 7899 - .sync_request = sync_request, 7898 + .sync_request = raid5_sync_request, 7900 7899 .resize = raid5_resize, 7901 7900 .size = raid5_size, 7902 7901 .check_reshape = raid5_check_reshape, ··· 7912 7911 .name = "raid4", 7913 7912 .level = 4, 7914 7913 .owner = THIS_MODULE, 7915 - .make_request = make_request, 7916 - .run = run, 7914 + .make_request = raid5_make_request, 7915 + .run = raid5_run, 7917 7916 .free = raid5_free, 7918 - .status = status, 7919 - .error_handler = error, 7917 + .status = raid5_status, 7918 + .error_handler = raid5_error, 7920 7919 .hot_add_disk = raid5_add_disk, 7921 7920 .hot_remove_disk= raid5_remove_disk, 7922 7921 .spare_active = raid5_spare_active, 7923 - .sync_request = sync_request, 7922 + .sync_request = raid5_sync_request, 7924 7923 .resize = raid5_resize, 7925 7924 .size = raid5_size, 7926 7925 .check_reshape = raid5_check_reshape,
+2
include/linux/raid/pq.h
··· 152 152 153 153 # define jiffies raid6_jiffies() 154 154 # define printk printf 155 + # define pr_err(format, ...) fprintf(stderr, format, ## __VA_ARGS__) 156 + # define pr_info(format, ...) fprintf(stdout, format, ## __VA_ARGS__) 155 157 # define GFP_KERNEL 0 156 158 # define __get_free_pages(x, y) ((unsigned long)mmap(NULL, PAGE_SIZE << (y), \ 157 159 PROT_READ|PROT_WRITE, \