diff options
-rw-r--r-- | drivers/md/linear.c | 8 | ||||
-rw-r--r-- | drivers/md/md.c | 21 | ||||
-rw-r--r-- | drivers/md/multipath.c | 9 | ||||
-rw-r--r-- | drivers/md/raid0.c | 5 | ||||
-rw-r--r-- | drivers/md/raid5.c | 5 | ||||
-rw-r--r-- | drivers/md/raid6.h | 9 | ||||
-rw-r--r-- | include/linux/raid/md.h | 22 |
7 files changed, 4 insertions, 75 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 09a64b9cbde8..190147c79e79 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -16,16 +16,8 @@ | |||
16 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 16 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | ||
20 | |||
21 | #include <linux/raid/md.h> | ||
22 | #include <linux/slab.h> | ||
23 | #include <linux/raid/linear.h> | 19 | #include <linux/raid/linear.h> |
24 | 20 | ||
25 | #define MAJOR_NR MD_MAJOR | ||
26 | #define MD_DRIVER | ||
27 | #define MD_PERSONALITY | ||
28 | |||
29 | /* | 21 | /* |
30 | * find which device holds a particular offset | 22 | * find which device holds a particular offset |
31 | */ | 23 | */ |
diff --git a/drivers/md/md.c b/drivers/md/md.c index fc33082d5ffd..cd97de5982e8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -32,31 +32,20 @@ | |||
32 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 32 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/module.h> | ||
36 | #include <linux/kernel.h> | ||
37 | #include <linux/kthread.h> | 35 | #include <linux/kthread.h> |
38 | #include <linux/linkage.h> | ||
39 | #include <linux/raid/md.h> | 36 | #include <linux/raid/md.h> |
40 | #include <linux/raid/bitmap.h> | 37 | #include <linux/raid/bitmap.h> |
41 | #include <linux/sysctl.h> | 38 | #include <linux/sysctl.h> |
42 | #include <linux/buffer_head.h> /* for invalidate_bdev */ | 39 | #include <linux/buffer_head.h> /* for invalidate_bdev */ |
43 | #include <linux/poll.h> | 40 | #include <linux/poll.h> |
44 | #include <linux/mutex.h> | ||
45 | #include <linux/ctype.h> | 41 | #include <linux/ctype.h> |
46 | #include <linux/freezer.h> | 42 | #include <linux/hdreg.h> |
47 | 43 | #include <linux/proc_fs.h> | |
48 | #include <linux/init.h> | 44 | #include <linux/random.h> |
49 | 45 | #include <linux/reboot.h> | |
50 | #include <linux/file.h> | 46 | #include <linux/file.h> |
51 | 47 | ||
52 | #ifdef CONFIG_KMOD | ||
53 | #include <linux/kmod.h> | ||
54 | #endif | ||
55 | |||
56 | #include <asm/unaligned.h> | ||
57 | |||
58 | #define MAJOR_NR MD_MAJOR | 48 | #define MAJOR_NR MD_MAJOR |
59 | #define MD_DRIVER | ||
60 | 49 | ||
61 | /* 63 partitions with the alternate major number (mdp) */ | 50 | /* 63 partitions with the alternate major number (mdp) */ |
62 | #define MdpMinorShift 6 | 51 | #define MdpMinorShift 6 |
@@ -3559,12 +3548,10 @@ static int do_md_run(mddev_t * mddev) | |||
3559 | } | 3548 | } |
3560 | } | 3549 | } |
3561 | 3550 | ||
3562 | #ifdef CONFIG_KMOD | ||
3563 | if (mddev->level != LEVEL_NONE) | 3551 | if (mddev->level != LEVEL_NONE) |
3564 | request_module("md-level-%d", mddev->level); | 3552 | request_module("md-level-%d", mddev->level); |
3565 | else if (mddev->clevel[0]) | 3553 | else if (mddev->clevel[0]) |
3566 | request_module("md-%s", mddev->clevel); | 3554 | request_module("md-%s", mddev->clevel); |
3567 | #endif | ||
3568 | 3555 | ||
3569 | /* | 3556 | /* |
3570 | * Drop all container device buffers, from now on | 3557 | * Drop all container device buffers, from now on |
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 8bb8794129b3..8744014b9d80 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -19,16 +19,7 @@ | |||
19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/spinlock.h> | ||
25 | #include <linux/raid/multipath.h> | 22 | #include <linux/raid/multipath.h> |
26 | #include <linux/buffer_head.h> | ||
27 | #include <asm/atomic.h> | ||
28 | |||
29 | #define MAJOR_NR MD_MAJOR | ||
30 | #define MD_DRIVER | ||
31 | #define MD_PERSONALITY | ||
32 | 23 | ||
33 | #define MAX_WORK_PER_DISK 128 | 24 | #define MAX_WORK_PER_DISK 128 |
34 | 25 | ||
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 53508a8a981d..8ac6488ad0dc 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -18,13 +18,8 @@ | |||
18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/raid/raid0.h> | 21 | #include <linux/raid/raid0.h> |
23 | 22 | ||
24 | #define MAJOR_NR MD_MAJOR | ||
25 | #define MD_DRIVER | ||
26 | #define MD_PERSONALITY | ||
27 | |||
28 | static void raid0_unplug(struct request_queue *q) | 23 | static void raid0_unplug(struct request_queue *q) |
29 | { | 24 | { |
30 | mddev_t *mddev = q->queuedata; | 25 | mddev_t *mddev = q->queuedata; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ae16794bef20..7e654543c97d 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -43,12 +43,7 @@ | |||
43 | * miss any bits. | 43 | * miss any bits. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/module.h> | ||
47 | #include <linux/slab.h> | ||
48 | #include <linux/highmem.h> | ||
49 | #include <linux/bitops.h> | ||
50 | #include <linux/kthread.h> | 46 | #include <linux/kthread.h> |
51 | #include <asm/atomic.h> | ||
52 | #include "raid6.h" | 47 | #include "raid6.h" |
53 | 48 | ||
54 | #include <linux/raid/bitmap.h> | 49 | #include <linux/raid/bitmap.h> |
diff --git a/drivers/md/raid6.h b/drivers/md/raid6.h index 31cbee71365f..98dcde88470e 100644 --- a/drivers/md/raid6.h +++ b/drivers/md/raid6.h | |||
@@ -18,15 +18,6 @@ | |||
18 | /* Set to 1 to use kernel-wide empty_zero_page */ | 18 | /* Set to 1 to use kernel-wide empty_zero_page */ |
19 | #define RAID6_USE_EMPTY_ZERO_PAGE 0 | 19 | #define RAID6_USE_EMPTY_ZERO_PAGE 0 |
20 | 20 | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/stddef.h> | ||
23 | #include <linux/compiler.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/errno.h> | ||
27 | #include <linux/mempool.h> | ||
28 | #include <linux/list.h> | ||
29 | #include <linux/vmalloc.h> | ||
30 | #include <linux/raid/md.h> | 21 | #include <linux/raid/md.h> |
31 | #include <linux/raid/raid5.h> | 22 | #include <linux/raid/raid5.h> |
32 | 23 | ||
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index dc0e3fcb9f28..bb727fa1ce7f 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -19,27 +19,7 @@ | |||
19 | #define _MD_H | 19 | #define _MD_H |
20 | 20 | ||
21 | #include <linux/blkdev.h> | 21 | #include <linux/blkdev.h> |
22 | #include <linux/major.h> | ||
23 | #include <linux/ioctl.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/bitops.h> | ||
26 | #include <linux/module.h> | ||
27 | #include <linux/hdreg.h> | ||
28 | #include <linux/proc_fs.h> | ||
29 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
30 | #include <linux/smp_lock.h> | ||
31 | #include <linux/delay.h> | ||
32 | #include <net/checksum.h> | ||
33 | #include <linux/random.h> | ||
34 | #include <linux/kernel_stat.h> | ||
35 | #include <asm/io.h> | ||
36 | #include <linux/completion.h> | ||
37 | #include <linux/mempool.h> | ||
38 | #include <linux/list.h> | ||
39 | #include <linux/reboot.h> | ||
40 | #include <linux/vmalloc.h> | ||
41 | #include <linux/blkpg.h> | ||
42 | #include <linux/bio.h> | ||
43 | 23 | ||
44 | /* | 24 | /* |
45 | * 'md_p.h' holds the 'physical' layout of RAID devices | 25 | * 'md_p.h' holds the 'physical' layout of RAID devices |
@@ -83,10 +63,8 @@ extern void md_wakeup_thread(mdk_thread_t *thread); | |||
83 | extern void md_check_recovery(mddev_t *mddev); | 63 | extern void md_check_recovery(mddev_t *mddev); |
84 | extern void md_write_start(mddev_t *mddev, struct bio *bi); | 64 | extern void md_write_start(mddev_t *mddev, struct bio *bi); |
85 | extern void md_write_end(mddev_t *mddev); | 65 | extern void md_write_end(mddev_t *mddev); |
86 | extern void md_handle_safemode(mddev_t *mddev); | ||
87 | extern void md_done_sync(mddev_t *mddev, int blocks, int ok); | 66 | extern void md_done_sync(mddev_t *mddev, int blocks, int ok); |
88 | extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); | 67 | extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); |
89 | extern void md_unplug_mddev(mddev_t *mddev); | ||
90 | 68 | ||
91 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | 69 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, |
92 | sector_t sector, int size, struct page *page); | 70 | sector_t sector, int size, struct page *page); |