[#1367] fstree: Add size hint for Delete

This allow to not to call `os.Stat` if caller already knows data size.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-09-12 12:33:12 +03:00
parent f345fe9a58
commit b33559754d
7 changed files with 92 additions and 47 deletions

View file

@ -338,7 +338,7 @@ func (t *FSTree) Delete(ctx context.Context, prm common.DeletePrm) (common.Delet
}
p := t.treePath(prm.Address)
err = t.writer.removeFile(p)
err = t.writer.removeFile(p, prm.Size)
return common.DeleteRes{}, err
}