-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix prefs maybe replaced with the default value when read and truncat…
…e at the same time Open prefs.bin via 'wb' will truncate file without lock protection. So read prefs.bin and truncate prefs.bin at the same time, the preferences maybe replaced with the default value. Add a prefs.lock file to guarantee the atomicity of save and load operation. The patch can not solve phantom read when targetcli command concurrency. That is, if change preference at same time as execute another targetcli command, next ConfigShell will load old prefs.bin file before previous ConfigShell save it. To fix this problem, targetcli-fb:scripts\targetcli must be modified. Signed-off-by: Zou Mingzhe <[email protected]>
- Loading branch information
1 parent
d066627
commit c7253b1
Showing
2 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters