mirror of
https://github.com/rustfs/rustfs.git
synced 2026-10-04 12:31:36 +00:00
f5956999a7
dav-server queries get_quota once per PROPFIND without a path, so the driver now reports a single session-scoped (used, total) pair: - when every bucket visible to the session has a hard quota: the summed cached bucket usage against the summed quota limits (a bucket whose usage cache has no scanner snapshot yet counts as zero); - otherwise: the cluster's usable capacity, the same erasure-aware used/total the console dashboard shows, cached for 30s since WebDAV clients poll quota and storage-info fans out to every disk; - when neither source is available the properties are omitted from the response, which is the previous behavior. All inputs are cache or snapshot reads; reporting never triggers a scanner cycle or a live listing. Backend failures surface as FsError::GeneralFailure instead of a bogus zero capacity. Adds a session_capacity_view hook to the protocols StorageBackend trait (default: no capacity support, keeping quota properties omitted), its rustfs-side implementation, aggregation unit tests, and an e2e test covering both reporting modes.