Hi, I've noticed that a great number of people have had trouble with getting their software RAID 4/5/6 arrays to work properly with dmraid. While investigating this problem, I decided to recompile my kernel to see if it could be the problem. Lo and behold: ubuntu/built-in.o: In function `dm_rh_dec': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:527: multiple definition of `dm_rh_dec' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:535: first defined here ubuntu/built-in.o: In function `dm_rh_delay': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:673: multiple definition of `dm_rh_delay' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:687: first defined here ubuntu/built-in.o: In function `dm_rh_recovery_in_flight': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:661: multiple definition of `dm_rh_recovery_in_flight' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:675: first defined here ubuntu/built-in.o: In function `dm_rh_update_states': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:431: multiple definition of `dm_rh_update_states' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:437: first defined here ubuntu/built-in.o: In function `dm_rh_start_recovery': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:707: multiple definition of `dm_rh_start_recovery' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:708: first defined here ubuntu/built-in.o: In function `dm_rh_mark_nosync': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:393: multiple definition of `dm_rh_mark_nosync' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:395: first defined here ubuntu/built-in.o: In function `dm_region_hash_destroy': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:230: multiple definition of `dm_region_hash_destroy' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:235: first defined here ubuntu/built-in.o: In function `dm_rh_region_to_sector': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:118: multiple definition of `dm_rh_region_to_sector' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:122: first defined here ubuntu/built-in.o: In function `dm_rh_dirty_log': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:255: multiple definition of `dm_rh_dirty_log' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:260: first defined here ubuntu/built-in.o: In function `dm_rh_stop_recovery': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:697: multiple definition of `dm_rh_stop_recovery' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:698: first defined here ubuntu/built-in.o: In function `dm_rh_bio_to_region': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:124: multiple definition of `dm_rh_bio_to_region' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:128: first defined here ubuntu/built-in.o: In function `dm_rh_recovery_prepare': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:604: multiple definition of `dm_rh_recovery_prepare' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:619: first defined here ubuntu/built-in.o: In function `dm_rh_recovery_start': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:627: multiple definition of `dm_rh_recovery_start' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:642: first defined here ubuntu/built-in.o: In function `dm_rh_flush': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:667: multiple definition of `dm_rh_flush' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:681: first defined here ubuntu/built-in.o: In function `dm_rh_region_context': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:130: multiple definition of `dm_rh_region_context' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:134: first defined here ubuntu/built-in.o: In function `dm_region_hash_create': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:163: multiple definition of `dm_region_hash_create' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:167: first defined here ubuntu/built-in.o: In function `dm_rh_get_region_key': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:136: multiple definition of `dm_rh_get_region_key' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:140: first defined here ubuntu/built-in.o: In function `dm_rh_inc_pending': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:518: multiple definition of `dm_rh_inc_pending' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:523: first defined here ubuntu/built-in.o: In function `dm_rh_get_state': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:333: multiple definition of `dm_rh_get_state' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:338: first defined here ubuntu/built-in.o: In function `dm_rh_get_region_size': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:142: multiple definition of `dm_rh_get_region_size' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:146: first defined here ubuntu/built-in.o: In function `dm_rh_recovery_end': /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c:643: multiple definition of `dm_rh_recovery_end' drivers/built-in.o:/home/erick/Desktop/linux-source-2.6.35/drivers/md/dm-region-hash.c:658: first defined here make: *** [vmlinux.o] Error 1 Now, at first, I thought it was that I tried using -O3 optimizations instead of -O2 so I changed everything back to the way it "should" have been and ran make clean. Upon my next attempt, the same thing happened. I should mention that I'm using Ubuntu 10.10 and there are a great number of bugs they need to work through. But, I feel that this is more of a source code problem than an Ubuntu problem. Please review and let me know what you think. Thanks!
dm-region-hash.c builds fine in 2.6.35 for me, but then I don't have the conflicting Ubuntu file(s), e.g.: /home/erick/Desktop/linux-source-2.6.35/ubuntu/dm-raid4-5/dm-region-hash.c so it looks like an Ubuntu-only problem to me.
Yeah, I noticed that afterwards. However, it seems that it wasn't just Ubuntu that had this problem for a while. Initially, a few other distributions were having this as well. I was thinking that it might be a better idea to include dm-raid4/5/6 support in the original kernel as it already has the required modules that it's based upon. This would keep all distributions pretty well covered as far as being able to use dm-raid4/5/6 on devices otherwise unseen by Linux. It would also allow for a universal fix and hopefully someone cleaning up the code (because OMG! I so don't want to try going through that again [hasn't anyone heard of typedef?!]). If you're wondering what other distro's had this problem, Fedora did for a while until they finally fixed it.