From patchwork Wed Jul 15 01:53:18 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: 11664025 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 A75FD13A4 for ; Wed, 15 Jul 2020 01:55:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EDBA20674 for ; Wed, 15 Jul 2020 01:55:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="m0DypsRE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbgGOBzY (ORCPT ); Tue, 14 Jul 2020 21:55:24 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50480 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbgGOBzY (ORCPT ); Tue, 14 Jul 2020 21:55:24 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06F1l5vP167743; Wed, 15 Jul 2020 01:55:21 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=VpiUfdsFfxj1Jd4AmCnaV5lVucHYwq94cm56aN0VceE=; b=m0DypsREh54TqnyfKVM7Fv6gqTH54fmuuayAy+3ERR140rwr3DFjVAHlXo5FGU54a6Qn oZXAQU/EqEa2gBI7AAUNoFsV3S6VqZu25+sbpSYR/VjLjucx4TTg1hykL1sm92Cvj+dg YZ05hp2d2WDmXiCZzXyTO6f27AMYopqHFoq/kTwQboo58UBv9BWsshISnjdJpT4EDbgq QramTiH/17/M7VLk24g2UMbyWXYuMHNym2zokE4ZWFNgYf3mJN1jzQrjvMueNt1e5Ak4 hWsMf/1aLheYqZJRzP/NuHyXwyjoafmNbsR3hxc7ALRPnaDXGmX4ubIHydk0zs6qo21d hg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 3275cm8mxg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Jul 2020 01:55:21 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06F1lbLA080785; Wed, 15 Jul 2020 01:53:20 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 327q0qa80j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jul 2020 01:53:20 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06F1rKOk019266; Wed, 15 Jul 2020 01:53:20 GMT Received: from localhost (/10.159.237.234) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Jul 2020 18:53:20 -0700 Subject: [PATCH 25/26] xfs: actually bump warning counts when we send warnings From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: Christoph Hellwig , linux-xfs@vger.kernel.org Date: Tue, 14 Jul 2020 18:53:18 -0700 Message-ID: <159477799812.3263162.13957383827318048593.stgit@magnolia> In-Reply-To: <159477783164.3263162.2564345443708779029.stgit@magnolia> References: <159477783164.3263162.2564345443708779029.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9682 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 phishscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150013 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9682 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 priorityscore=1501 bulkscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007150013 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 Reviewed-by: Chandan Babu R --- 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; }