LU-11814 obd: Crashed while mount in parallel
Ensure obd_type init finished before obd_setup was started.
Also included a test case to reproduce the failure.
(osd_handler.c:7132:osd_device_init0()) ASSERTION( info ) failed:
(osd_handler.c:7132:osd_device_init0()) LBUG
Pid: 2457, comm: mount.lustre 3.10.0-862.9.1.el7_lustre.ddn1.x86_64
Call Trace:
[<
ffffffffc042f7cc>] libcfs_call_trace+0x8c/0xc0 [libcfs]
[<
ffffffffc042f87c>] lbug_with_loc+0x4c/0xa0 [libcfs]
[<
ffffffffc10cc6d5>] osd_device_alloc+0x615/0x770 [osd_ldiskfs]
[<
ffffffffc099ae2a>] obd_setup+0x11a/0x2b0 [obdclass]
[<
ffffffffc099cc58>] class_setup+0x2a8/0x840 [obdclass]
[<
ffffffffc09a08ed>] class_process_config+0x196d/0x2420 [obdclass]
[<
ffffffffc09a45f8>] do_lcfg+0x258/0x500 [obdclass]
[<
ffffffffc09a8e68>] lustre_start_simple+0x88/0x210 [obdclass]
[<
ffffffffc09d59b4>] server_fill_super+0xf34/0x185a [obdclass]
[<
ffffffffc09abfe8>] lustre_fill_super+0x328/0x950 [obdclass]
[<
ffffffff9781f3bf>] mount_nodev+0x4f/0xb0
[<
ffffffffc09a4008>] lustre_mount+0x38/0x60 [obdclass]
[<
ffffffff9781ff3e>] mount_fs+0x3e/0x1b0
[<
ffffffff9783d4c7>] vfs_kern_mount+0x67/0x110
[<
ffffffff9783faef>] do_mount+0x1ef/0xce0
[<
ffffffff97840923>] SyS_mount+0x83/0xd0
[<
ffffffff97d20795>] system_call_fastpath+0x1c/0x21
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: If3129df5fd11226636fb84a9275f481cefb749f7
Reviewed-on: https://review.whamcloud.com/37974
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>