The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-123.1.2.vz7.5.1 ------> commit b6eb7575242d5e266d231ed53a4f7e03e47b2a68 Author: Andrey Smetanin <asmeta...@virtuozzo.com> Date: Tue May 19 08:27:10 2015 +0400
ploop: warning on "disk full" condition People complain that it's not always obvious why an app in CT gets -ENOSPC while there remains some space on host filesystem. The patch adds time ratelimited printk about "disk full" condition. Maximal rate is 1 per hour. https://bugzilla.openvz.org/show_bug.cgi?id=3045 Signed-off-by: Maxim Patlasov <mpatla...@parallels.com> --- drivers/block/ploop/dev.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c index 9aaab4a..ab99724 100644 --- a/drivers/block/ploop/dev.c +++ b/drivers/block/ploop/dev.c @@ -3533,8 +3533,18 @@ static int ploop_bd_full(struct backing_dev_info *bdi, long long nr, int root) current->journal_info = NULL; ret = sb->s_op->statfs(F_DENTRY(file), &buf); - if (ret || buf.f_bfree * buf.f_bsize < reserved + nr) + if (ret || buf.f_bfree * buf.f_bsize < reserved + nr) { + static unsigned long full_warn_time; + + if (printk_timed_ratelimit(&full_warn_time, 60*60*HZ)) + printk(KERN_WARNING + "ploop%d: host disk is almost full " + "(%llu < %llu); CT sees -ENOSPC !\n", + plo->index, buf.f_bfree * buf.f_bsize, + reserved + nr); + rc = 1; + } fput(file); current->journal_info = jctx; _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel