|
The latest patch from LU-11276 fixes this issue. In short, the problem was in HSM code which takes server EX LAYOUT lock for restore time. During that time client can try to get file attributes which in turn will cause ll_glimpse_size0() to issue new CR LAYOUT lock to the server and be blocked by restore process. There is workaround for this issue to prevent client from glimpsing the file being restored. It is done by returning MS_RESTORE state from server in MD attributes. The problem wasn't seen until lock convert because EX LAYOUT lock cancels client lock with all bits and usually LAYOUT bit was always combined with UPDATE bit, so client gets new attributes from server and updates restore state as needed. Lock convert keep UPDATE bit set and client uses local copy of attributes always and don't see MS_RESTORE state update. Strictly speaking this is HSM bug, because we can't always guarantee that LAYOUT is combined with UPDATE always, so problem may exists without lock convert as well.
Proposed solution is to take EX LAYOUT+UPDATE lock bits when restoring starts, so client states will be reset and client will need to ask attributes from server again to update restore state as expected. Note that UPDATE bit should be dropped right after EX lock is taken on server and only LAYOUT bit stay until restore will finish.
|