forked from TrueCloudLab/frostfs-node
[#2068] writecache: Allow to open FSTree in read-only mode
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
857d2dc3f5
commit
4a49ea0855
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ func (c *cache) openStore(readOnly bool) error {
|
||||||
fstree.WithDepth(1),
|
fstree.WithDepth(1),
|
||||||
fstree.WithDirNameLen(1),
|
fstree.WithDirNameLen(1),
|
||||||
fstree.WithNoSync(c.noSync))
|
fstree.WithNoSync(c.noSync))
|
||||||
|
if err := c.fsTree.Open(readOnly); err != nil {
|
||||||
|
return fmt.Errorf("could not open FSTree: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
// Write-cache can be opened multiple times during `SetMode`.
|
// Write-cache can be opened multiple times during `SetMode`.
|
||||||
// flushed map must not be re-created in this case.
|
// flushed map must not be re-created in this case.
|
||||||
|
|
Loading…
Reference in a new issue