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-06 18:10:26 -08:00
2008-12-03 15:52:35 -08:00
2009-01-02 17:15:07 -02:00
2009-01-06 17:14:01 -08:00
2009-01-06 11:53:56 -05:00
2009-01-04 12:17:42 +01:00
2008-12-22 07:15:03 -08:00
2008-12-31 18:18:13 +01:00
2009-01-07 11:31:52 -08:00
2008-12-16 01:19:41 -08:00
2008-11-20 15:59:56 +01:00
2008-11-20 15:59:56 +01:00
2009-01-07 17:38:32 -05:00
2009-01-09 08:31:08 +11:00
2009-01-07 11:31:52 -08:00
2008-11-10 13:50:19 -08:00
2009-01-06 11:53:47 -05:00
2009-01-07 10:00:06 -08:00
2008-12-22 18:30:29 +00:00
2009-01-07 10:00:22 -08:00
2009-01-02 10:19:37 -08:00
2008-11-11 21:15:50 -05:00
2008-12-29 08:29:50 +01:00
2009-01-07 08:45:46 -08:00
2008-12-03 22:12:38 -08:00
2008-12-03 22:12:38 -08:00
2009-01-05 16:35:31 +01:00
2009-01-04 15:14:42 -05:00
2009-01-06 15:59:23 -08:00
2009-01-06 15:59:23 -08:00
2009-01-06 15:59:29 -08:00
2008-12-29 08:29:50 +01:00
2008-12-30 09:05:13 +10:30
2009-01-01 10:12:19 +10:30
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-11-28 12:38:38 +01:00
2008-12-29 08:28:44 +01:00
2008-11-12 17:17:18 -08:00
2009-01-07 09:38:48 +11:00
2008-11-07 22:56:00 -08:00
2009-01-06 15:59:01 -08:00
2008-12-13 21:20:26 +10:30
2008-11-09 11:17:33 -08:00
2008-11-30 11:00:15 -08:00
2009-01-02 12:19:34 -08:00
2009-01-02 09:29:43 -08:00
2009-01-02 09:23:03 -08:00
2009-01-02 09:23:03 -08:00
2008-12-29 17:47:23 +10:00
2008-12-05 15:20:10 -05:00
2009-01-01 10:12:30 +10:30
2009-01-06 15:58:59 -08:00
2008-12-25 11:01:43 +11:00
2008-11-24 18:57:41 -05:00
2008-12-25 11:01:33 +11:00
2008-12-31 18:07:38 -05:00
2008-12-21 20:10:29 -08:00
2008-12-08 01:19:06 -08:00
2009-01-07 10:00:16 -08:00
2009-01-06 03:05:09 +00:00
2009-01-06 10:44:33 -08:00
2009-01-04 11:00:05 +01:00
2009-01-03 11:57:35 +01:00
2008-12-29 07:39:34 -05:00
2009-01-05 08:40:21 -08:00
2009-01-05 08:40:25 -08:00
2009-01-05 08:40:25 -08:00
2008-12-29 08:29:50 +01:00
2008-11-23 23:24:32 -08:00
2008-12-15 23:44:31 -08: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-12-22 18:44:05 +09:00
2008-11-20 20:29:48 -08:00
2008-12-31 18:07:42 -05:00
2008-11-20 00:49:27 -08:00
2008-12-31 18:07:42 -05:00
2009-01-07 08:47:24 -08:00
2008-12-16 15:29:15 -08:00
2008-11-26 01:59:45 +01:00
2008-12-21 09:46:45 +01:00
2008-12-01 19:14:02 +01:00
2008-11-24 20:00:40 +01:00
2009-01-02 10:19:38 -08:00
2008-12-29 08:29:51 +01:00
2009-01-06 15:59:01 -08:00
2008-12-30 16:10:19 -08:00
2008-12-08 01:14:16 -08:00
2009-01-04 01:00:53 +01:00
2009-01-04 01:00:51 +01:00
2008-11-27 23:39:48 +00:00
2008-11-20 20:32:15 -08:00
2008-11-25 15:45:46 +01:00
2009-01-06 15:58:58 -08:00
2009-01-07 14:29:17 +01:00
2009-01-06 17:21:02 +01:00
2008-12-01 19:55:25 -08:00
2008-12-12 13:48:20 -05:00
2008-12-17 15:47:48 -08:00
2008-11-16 19:32:39 -08:00
2008-12-31 18:07:42 -05:00
2008-11-15 12:26:44 -08:00
2008-12-25 11:40:29 +01:00
2009-01-03 14:11:08 +01:00
2009-01-06 17:10:53 -08:00
2009-01-03 14:10:09 +01:00
2009-01-07 11:12:32 -08:00
2008-12-16 02:06:23 -08:00
2009-01-02 11:44:09 -08:00
2009-01-05 14:53:30 +01:00
2009-01-02 10:19:40 -08:00
2009-01-05 08:40:30 -08:00
2008-12-23 15:21:56 -05:00
2009-01-05 08:40:30 -08:00
2009-01-07 10:00:22 -08:00
2008-12-31 15:11:46 +01:00
2009-01-06 17:02:07 -08:00
2008-11-14 10:39:24 +11:00
2008-11-14 10:39:14 +11:00
2009-01-06 10:44:30 -08:00
2009-01-06 15:59:21 -08:00
2009-01-03 14:11:07 +01:00
2008-12-31 16:55:47 +02:00
2008-12-30 09:26:11 +10:30
2008-12-28 22:43:21 -05:00
2008-11-24 11:43:21 -05:00
2008-11-27 12:37:54 +01:00
2008-11-16 19:37:55 -08:00
2008-12-30 16:20:19 -08:00
2008-12-29 04:59:31 -08:00
2008-11-28 16:47:41 +01:00
2008-11-16 18:59:45 -08:00
2009-01-06 15:59:00 -08:00
2009-01-06 15:59:00 -08:00
2009-01-06 15:59:00 -08:00
2008-12-16 02:00:48 -08:00
2008-11-26 12:03:54 +01:00
2008-12-29 08:29:50 +01:00
2009-01-06 15:58:58 -08:00
2009-01-06 15:59:20 -08:00
2009-01-05 08:40:13 +10:30
2008-12-10 16:30:15 -08:00
2008-11-06 15:41:21 -08:00
2008-12-08 14:31:59 +01:00
2008-12-31 18:07:38 -05:00
2009-01-06 11:28:07 +01:00
2008-11-19 18:49:57 -08:00
2009-01-04 16:13:40 -08:00
2008-11-20 04:08:29 -08:00
2008-12-15 23:38:52 -08:00
2009-01-07 17:38:31 -05:00
2008-12-23 15:21:45 -05:00
2008-12-23 15:21:56 -05:00
2008-12-23 15:21:37 -05:00
2008-12-23 15:21:56 -05:00
2008-12-19 15:22:54 -05:00
2009-01-06 15:59:00 -08:00
2008-11-24 18:57:41 -05:00
2008-12-21 14:21:14 +11:00
2008-12-04 09:16:45 -08:00
2008-11-19 16:05:00 +11:00
2008-12-10 14:20:03 +01:00
2009-01-07 09:59:50 -08:00
2008-11-30 10:03:35 -08:00
2009-01-06 15:59:07 -08:00
2009-01-04 13:33:20 -08:00
2009-01-06 15:59:00 -08:00
2009-01-07 11:13:11 -08:00
2009-01-06 17:21:01 +01:00
2009-01-07 11:13:22 -08:00
2009-01-07 11:13:11 -08:00
2009-01-07 11:13:25 -08:00
2009-01-06 17:10:04 -08: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
2009-01-06 10:44:29 -08:00
2009-01-06 10:44:30 -08:00
2009-01-06 15:59:12 -08:00
2008-12-12 17:00:07 +01:00
2009-01-04 12:17:39 +01:00
2008-12-20 09:15:46 +01:00
2009-01-07 21:44:20 +01:00
2009-01-07 21:44:20 +01:00
2009-01-05 08:40:25 -08:00
2009-01-05 08:40:25 -08:00
2009-01-05 18:31:12 -08:00
2009-01-03 12:01:23 -08:00
2008-11-12 17:17:17 -08:00
2009-01-01 10:12:26 +10:30
2008-11-16 19:37:55 -08:00
2008-11-16 19:39:21 -08:00
2009-01-05 10:18:08 +01:00
2008-12-18 21:56:04 +01:00
2008-12-12 14:45:25 -05:00
2008-12-30 17:31:25 -08:00
2009-01-06 15:59:28 -08:00
2009-01-06 15:59:07 -08:00
2009-01-04 13:33:20 -08:00
2008-11-20 20:52:10 -08:00
2009-01-06 17:10:33 -08:00
2008-11-14 10:39:18 +11:00
2009-01-07 09:58:22 +11:00
2008-12-30 09:05:19 +10:30
2009-01-02 10:19:43 -08:00
2009-01-02 10:19:43 -08:00
2009-01-02 10:19:42 -08:00
2008-11-24 11:41:38 -05:00
2008-12-15 23:42:33 -08:00
2008-12-29 11:45:47 +02:00
2008-12-30 09:05:16 +10:30
2008-12-10 15:12:45 -08:00
2008-11-24 21:27:22 -08:00
2008-11-23 11:53:50 +01:00
2009-01-05 08:40:14 +10:30
2009-01-06 21:17:57 -08:00
2009-01-06 15:59:07 -08:00
2008-12-28 09:54:52 +01:00
2009-01-05 11:54:29 -05:00
2008-11-11 09:30:23 -08:00
2008-12-30 09:05:12 +10:30
2009-01-01 10:12:25 +10:30
2008-12-31 09:53:21 +01:00
2008-11-06 08:42:48 +01:00
2008-12-12 17:01:38 +01:00
2008-12-19 09:21:55 +01:00
2008-11-16 09:01:36 +01:00
2009-01-02 10:19:36 -08:00
2009-01-02 10:19:40 -08:00
2009-01-07 11:27:12 -08:00
2009-01-06 10:44:44 -08:00
2009-01-07 10:00:11 -08:00
2009-01-07 10:00:14 -08:00
2008-11-24 18:57:41 -05:00
2008-12-12 13:00:06 +00:00
2009-01-02 17:11:52 -02:00
2008-12-30 09:26:04 +10:30
2008-12-30 09:26:10 +10:30
2008-11-16 22:41:34 -08:00
2008-12-30 09:25:58 +10:30
2008-12-30 09:26:03 +10:30
2009-01-06 15:59:05 -08:00
2009-01-07 10:00:16 -08:00
2008-11-19 14:47:04 +00:00
2008-11-06 09:05:33 +01:00
2009-01-06 15:59:09 -08:00