v.22.12Improvement
filesystemAvailable now supports optional disk name argument; filesystemFree renamed to filesystemUnreserved
filesystemAvailableand related functions support one optional argument with disk name, and changefilesystemFreetofilesystemUnreserved. Closes #35076. #42064 (flynn).
Why it matters
This feature improves clarity and flexibility in disk space querying functions by allowing users to target specific disks using an optional disk name parameter. RenamingfilesystemFree to filesystemUnreserved better reflects the semantics of the function, helping users avoid confusion about what disk space metrics are being reported.How to use it
Users can callfilesystemAvailable(disk_name) and related functions by optionally passing the disk name as a string argument to query space metrics of a specific disk. Additionally, when checking free space, they should use the filesystemUnreserved function instead of the deprecated filesystemFree.