LU-13542 osd: brw stats are initialized too late
Lustre crashes with the following stack trace:
[<
ffffffffc113cbac>] lprocfs_oh_tally+0x2c/0x40 [obdclass]
[<
ffffffffc169719b>] record_start_io.part.14+0x2b/0x40 [osd_zfs]
[<
ffffffffc1698322>] osd_read+0xa2/0x180 [osd_zfs]
[<
ffffffffc1167dee>] dt_record_read+0x1e/0x70 [obdclass]
[<
ffffffffc1190997>] lustre_index_restore+0x527/0x1720 [obdclass]
[<
ffffffffc16b2564>] osd_initial_OI_scrub+0xa34/0xd50 [osd_zfs]
[<
ffffffffc16b34fd>] osd_scrub_setup+0x9ed/0xb90 [osd_zfs]
[<
ffffffffc168a97b>] osd_mount+0xf4b/0x1380 [osd_zfs]
osd_procfs_init()/osd_stats_init() are called *after*
osd_initial_OI_scrub(), so osd stats are not yet initialized
when osd_read() first tries to update them.
This patch separates osd stats initialization from procfs
initialization so that osd stats should become initialized
by the time scrub starts its own initialization.
Change-Id: I15ab03e77eaab76e3dea8067b849c891e89aa9a8
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-8173
Reviewed-on: https://review.whamcloud.com/38554
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>