add flag to enforce quota

This commit is contained in:
chrislu
2022-03-05 22:10:43 -08:00
parent f1713c96ae
commit b7c992f410
10 changed files with 42 additions and 3 deletions

View File

@@ -33,6 +33,10 @@ import (
*/
func (wfs *WFS) Write(cancel <-chan struct{}, in *fuse.WriteIn, data []byte) (written uint32, code fuse.Status) {
if wfs.IsOverQuota {
return 0, fuse.EPERM
}
fh := wfs.GetHandle(FileHandleId(in.Fh))
if fh == nil {
return 0, fuse.ENOENT