aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-03-30 23:33:13 -0400
committerNeilBrown <neilb@suse.de>2009-03-30 23:33:13 -0400
commitbff61975b3d6c18ee31457cc5b4d73042f44915f (patch)
tree3aff48088b35172e74f56ae54f0b53e76a0c2150 /drivers
parent92022950c6b1bb3da90b2976b20271cdfd98b8a3 (diff)
md: move lots of #include lines out of .h files and into .c
This makes the includes more explicit, and is preparation for moving md_k.h to drivers/md/md.h Remove include/raid/md.h as its only remaining use was to #include other files. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/bitmap.c3
-rw-r--r--drivers/md/faulty.c5
-rw-r--r--drivers/md/linear.c4
-rw-r--r--drivers/md/linear.h2
-rw-r--r--drivers/md/md.c6
-rw-r--r--drivers/md/multipath.c4
-rw-r--r--drivers/md/multipath.h2
-rw-r--r--drivers/md/raid0.c3
-rw-r--r--drivers/md/raid0.h2
-rw-r--r--drivers/md/raid1.c5
-rw-r--r--drivers/md/raid1.h2
-rw-r--r--drivers/md/raid10.c5
-rw-r--r--drivers/md/raid10.h2
-rw-r--r--drivers/md/raid5.c8
-rw-r--r--drivers/md/raid5.h1
-rw-r--r--drivers/md/raid6.h6
16 files changed, 37 insertions, 23 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 7666117738c7..1df012e9d73d 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -16,6 +16,7 @@
16 * wait if count gets too high, wake when it drops to half. 16 * wait if count gets too high, wake when it drops to half.
17 */ 17 */
18 18
19#include <linux/blkdev.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/errno.h> 21#include <linux/errno.h>
21#include <linux/slab.h> 22#include <linux/slab.h>
@@ -26,7 +27,7 @@
26#include <linux/file.h> 27#include <linux/file.h>
27#include <linux/mount.h> 28#include <linux/mount.h>
28#include <linux/buffer_head.h> 29#include <linux/buffer_head.h>
29#include <linux/raid/md.h> 30#include <linux/raid/md_k.h>
30#include "bitmap.h" 31#include "bitmap.h"
31 32
32/* debug macros */ 33/* debug macros */
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c
index 86d9adf90e79..cc5d2cf08dfc 100644
--- a/drivers/md/faulty.c
+++ b/drivers/md/faulty.c
@@ -62,7 +62,10 @@
62#define ModeShift 5 62#define ModeShift 5
63 63
64#define MaxFault 50 64#define MaxFault 50
65#include <linux/raid/md.h> 65#include <linux/blkdev.h>
66#include <linux/raid/md_u.h>
67#include <linux/raid/md_k.h>
68#include <linux/seq_file.h>
66 69
67 70
68static void faulty_fail(struct bio *bio, int error) 71static void faulty_fail(struct bio *bio, int error)
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 3603ffa9edc5..c43c3b60ef09 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -16,6 +16,10 @@
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/blkdev.h>
20#include <linux/raid/md_u.h>
21#include <linux/raid/md_k.h>
22#include <linux/seq_file.h>
19#include "linear.h" 23#include "linear.h"
20 24
21/* 25/*
diff --git a/drivers/md/linear.h b/drivers/md/linear.h
index f38b9c586afb..bf8179587f95 100644
--- a/drivers/md/linear.h
+++ b/drivers/md/linear.h
@@ -1,8 +1,6 @@
1#ifndef _LINEAR_H 1#ifndef _LINEAR_H
2#define _LINEAR_H 2#define _LINEAR_H
3 3
4#include <linux/raid/md.h>
5
6struct dev_info { 4struct dev_info {
7 mdk_rdev_t *rdev; 5 mdk_rdev_t *rdev;
8 sector_t num_sectors; 6 sector_t num_sectors;
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 96336b050b59..11d6e0e1045a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -33,8 +33,9 @@
33*/ 33*/
34 34
35#include <linux/kthread.h> 35#include <linux/kthread.h>
36#include <linux/raid/md.h> 36#include <linux/blkdev.h>
37#include <linux/sysctl.h> 37#include <linux/sysctl.h>
38#include <linux/seq_file.h>
38#include <linux/buffer_head.h> /* for invalidate_bdev */ 39#include <linux/buffer_head.h> /* for invalidate_bdev */
39#include <linux/poll.h> 40#include <linux/poll.h>
40#include <linux/ctype.h> 41#include <linux/ctype.h>
@@ -44,6 +45,9 @@
44#include <linux/reboot.h> 45#include <linux/reboot.h>
45#include <linux/file.h> 46#include <linux/file.h>
46#include <linux/delay.h> 47#include <linux/delay.h>
48#include <linux/raid/md_k.h>
49#include <linux/raid/md_p.h>
50#include <linux/raid/md_u.h>
47#include "bitmap.h" 51#include "bitmap.h"
48 52
49#define DEBUG 0 53#define DEBUG 0
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 547df09a7af3..148b3cd058bf 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -19,6 +19,10 @@
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/blkdev.h>
23#include <linux/raid/md_u.h>
24#include <linux/raid/md_k.h>
25#include <linux/seq_file.h>
22#include "multipath.h" 26#include "multipath.h"
23 27
24#define MAX_WORK_PER_DISK 128 28#define MAX_WORK_PER_DISK 128
diff --git a/drivers/md/multipath.h b/drivers/md/multipath.h
index 6f53fc177a47..6fa70b400cda 100644
--- a/drivers/md/multipath.h
+++ b/drivers/md/multipath.h
@@ -1,8 +1,6 @@
1#ifndef _MULTIPATH_H 1#ifndef _MULTIPATH_H
2#define _MULTIPATH_H 2#define _MULTIPATH_H
3 3
4#include <linux/raid/md.h>
5
6struct multipath_info { 4struct multipath_info {
7 mdk_rdev_t *rdev; 5 mdk_rdev_t *rdev;
8}; 6};
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index ef09ed04864e..64e4c77a1568 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -18,6 +18,9 @@
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/blkdev.h>
22#include <linux/raid/md_k.h>
23#include <linux/seq_file.h>
21#include "raid0.h" 24#include "raid0.h"
22 25
23static void raid0_unplug(struct request_queue *q) 26static void raid0_unplug(struct request_queue *q)
diff --git a/drivers/md/raid0.h b/drivers/md/raid0.h
index fd42aa87c391..824b12eb1d4f 100644
--- a/drivers/md/raid0.h
+++ b/drivers/md/raid0.h
@@ -1,8 +1,6 @@
1#ifndef _RAID0_H 1#ifndef _RAID0_H
2#define _RAID0_H 2#define _RAID0_H
3 3
4#include <linux/raid/md.h>
5
6struct strip_zone 4struct strip_zone
7{ 5{
8 sector_t zone_start; /* Zone offset in md_dev (in sectors) */ 6 sector_t zone_start; /* Zone offset in md_dev (in sectors) */
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index bff32285f8bb..253b09c86eca 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -31,8 +31,11 @@
31 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 31 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32 */ 32 */
33 33
34#include "dm-bio-list.h"
35#include <linux/delay.h> 34#include <linux/delay.h>
35#include <linux/blkdev.h>
36#include <linux/raid/md_k.h>
37#include <linux/seq_file.h>
38#include "dm-bio-list.h"
36#include "raid1.h" 39#include "raid1.h"
37#include "bitmap.h" 40#include "bitmap.h"
38 41
diff --git a/drivers/md/raid1.h b/drivers/md/raid1.h
index 0a9ba7c3302e..1620eea3d57c 100644
--- a/drivers/md/raid1.h
+++ b/drivers/md/raid1.h
@@ -1,8 +1,6 @@
1#ifndef _RAID1_H 1#ifndef _RAID1_H
2#define _RAID1_H 2#define _RAID1_H
3 3
4#include <linux/raid/md.h>
5
6typedef struct mirror_info mirror_info_t; 4typedef struct mirror_info mirror_info_t;
7 5
8struct mirror_info { 6struct mirror_info {
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index f03dd70d12a5..186e1b199d46 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -18,8 +18,11 @@
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 "dm-bio-list.h"
22#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/blkdev.h>
23#include <linux/raid/md_k.h>
24#include <linux/seq_file.h>
25#include "dm-bio-list.h"
23#include "raid10.h" 26#include "raid10.h"
24#include "bitmap.h" 27#include "bitmap.h"
25 28
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h
index e9091cfeb286..244dbe507a54 100644
--- a/drivers/md/raid10.h
+++ b/drivers/md/raid10.h
@@ -1,8 +1,6 @@
1#ifndef _RAID10_H 1#ifndef _RAID10_H
2#define _RAID10_H 2#define _RAID10_H
3 3
4#include <linux/raid/md.h>
5
6typedef struct mirror_info mirror_info_t; 4typedef struct mirror_info mirror_info_t;
7 5
8struct mirror_info { 6struct mirror_info {
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index f75698b1f63d..816157e7d8e0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -43,8 +43,12 @@
43 * miss any bits. 43 * miss any bits.
44 */ 44 */
45 45
46#include <linux/blkdev.h>
47#include <linux/raid/md_k.h>
46#include <linux/kthread.h> 48#include <linux/kthread.h>
47#include <linux/async_tx.h> 49#include <linux/async_tx.h>
50#include <linux/seq_file.h>
51#include "raid5.h"
48#include "raid6.h" 52#include "raid6.h"
49#include "bitmap.h" 53#include "bitmap.h"
50 54
@@ -1467,7 +1471,7 @@ static void copy_data(int frombio, struct bio *bio,
1467 1471
1468static void compute_parity6(struct stripe_head *sh, int method) 1472static void compute_parity6(struct stripe_head *sh, int method)
1469{ 1473{
1470 raid6_conf_t *conf = sh->raid_conf; 1474 raid5_conf_t *conf = sh->raid_conf;
1471 int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = sh->disks, count; 1475 int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = sh->disks, count;
1472 struct bio *chosen; 1476 struct bio *chosen;
1473 /**** FIX THIS: This could be very bad if disks is close to 256 ****/ 1477 /**** FIX THIS: This could be very bad if disks is close to 256 ****/
@@ -2795,7 +2799,7 @@ static bool handle_stripe5(struct stripe_head *sh)
2795 2799
2796static bool handle_stripe6(struct stripe_head *sh, struct page *tmp_page) 2800static bool handle_stripe6(struct stripe_head *sh, struct page *tmp_page)
2797{ 2801{
2798 raid6_conf_t *conf = sh->raid_conf; 2802 raid5_conf_t *conf = sh->raid_conf;
2799 int disks = sh->disks; 2803 int disks = sh->disks;
2800 struct bio *return_bi = NULL; 2804 struct bio *return_bi = NULL;
2801 int i, pd_idx = sh->pd_idx; 2805 int i, pd_idx = sh->pd_idx;
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index 40f1d0335c74..0ed22dff56e0 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -1,7 +1,6 @@
1#ifndef _RAID5_H 1#ifndef _RAID5_H
2#define _RAID5_H 2#define _RAID5_H
3 3
4#include <linux/raid/md.h>
5#include <linux/raid/xor.h> 4#include <linux/raid/xor.h>
6 5
7/* 6/*
diff --git a/drivers/md/raid6.h b/drivers/md/raid6.h
index f6c13af65002..66e6b0c6734f 100644
--- a/drivers/md/raid6.h
+++ b/drivers/md/raid6.h
@@ -17,11 +17,7 @@
17 17
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#include <linux/blkdev.h>
21#include <linux/raid/md.h>
22#include "raid5.h"
23
24typedef raid5_conf_t raid6_conf_t; /* Same configuration */
25 21
26/* Additional compute_parity mode -- updates the parity w/o LOCKING */ 22/* Additional compute_parity mode -- updates the parity w/o LOCKING */
27#define UPDATE_PARITY 4 23#define UPDATE_PARITY 4