WSL2-Linux-Kernel/drivers
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
..
accessibility
acpi Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-01-07 15:41:01 -08:00
amba
ata fastboot: Make libata initialization even more async 2009-01-07 08:47:11 -08:00
atm atm: Driver for Solos PCI ADSL2+ card. 2008-12-26 01:26:11 -08:00
auxdisplay
base topology: Fix sparc64 build. 2009-01-07 15:34:47 -08:00
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-01-07 17:23:53 -08:00
bluetooth
cdrom cdrom: reduce stack usage of mmc_ioctl_dvd_read_struct 2008-12-29 08:28:43 +01:00
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-01-07 17:23:53 -08:00
clocksource Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-02 11:44:09 -08:00
connector
cpufreq trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
cpuidle
crypto crypto: talitos - Ack done interrupt in isr instead of tasklet 2008-12-25 11:02:33 +11:00
dca
dio
dma
edac edac: driver for i5400 MCH (update) 2009-01-06 15:59:30 -08:00
eisa
firewire firewire: reorder struct fw_card for better cache efficiency 2009-01-04 23:50:38 +01:00
firmware Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2009-01-06 17:02:07 -08:00
gpio Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 2009-01-06 17:02:07 -08:00
gpu trivial: replace last usages of __FUNCTION__ in kernel 2009-01-07 15:48:54 -08:00
hid Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2009-01-07 15:37:24 -08:00
hwmon Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2009-01-07 11:59:51 -08:00
i2c Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2009-01-07 15:37:24 -08:00
ide scc_pata: make use of scc_dma_sff_read_status() 2009-01-06 17:21:02 +01:00
idle i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:39 -08:00
ieee1394 ieee1934: dv1394: interrupt enabling/disabling broken on big-endian 2009-01-04 23:50:36 +01:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
input Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2009-01-07 11:59:27 -08:00
isdn ISDN: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:39 -08:00
leds
lguest lguest: do not statically allocate root device 2009-01-06 10:44:34 -08:00
macintosh Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
mca
md md: need another print_sb for mdp_superblock_1 2009-01-09 08:31:08 +11:00
media Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-01-07 17:22:04 -08:00
memstick memstick: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:38 -08:00
message Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
mfd mfd: Fix section mismatch in da903x 2009-01-04 15:31:49 +01:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
mmc Merge branches 'fixes', 'cleanups' and 'boards' 2009-01-07 11:05:42 +01:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-01-07 17:23:53 -08:00
nubus
of
oprofile zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
parisc PCI: parisc: use generic pci_swizzle_interrupt_pin() 2009-01-07 11:12:55 -08:00
parport parport: ieee1284: use del_timer_sync() in parport_wait_event() 2009-01-06 15:59:31 -08:00
pci PCI PM: Put PM callbacks in the order of execution 2009-01-07 11:19:43 -08:00
pcmcia
pnp pnp: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:38 -08:00
power power-supply: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:38 -08:00
ps3
rapidio rapidio: remove excess kernel-doc notation 2009-01-06 15:59:28 -08:00
regulator mfd: Support configurable numbers of DCDCs and ISINKs on WM8350 2009-01-04 12:17:42 +01:00
rtc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
sbus sparc64: Fix unsigned long long warnings in drivers. 2009-01-06 13:20:38 -08:00
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-async 2009-01-07 15:35:47 -08:00
serial Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
sh
sn
spi hwmon: (lm70) Code streamlining and cleanup 2009-01-07 16:37:34 +01:00
ssb
staging Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-01-07 17:22:04 -08:00
tc
telephony
thermal thermal: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:37 -08:00
uio UIO: Pass information about ioports to userspace (V2) 2009-01-06 10:44:44 -08:00
usb USB: add siemens_mpi usb-serial "stub" driver 2009-01-07 10:00:13 -08:00
uwb trivial: Fix misspelling of "firmware" in usb.c 2009-01-06 11:28:09 +01:00
video Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-01-07 11:31:52 -08:00
virtio virtio: do not statically allocate root device 2009-01-06 10:44:34 -08:00
w1 w1: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:34 -08:00
watchdog [WATCHDOG] Add support for the WM8350 watchdog 2008-12-31 16:12:54 +00:00
xen xen: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:34 -08:00
zorro
Kconfig
Makefile USB: move isp1301_omap to drivers/usb/otg 2009-01-07 10:00:02 -08:00