Cheng Renquan cd2ac9321c md: need another print_sb for mdp_superblock_1
md_print_devices is called in two code path: MD_BUG(...), and md_ioctl
with PRINT_RAID_DEBUG.  it will dump out all in use md devices
information;

However, it wrongly processed two types of superblock in one:

The header file <linux/raid/md_p.h> has defined two types of superblock,
struct mdp_superblock_s (typedefed with mdp_super_t) according to md with
metadata 0.90, and struct mdp_superblock_1 according to md with metadata
1.0 and later,

These two types of superblock are very different,

The md_print_devices code processed them both in mdp_super_t, that would
lead to wrong informaton dump like:

	[ 6742.345877]
	[ 6742.345887] md:	**********************************
	[ 6742.345890] md:	* <COMPLETE RAID STATE PRINTOUT> *
	[ 6742.345892] md:	**********************************
	[ 6742.345896] md1: <ram7><ram6><ram5><ram4>
	[ 6742.345907] md: rdev ram7, SZ:00065472 F:0 S:1 DN:3
	[ 6742.345909] md: rdev superblock:
	[ 6742.345914] md:  SB: (V:0.90.0) ID:<42ef13c7.598c059a.5f9f1645.801e9ee6> CT:4919856d
	[ 6742.345918] md:     L5 S00065472 ND:4 RD:4 md1 LO:2 CS:65536
	[ 6742.345922] md:     UT:4919856d ST:1 AD:4 WD:4 FD:0 SD:0 CSUM:b7992907 E:00000001
	[ 6742.345924]      D  0:  DISK<N:0,(1,8),R:0,S:6>
	[ 6742.345930]      D  1:  DISK<N:1,(1,10),R:1,S:6>
	[ 6742.345933]      D  2:  DISK<N:2,(1,12),R:2,S:6>
	[ 6742.345937]      D  3:  DISK<N:3,(1,14),R:3,S:6>
	[ 6742.345942] md:     THIS:  DISK<N:3,(1,14),R:3,S:6>
	...
	[ 6742.346058] md0: <ram3><ram2><ram1><ram0>
	[ 6742.346067] md: rdev ram3, SZ:00065472 F:0 S:1 DN:3
	[ 6742.346070] md: rdev superblock:
	[ 6742.346073] md:  SB: (V:1.0.0) ID:<369aad81.00000000.00000000.00000000> CT:9a322a9c
	[ 6742.346077] md:     L-1507699579 S976570180 ND:48 RD:0 md0 LO:65536 CS:196610
	[ 6742.346081] md:     UT:00000018 ST:0 AD:131048 WD:0 FD:8 SD:0 CSUM:00000000 E:00000000
	[ 6742.346084]      D  0:  DISK<N:-1,(-1,-1),R:-1,S:-1>
	[ 6742.346089]      D  1:  DISK<N:-1,(-1,-1),R:-1,S:-1>
	[ 6742.346092]      D  2:  DISK<N:-1,(-1,-1),R:-1,S:-1>
	[ 6742.346096]      D  3:  DISK<N:-1,(-1,-1),R:-1,S:-1>
	[ 6742.346102] md:     THIS:  DISK<N:0,(0,0),R:0,S:0>
	...
	[ 6742.346219] md:	**********************************
	[ 6742.346221]

Here md1 is metadata 0.90.0, and md0 is metadata 1.2

After some more code to distinguish these two types of superblock, in this patch,

