As the title implies, I want to know how to watch disk free space change on Linux instead polling it periodically via statfs. When the free space is changed, a signal is emitted to allow the application having a chance to handle the change event.
On Windows, it can be done by FindFirstChangeNotification with FILE_NOTIFY_CHANGE_SIZE. When the free space is changed, the HANDLE object returend by FindFirstChangeNotification gets signaled and let application do something.
Is there any similar way to do that on Linux? Thanks.