added fs encryption overlay

This commit is contained in:
ston1th 2022-04-06 01:08:19 +02:00
commit fd1e8118a4
28 changed files with 3994 additions and 30 deletions

View file

@ -49,6 +49,7 @@ func (p *preload) Read(data []byte) (n int, err error) {
func (f *File) Preload(ctx context.Context, unlock func()) {
log := f.log
defer f.Close()
defer unlock()
if f.offline {
log.V(2).Error(errors.New("no preload in offline mode"), "error preloading file")
@ -68,6 +69,7 @@ func (f *File) Preload(ctx context.Context, unlock func()) {
if err != nil && err != io.EOF {
log.Error(err, "error preloading file")
}
f.md.Close()
log.V(2).Info("preload finished", "skipped", p.skipped, "written", p.written)
}