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) Create(cancel <-chan struct{}, in *fuse.CreateIn, name string, o
*/
func (wfs *WFS) Mknod(cancel <-chan struct{}, in *fuse.MknodIn, name string, out *fuse.EntryOut) (code fuse.Status) {
if wfs.IsOverQuota {
return fuse.EPERM
}
if s := checkName(name); s != fuse.OK {
return s
}