persist readonly state to volume info (#5977)
This commit is contained in:
@@ -477,6 +477,7 @@ func (s *Store) MarkVolumeReadonly(i needle.VolumeId) error {
|
||||
}
|
||||
v.noWriteLock.Lock()
|
||||
v.noWriteOrDelete = true
|
||||
v.PersistReadOnly(true)
|
||||
v.noWriteLock.Unlock()
|
||||
return nil
|
||||
}
|
||||
@@ -488,6 +489,7 @@ func (s *Store) MarkVolumeWritable(i needle.VolumeId) error {
|
||||
}
|
||||
v.noWriteLock.Lock()
|
||||
v.noWriteOrDelete = false
|
||||
v.PersistReadOnly(false)
|
||||
v.noWriteLock.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user