it will generate dump information like:

	[ 7906.755790]
	[ 7906.755799] md:	**********************************
	[ 7906.755802] md:	* <COMPLETE RAID STATE PRINTOUT> *
	[ 7906.755804] md:	**********************************
	[ 7906.755808] md1: <ram7><ram6><ram5><ram4>
	[ 7906.755819] md: rdev ram7, SZ:00065472 F:0 S:1 DN:3
	[ 7906.755821] md: rdev superblock (MJ:0):
	[ 7906.755826] md:  SB: (V:0.90.0) ID:<3fca7a0d.a612bfed.5f9f1645.801e9ee6> CT:491989f3
	[ 7906.755830] md:     L5 S00065472 ND:4 RD:4 md1 LO:2 CS:65536
	[ 7906.755834] md:     UT:491989f3 ST:1 AD:4 WD:4 FD:0 SD:0 CSUM:00fb52ad E:00000001
	[ 7906.755836]      D  0:  DISK<N:0,(1,8),R:0,S:6>
	[ 7906.755842]      D  1:  DISK<N:1,(1,10),R:1,S:6>
	[ 7906.755845]      D  2:  DISK<N:2,(1,12),R:2,S:6>
	[ 7906.755849]      D  3:  DISK<N:3,(1,14),R:3,S:6>
	[ 7906.755855] md:     THIS:  DISK<N:3,(1,14),R:3,S:6>
	...
	[ 7906.755972] md0: <ram3><ram2><ram1><ram0>
	[ 7906.755981] md: rdev ram3, SZ:00065472 F:0 S:1 DN:3
	[ 7906.755984] md: rdev superblock (MJ:1):
	[ 7906.755989] md:  SB: (V:1) (F:0) Array-ID:<5fbcf158:55aa:5fbe:9a79:1e939880dcbd>
	[ 7906.755990] md:    Name: "DG5:0" CT:1226410480
	[ 7906.755998] md:       L5 SZ130944 RD:4 LO:2 CS:128 DO:24 DS:131048 SO:8 RO:0
	[ 7906.755999] md:     Dev:00000003 UUID: 9194d744:87f7:a448:85f2:7497b84ce30a
	[ 7906.756001] md:       (F:0) UT:1226410480 Events:0 ResyncOffset:-1 CSUM:0dbcd829
	[ 7906.756003] md:         (MaxDev:384)
	...
	[ 7906.756113] md:	**********************************
	[ 7906.756116]

