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

@@ -35,6 +35,10 @@ func (wfs *WFS) GetAttr(cancel <-chan struct{}, input *fuse.GetAttrIn, out *fuse
func (wfs *WFS) SetAttr(cancel <-chan struct{}, input *fuse.SetAttrIn, out *fuse.AttrOut) (code fuse.Status) {
if wfs.IsOverQuota {
return fuse.EPERM
}
path, fh, entry, status := wfs.maybeReadEntry(input.NodeId)
if status != fuse.OK {
return status