Whamcloud - gitweb
LU-8808 mdt: avoid out of order ChangeLog during restore 38/23638/6
authorBruno Faccini <bruno.faccini@intel.com>
Mon, 7 Nov 2016 23:49:42 +0000 (00:49 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 26 Mar 2017 06:49:47 +0000 (06:49 +0000)
commit17ab869d3a37607dbfb2ca8d85ac3549c539f148
tree6b73fbc13f2bf03314e2fa3720c631c50928eeb1
parent20031cfbd327039dffcd3c543d62a247f933646d
LU-8808 mdt: avoid out of order ChangeLog during restore

In hsm_cdt_request_completed(), upon restore completion, layout
lock is returned before associated ChangeLog entry has been created.
This allows for a timing window where concurrent file updater can
take control and create its own ChangeLog out of order (before
restore ChangeLog).
This can puzzle, ChangeLog readers (like RobinHood), and have them
think of a wrong file state.
This patch fixes this hole by posting restore ChangeLog before
giving back layout lock.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I958cb61aab34a6a0edc97f4d1390eed623631c21
Reviewed-on: https://review.whamcloud.com/23638
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_coordinator.c