From: Vsevolod Stakhov Date: Thu, 8 Sep 2016 12:23:49 +0000 (+0100) Subject: [Fix] Use real size instead of displayed for core limits X-Git-Tag: 1.4.0~468 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d968214c74bb120c742955b506283a6938869605;p=rspamd.git [Fix] Use real size instead of displayed for core limits --- diff --git a/src/rspamd.c b/src/rspamd.c index eb2f37ecb..f12a3b5e1 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -714,7 +714,8 @@ rspamd_check_core_cb (const gchar *path, const struct stat *st, { if (S_ISREG (st->st_mode)) { cores_cbdata.total_count ++; - cores_cbdata.total_size += st->st_size; + /* Use physical size instead of displayed one */ + cores_cbdata.total_size += st->st_blocks * 512; } return 0;