fix: improve mount quota enforcement to prevent overflow (#7804)

* fix: improve mount quota enforcement to prevent overflow (fixes seaweedfs-csi-driver#218)

* test: add unit tests for quota enforcement
This commit is contained in:
Chris Lu
2025-12-17 01:14:01 -08:00
committed by GitHub
parent 99a2e79efc
commit ec3378f7a6
11 changed files with 371 additions and 44 deletions

View File

@@ -17,7 +17,7 @@ import (
/** Create a symbolic link */
func (wfs *WFS) Symlink(cancel <-chan struct{}, header *fuse.InHeader, target string, name string, out *fuse.EntryOut) (code fuse.Status) {
if wfs.IsOverQuota {
if wfs.IsOverQuotaWithUncommitted() {
return fuse.Status(syscall.ENOSPC)
}
if s := checkName(name); s != fuse.OK {