Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 426 Bytes
%{
#include <linux/statfs.h>
#include <linux/math64.h>
%}
function change_statfs:long (stat:long, modify:long)
%{
if(THIS->modify > 0) {
struct kstatfs* buf = (struct kstatfs*)(long)THIS->stat;
buf->f_bfree = buf->f_bavail = div_s64(buf->f_bavail*THIS->modify, 100);
}
%}
probe module("ext4").function("ext4_statfs").return
{
change_statfs($buf, $1)
}
Something went wrong with that request. Please try again.