@@ -93,20 +93,6 @@ static inline struct bio *r5_next_bio(struct bio *bio, sector_t sector)
9393 else
9494 return NULL ;
9595}
96- /*
97- * The following can be used to debug the driver
98- */
99- #define RAID5_PARANOIA 1
100- #if RAID5_PARANOIA && defined(CONFIG_SMP )
101- # define CHECK_DEVLOCK () assert_spin_locked(&conf->device_lock)
102- #else
103- # define CHECK_DEVLOCK ()
104- #endif
105-
106- #ifdef DEBUG
107- #define inline
108- #define __inline__
109- #endif
11096
11197/*
11298 * We maintain a biased count of active stripes in the bottom 16 bits of
@@ -262,7 +248,6 @@ static inline void insert_hash(raid5_conf_t *conf, struct stripe_head *sh)
262248 pr_debug ("insert_hash(), stripe %llu\n" ,
263249 (unsigned long long )sh -> sector );
264250
265- CHECK_DEVLOCK ();
266251 hlist_add_head (& sh -> hash , hp );
267252}
268253
@@ -273,7 +258,6 @@ static struct stripe_head *get_free_stripe(raid5_conf_t *conf)
273258 struct stripe_head * sh = NULL ;
274259 struct list_head * first ;
275260
276- CHECK_DEVLOCK ();
277261 if (list_empty (& conf -> inactive_list ))
278262 goto out ;
279263 first = conf -> inactive_list .next ;
@@ -329,7 +313,6 @@ static void init_stripe(struct stripe_head *sh, sector_t sector, int previous)
329313 BUG_ON (test_bit (STRIPE_HANDLE , & sh -> state ));
330314 BUG_ON (stripe_operations_active (sh ));
331315
332- CHECK_DEVLOCK ();
333316 pr_debug ("init_stripe called, stripe %llu\n" ,
334317 (unsigned long long )sh -> sector );
335318
@@ -365,7 +348,6 @@ static struct stripe_head *__find_stripe(raid5_conf_t *conf, sector_t sector,
365348 struct stripe_head * sh ;
366349 struct hlist_node * hn ;
367350
368- CHECK_DEVLOCK ();
369351 pr_debug ("__find_stripe, sector %llu\n" , (unsigned long long )sector );
370352 hlist_for_each_entry (sh , hn , stripe_hash (conf , sector ), hash )
371353 if (sh -> sector == sector && sh -> generation == generation )
@@ -4973,41 +4955,6 @@ static int stop(mddev_t *mddev)
49734955 return 0 ;
49744956}
49754957
4976- #ifdef DEBUG
4977- static void print_sh (struct seq_file * seq , struct stripe_head * sh )
4978- {
4979- int i ;
4980-
4981- seq_printf (seq , "sh %llu, pd_idx %d, state %ld.\n" ,
4982- (unsigned long long )sh -> sector , sh -> pd_idx , sh -> state );
4983- seq_printf (seq , "sh %llu, count %d.\n" ,
4984- (unsigned long long )sh -> sector , atomic_read (& sh -> count ));
4985- seq_printf (seq , "sh %llu, " , (unsigned long long )sh -> sector );
4986- for (i = 0 ; i < sh -> disks ; i ++ ) {
4987- seq_printf (seq , "(cache%d: %p %ld) " ,
4988- i , sh -> dev [i ].page , sh -> dev [i ].flags );
4989- }
4990- seq_printf (seq , "\n" );
4991- }
4992-
4993- static void printall (struct seq_file * seq , raid5_conf_t * conf )
4994- {
4995- struct stripe_head * sh ;
4996- struct hlist_node * hn ;
4997- int i ;
4998-
4999- spin_lock_irq (& conf -> device_lock );
5000- for (i = 0 ; i < NR_HASH ; i ++ ) {
5001- hlist_for_each_entry (sh , hn , & conf -> stripe_hashtbl [i ], hash ) {
5002- if (sh -> raid_conf != conf )
5003- continue ;
5004- print_sh (seq , sh );
5005- }
5006- }
5007- spin_unlock_irq (& conf -> device_lock );
5008- }
5009- #endif
5010-
50114958static void status (struct seq_file * seq , mddev_t * mddev )
50124959{
50134960 raid5_conf_t * conf = mddev -> private ;
@@ -5021,10 +4968,6 @@ static void status(struct seq_file *seq, mddev_t *mddev)
50214968 conf -> disks [i ].rdev &&
50224969 test_bit (In_sync , & conf -> disks [i ].rdev -> flags ) ? "U" : "_" );
50234970 seq_printf (seq , "]" );
5024- #ifdef DEBUG
5025- seq_printf (seq , "\n" );
5026- printall (seq , conf );
5027- #endif
50284971}
50294972
50304973static void print_raid5_conf (raid5_conf_t * conf )
0 commit comments