Whamcloud - gitweb
LU-12566 mdc: hold lock while walking changelog dev list 68/35668/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 1 Aug 2019 20:55:58 +0000 (14:55 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Aug 2019 07:52:00 +0000 (07:52 +0000)
commita260c530801db7f58efa93b774f06b0ce72649a3
tree74de72b918415e9e809951cd4222b777ca5239ae
parent2cf82b6f666cb2ed4484e8675bea1f2df43fc56e
LU-12566 mdc: hold lock while walking changelog dev list

In mdc_changelog_cdev_finish() we need chlg_registered_dev_lock
while walking and changing entries on the chlog_registered_devs
and ced_obds lists in chlg_registered_dev_find_by_obd().

Move the calling of chlg_registered_dev_find_by_obd() under the
mutex, and add assertions to the places where the lists are walked
and changed that the mutex is held.

Fixes: 1d40214d96dd ("LU-7659 mdc: expose changelog through char devices")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib62fdff87cde6a4bcfb9bea24a2ea72a933ebbe5
Reviewed-on: https://review.whamcloud.com/35668
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdc/mdc_changelog.c