From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:34801 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932531AbcGOKhO (ORCPT ); Fri, 15 Jul 2016 06:37:14 -0400 From: Topi Miettinen To: linux-kernel@vger.kernel.org Cc: Topi Miettinen , Alexander Viro , linux-fsdevel@vger.kernel.org (open list:FILESYSTEMS (VFS and infrastructure)) Subject: [PATCH 03/14] resource limits: track highwater mark of file sizes Date: Fri, 15 Jul 2016 13:35:50 +0300 Message-Id: <1468578983-28229-4-git-send-email-toiwoton@gmail.com> In-Reply-To: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> References: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Track maximum size of files created, to be able to configure RLIMIT_FSIZE resource limits. The information is available with taskstats and cgroupstats netlink socket. Signed-off-by: Topi Miettinen --- fs/attr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/attr.c b/fs/attr.c index 25b24d0..546f4f9 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -116,6 +116,8 @@ int inode_newsize_ok(const struct inode *inode, loff_t offset) return -ETXTBSY; } + update_resource_highwatermark(RLIMIT_FSIZE, offset); + return 0; out_sig: send_sig(SIGXFSZ, current, 0); -- 2.8.1