From patchwork Tue Jul 14 01:34:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11661279 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34B9A6C1 for ; Tue, 14 Jul 2020 01:34:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C0CC21924 for ; Tue, 14 Jul 2020 01:34:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="IX9JYpvb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbgGNBeL (ORCPT ); Mon, 13 Jul 2020 21:34:11 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:59060 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbgGNBeL (ORCPT ); Mon, 13 Jul 2020 21:34:11 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06E1WtFR127979 for ; Tue, 14 Jul 2020 01:34:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=QHNNCmx+sTuO7XP1OfM9r9B6azwH/vb5kJA3ChQtXTs=; b=IX9JYpvbmOMB0AvEZFUcbHciVkE343L8kuJAQGxToCrr2Pr9TQcGSy+hOys8920YBywg IecMw4IpGy9UOaCxSeO7b7nGuVU1kKxAq04osPi3R6CrY3Aw4v0M9+YXetpSa1GA6Wze 6FdwA/eUmugOeptsY/7EusoWn2ENLESY1WRFmevaa6Kx6eUAy/t7JVjq0b2dtZPimDNC OA8KNUdUVhTEfVBH90GxlYcwsaUC7e3+2hA+pww3jz7it0GeNZEK/O9ABpf2Fj+Y2Bi1 y6/xQkXLlZMIsNCBhrOTACiwZKyY+bf9owrIchlKn/y/Mrm3WoXIvROa99bPGZ/M0pCy BQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 32762naa2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 14 Jul 2020 01:34:10 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06E1Xcpg114518 for ; Tue, 14 Jul 2020 01:34:09 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 327q6r5bds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 14 Jul 2020 01:34:09 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06E1Y9T8012323 for ; Tue, 14 Jul 2020 01:34:09 GMT Received: from localhost (/10.159.128.100) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 13 Jul 2020 18:34:08 -0700 Subject: [PATCH 25/26] xfs: actually bump warning counts when we send warnings From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Mon, 13 Jul 2020 18:34:08 -0700 Message-ID: <159469044854.2914673.13633798084244575953.stgit@magnolia> In-Reply-To: <159469028734.2914673.17856142063205791176.stgit@magnolia> References: <159469028734.2914673.17856142063205791176.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9681 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=1 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007140009 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9681 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 spamscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 bulkscore=0 suspectscore=1 phishscore=0 adultscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007140009 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Currently, xfs quotas have the ability to send netlink warnings when a user exceeds the limits. They also have all the support code necessary to convert softlimit warnings into failures if the number of warnings exceeds a limit set by the administrator. Unfortunately, we never actually increase the warning counter, so this never actually happens. Make it so we actually do something useful with the warning counts. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_trans_dquot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index 78201ff3696b..cbd92d8b693d 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c @@ -596,6 +596,7 @@ xfs_dqresv_check( return QUOTA_NL_ISOFTLONGWARN; } + res->warnings++; return QUOTA_NL_ISOFTWARN; }