this md0 (metadata 1.2) information dumping is exactly according to struct
mdp_superblock_1.

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Dan Williams <dan.j.williams@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2009-01-09 08:31:08 +11:00
..
2009-01-04 12:17:42 +01:00
2009-01-07 17:38:32 -05:00
2008-10-13 21:51:51 +01:00
2008-09-12 16:30:20 -07:00
2008-02-05 03:20:13 -08:00
2008-02-06 10:41:02 -08:00
2008-11-11 21:15:50 -05:00
2008-07-01 11:28:06 +10:00
2008-10-20 11:01:52 -07:00
2008-08-12 10:13:38 +10:00
2008-06-19 10:42:17 +10:00
2008-12-29 08:29:50 +01:00
2008-12-03 22:12:38 -08:00
2008-12-03 22:12:38 -08:00
2008-03-04 13:41:23 +01:00
2008-10-20 08:52:42 -07:00
2009-01-06 15:59:29 -08:00
2009-01-01 10:12:19 +10:30
2008-06-06 11:29:10 -07:00
2008-12-29 08:29:50 +01:00
2008-11-26 12:13:34 +01:00
2009-01-04 13:33:20 -08:00
2008-05-29 01:38:46 -07:00
2008-04-22 15:16:32 -05:00
2008-11-12 17:17:18 -08:00
2008-07-04 10:40:05 -07:00
2009-01-06 15:59:01 -08:00
2008-10-16 11:21:32 -07:00
2008-07-25 10:53:33 -07:00
2008-11-30 11:00:15 -08:00
2009-01-02 12:19:34 -08:00
2008-12-29 17:47:23 +10:00
2008-12-25 11:01:43 +11:00
2008-11-24 18:57:41 -05:00
2008-07-20 17:12:38 -07:00
2008-07-22 17:30:57 -07:00
2008-12-31 18:07:38 -05:00
2008-04-21 11:22:28 -05:00
2008-08-28 11:49:15 -05:00
2008-04-25 13:26:55 +01:00
2008-04-25 13:26:55 +01:00
2008-07-21 12:00:37 +01:00
2008-04-25 13:26:55 +01:00
2008-12-29 07:39:34 -05:00
2008-10-16 16:53:13 +02:00
2008-10-12 12:05:55 +02:00
2008-02-07 08:42:30 -08:00
2008-12-15 23:44:31 -08:00
2008-07-24 10:47:29 -07:00
2008-08-20 13:19:51 -07:00
2009-01-04 13:33:20 -08:00
2009-01-04 13:33:20 -08:00
2008-12-29 11:27:46 +02:00
2008-10-08 19:44:18 -04:00
2008-08-12 16:07:31 -07:00
2008-12-31 18:07:42 -05:00
2008-12-01 19:14:02 +01:00
2009-01-06 15:59:01 -08:00
2008-09-22 07:29:31 +01:00
2008-10-16 11:21:40 -07:00
2008-07-20 17:12:36 -07:00
2008-12-08 01:14:16 -08:00
2008-10-14 23:51:02 +02:00
2008-07-31 18:45:41 +02:00
2008-08-08 15:13:27 +01:00
2009-01-07 14:29:17 +01:00
2008-10-16 11:21:38 -07:00
2008-06-11 21:00:38 -07:00
2008-07-18 18:05:19 -07:00
2008-06-11 21:00:38 -07:00
2008-10-09 11:59:55 -07:00
2008-08-02 18:36:10 +01:00
2008-10-07 15:34:37 -07:00
2008-12-31 18:07:42 -05:00
2008-10-29 22:02:09 +01:00
2008-11-03 18:21:45 +01:00
2008-05-05 16:47:14 +10:00
2008-10-15 14:24:08 +02:00
2008-06-11 21:00:38 -07:00
2008-04-29 08:06:15 -07:00
2008-04-19 19:10:28 -07:00
2009-01-05 08:40:30 -08:00
2008-06-04 17:50:17 +01:00
2009-01-05 08:40:30 -08:00
2008-05-20 12:17:39 -04:00
2008-12-31 15:11:46 +01:00
2008-07-24 10:47:17 -07:00
2008-07-04 10:40:05 -07:00
2008-04-19 19:44:57 +02:00
2009-01-03 14:11:07 +01:00
2008-07-23 09:49:56 +01:00
2008-10-20 22:34:12 +01:00
2008-12-28 22:43:21 -05:00
2008-09-01 09:47:16 +02:00
2008-02-06 10:41:01 -08:00
2008-10-13 09:47:43 +11:00
2008-10-09 08:56:06 +02:00
2008-04-29 08:06:01 -07:00
2008-07-27 01:56:38 +02:00
2008-07-27 01:54:58 +02:00
2008-08-02 16:28:50 +02:00
2008-10-20 08:52:31 -07:00
2009-01-06 15:58:58 -08:00
2008-07-28 16:30:21 -07:00
2008-11-06 15:41:21 -08:00
2008-06-06 11:29:12 -07:00
2008-12-08 14:31:59 +01:00
2008-11-19 18:49:57 -08:00
2009-01-04 16:13:40 -08:00
2009-01-07 17:38:31 -05:00
2008-12-23 15:21:45 -05:00
2008-12-19 15:22:54 -05:00
2008-12-21 14:21:14 +11:00
2008-11-30 10:03:35 -08:00
2008-10-16 11:21:49 -07:00
2008-02-14 21:13:33 -08:00
2008-04-29 08:06:02 -07:00
2008-04-29 08:06:02 -07:00
2008-11-28 16:24:56 -08:00
2008-12-04 09:09:37 +01:00
2008-11-07 22:56:00 -08:00
2008-11-20 04:10:00 -08:00
2008-08-05 14:33:50 -07:00
2009-01-06 10:44:30 -08:00
2008-10-23 00:11:07 -04:00
2009-01-06 15:59:12 -08:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-10-23 18:54:05 +04:00
2008-12-20 09:15:46 +01:00
2008-05-19 16:25:39 +01:00
2009-01-05 18:31:12 -08:00
2008-10-02 15:53:13 -07:00
2008-11-12 17:17:17 -08:00
2008-11-16 19:39:21 -08:00
2008-05-25 07:09:47 +02:00
2009-01-04 13:33:20 -08:00
2009-01-07 09:58:22 +11:00
2008-07-25 10:53:42 -07:00
2008-07-24 08:31:21 -04:00
2008-04-25 00:25:08 +02:00
2008-02-07 08:42:34 -08:00
2008-02-07 08:42:30 -08:00
2008-12-15 23:42:33 -08:00
2008-08-05 09:28:47 +03:00
2008-07-25 10:53:30 -07:00
2008-09-09 17:41:42 +02:00
2008-06-20 14:05:53 -06:00
2008-12-30 09:05:16 +10:30
2008-11-24 21:27:22 -08:00
2008-08-11 09:30:24 +02:00
2008-07-20 17:12:37 -07:00
2008-11-02 10:15:07 -08:00
2008-10-16 11:21:47 -07:00
2008-10-07 14:43:06 -07:00
2008-10-13 09:51:40 -07:00
2009-01-01 10:12:25 +10:30
2008-12-12 17:01:38 +01:00
2008-09-05 14:39:38 -07:00
2009-01-02 10:19:36 -08:00
2008-07-20 17:12:34 -07:00
2009-01-07 10:00:14 -08:00
2008-07-21 15:15:55 -07:00
2008-05-09 07:45:18 -07:00
2008-10-16 11:21:31 -07:00
2009-01-06 15:59:09 -08:00