aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorFan Yong <[email protected]>2016-08-16 16:18:29 -0400
committerGreg Kroah-Hartman <[email protected]>2016-08-21 15:57:34 +0200
commita8610297ea8849fe47a9442291b38936e3d403cc (patch)
treeed90aa02fad41df8c6daf8c629eadb284eb627ed /tools/perf/scripts/python
parentf4ba0420278486a3fdddae1421ef48fdb5be9754 (diff)
staging: lustre: obdclass: bug fixes for lu_device_type handling
There was no protection when inc/dec lu_device_type::ldt_device_nr, which may caused the ldt_device_nr to be wrong and trigger assert. This patch redefine lu_device_type::ldt_device_nr as atomic type. There was no protection when add/del lu_device_type::ldt_linkage into/from the global lu_device_types list, which may caused bad address accessing. This patch uses the existing obd_types_lock to protect related operations. We do NOT need lu_types_stop() any longer. Such function scans the global lu_device_types list, and for each type item on it which has zerod lu_device_type::ldt_device_nr, call its stop() method. In fact, the lu_device_type::ldt_device_nr only will be zero when the last lu_device_fini() is called, and at that time, inside the lu_device_fini(), its stop() method will be called. So it is unnecessary to call the stop() again via lu_types_stop(). Signed-off-by: Fan Yong <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4604 Reviewed-on: http://review.whamcloud.com/8694 Reviewed-by: Jian Yu <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions