From patchwork Thu Apr 21 16:58:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Catherine Hoang X-Patchwork-Id: 12822059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80C7EC433EF for ; Thu, 21 Apr 2022 16:58:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390432AbiDURBV (ORCPT ); Thu, 21 Apr 2022 13:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232622AbiDURBT (ORCPT ); Thu, 21 Apr 2022 13:01:19 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774FD49CAF for ; Thu, 21 Apr 2022 09:58:28 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23LEWkKQ019340 for ; Thu, 21 Apr 2022 16:58:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=sQ5Uguy2wkoqFvEZo67/Onuka4ZSlVlWmFkvtBxpoI8=; b=EEQjPza/ctL/NTrqah7ATVddHkEB8jNPDVip43+LhKJtEnPe0JLLLSJYMIgCHj3tBBN2 0YbGu7yE5+PV0HKFRhnydRUkMi2AekCs9EzxXkFSdwlVkFxXboIW8afo24KD+DnUXUVD rJkSpiw9p9R9Z/+N+pULJyW3JHJYYfxTa6twa7p/1vl8uoH+HhZCWkqDLX21HCDbM44P ilIgUA3anOf9ar2J+hZe+XMKa2cIxUDY+Lbny7nPk7POQ32ueCoISgDTKhEroJuoXN4X QWwBuDtpMFtsWTSU2ccrO0O+YmxS8rQpPg9ecwbqIk88dWtSonDiLnQRNVj7cfkWGMIy CQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com with ESMTP id 3ffm7cvbbb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Apr 2022 16:58:27 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23LGqDqo018189 for ; Thu, 21 Apr 2022 16:58:26 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3ffm8c86yj-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Apr 2022 16:58:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h7PUGrsqh4T6q5AFUjWS4uYUWvdrfUY+Yv50gxjaCOQtNm0m4sN9NT0CiOVQy1PCtJihvmCsxr8PsNWLxVMyjlHr1URco2gyDGtJLWadwl7+J8gAShtkNI1pU5lSJ9Cspm9YscMieBFK9Tm6uWS5KTE+DnzHseUlZSTpuekYkdDvSqVCqrc5NBSbUODNQpbAES0WtRJxL4feCssZrcc3yODQtWvINFvTrx89jygLr8zkX2/nRAK8B+ykaDsh6NlxMMaApJh6nGiNjukaSwJe9GiWi//79Z1G5TpUR2BtJx3CkhzRmq8CtOKpBPCq2ZIfprgAXchiWdPlZgPtPJLr7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sQ5Uguy2wkoqFvEZo67/Onuka4ZSlVlWmFkvtBxpoI8=; b=Sr1vDRCYpPNFrhfU5kV+vh3fQNzTSeIc2Uf37/TU6fs8tcG4lC2brYwGpN78HXAI50kRvJVWi7HBHuJI8TWGG77nRG8hiN63vkDfj4EEa4nslOlULbxG6fBoLKAsVuUFAvGdoD3UASgQeN7YgyYou8PyjZHZBPt0Aia3AbO8oRk064R3QM+o1dqjZARDNgfrPR7z7FwI7AW1oi6DwjID5aeuKm6cIyPOTnLyB/YrX8uyWvBJH4o7a4OtsT55e0UZJcKRHWziH4u/NMFgu97U5Gg+wjktrmqcnUwkn14cbHOgvjLPKw2MvWRNIcK9aJXxHIPA3lsCMnY9+BGrIPvi1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sQ5Uguy2wkoqFvEZo67/Onuka4ZSlVlWmFkvtBxpoI8=; b=maGyBZFE+mj0aYPqwPArIpjrStthF4Gjlw75narFHSdRRanmqpCO+zhH8RSa0039mKSXiThYbo8z38cjuq6/0EvknribUGSOJ68/YHDVYFYF50YYIfpY5cmswYXEKV4CSKrXxNby7Gj2EgPcA4XUq9GMQphzlzu4gwWvtfOR110= Received: from BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) by DM6PR10MB2537.namprd10.prod.outlook.com (2603:10b6:5:b1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.26; Thu, 21 Apr 2022 16:58:24 +0000 Received: from BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::8433:507c:9751:97b0]) by BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::8433:507c:9751:97b0%3]) with mapi id 15.20.5164.025; Thu, 21 Apr 2022 16:58:24 +0000 From: Catherine Hoang To: linux-xfs@vger.kernel.org Subject: [PATCH v1 1/2] xfs: remove quota warning limit from struct xfs_quota_limits Date: Thu, 21 Apr 2022 09:58:14 -0700 Message-Id: <20220421165815.87837-2-catherine.hoang@oracle.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20220421165815.87837-1-catherine.hoang@oracle.com> References: <20220421165815.87837-1-catherine.hoang@oracle.com> X-ClientProxiedBy: SJ0PR03CA0193.namprd03.prod.outlook.com (2603:10b6:a03:2ef::18) To BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c72c3203-6f2a-40be-4fcd-08da23b82598 X-MS-TrafficTypeDiagnostic: DM6PR10MB2537:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jzIa0D7ErzVsQ12Gmmc1Heu39LVJ2nylVCNcV80wnj3jFSgDxnmHTYDxWYEWAmGP8Qc+rJr4re8v3vQ9GrUuR8uHKssk6Zc66K5rEOgCMRAHtZW7XtCtz8+WeRn/kYg4Xq87gfIoYuq8BKgyBuICYLlJ9T3RSckAeru2M/D5AyOn4zz15ad5zFTUZq6r/1GH46BGnimuxIw+DsTyaE0z6A1c8B3ZoM5ooUP0TzLKscJIKzaoN/21dHGPUB/LqoLxZGSCP1pfI3nhsNdlpRJqENJSpZDhc4EtrBFWRyjFfr7hzkruXaqGfRleTIiHWSJbAVlhRxyLXpEatE0Ge5/wW+NHR8hG8pvc79ylCEnw1hTt1ADqc+r6UvSyCDEHIxwWodNcCoIa1rn8ok1O8EmuqySioDdFsyRsrgyCcAK0HstsZvAht3qr+RxXuovgUaNvQ3DDXl0xa8I3Vkbha39E99EFO2VbjIOKLQTaNRgjBAkyxnZzBakNrz37mUvV9cHw7hhSFUzfDsOdUNnED2lUmlY2s3ySbA12uPP3IDpPajdlsU/wF+J1rv/BZ2SggUFttqMUtLOlHJZ4G5IUSpV6dZrmVt5UwvOEsUTQE724onTMqYEOdXbciWrg0w3msHAbEK2yVhvPksGZRGSdnXwMzA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5316.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(66476007)(66946007)(6512007)(316002)(38100700002)(66556008)(8676002)(6916009)(83380400001)(52116002)(508600001)(86362001)(1076003)(36756003)(6666004)(6506007)(44832011)(6486002)(186003)(8936002)(5660300002)(15650500001)(2616005)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?50qELylndZF4MYio7wIFkY7H02Ri?= =?utf-8?q?W4A1NwlZZWGYr8bWvw0jHBFZHcFTnr1J+gJ0hyg2vamH6wWO/65itI2Rf2AfvqNgc?= =?utf-8?q?Z56Lq5i11WoX/zt6kfGHGP49UkObt49UdvlucOEpwFVAVh40WFV3wTmRzdWjVnOY3?= =?utf-8?q?DeKL8gCjYBoCxIJS2eNKFhmwvPN4GausHFdfQlymBcsMhXF+ptbnw2PQJ11jGIRaS?= =?utf-8?q?fVlIYV8xslYV3gm26eyoYN8YmbZ5kixmS+GOrzuJj+YZhO6PWG7Kg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U+rLN1?= =?utf-8?q?aFRXjMVDG1t1CJVugryuCnTZ+/7LxL51r0fLUTgn5C5GuwjBGGvLflQMWNg5WpcHZ?= =?utf-8?q?Og2iEJKmkUaIKrH6WfvIdrC36ytbQ8OYOQsugmsYgTo8wIBTkGqNmozGtQdGHCw1V?= =?utf-8?q?BEudGkHgyU8Qhs0hMBX1w1LmOkt00MFOOxawzNsNioOi37K928dt5T+UKCXxMGqpM?= =?utf-8?q?PqJx9wDULZPOio8OfF7bFfux/Hfprvrqt/0qlYvEv63N6qQYjJBiXW87M37bCEQLP?= =?utf-8?q?9S/5+AewhfXv4lLuHUtssSDV8moa9iJcswGERZsfWlzg4k2eUyfyGwIJ73bm6cQu4?= =?utf-8?q?B7algU3UbDEf3OMkUrfi/rEK2j20d/kKibLdmpRdN5vk/8iA9Fx/0kgx8Y2TOSkwj?= =?utf-8?q?yhkuGOhBCT7Yk2izeiDt+ViR3+5jeR0nYUl41hMcESiae8PqnVfW+mlY2KTXg18ir?= =?utf-8?q?ywFVFYB9CUPN6nw7gmB6hBj52fMmemhoSjrFbrvC/ks9k+A8z2F2/jx83LUyW8BW5?= =?utf-8?q?7SPqYeoqG2BjEoqmG2gb4CpnB+HF35RFKyDE3oYEcQj2zN+vZANgigKXrlzFSJM//?= =?utf-8?q?WW71ZiuK8CabwbwWY?= X-MS-Exchange-AntiSpam-MessageData-1: 07Jc11nYmfVUv1aIlat6BCRiJvb0rMbv/6s= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c72c3203-6f2a-40be-4fcd-08da23b82598 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5316.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2022 16:58:23.9914 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: namlwTcnxiKN7olaBrZd/HWlYMN/HvZQgwF7YXhz+VkW7pcAX5sh5CCnDikscFL3qLj89vOYfyN1exugGxhBcERCcx4K0Eu/GPpILSY/H/o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB2537 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-04-21_03:2022-04-21,2022-04-21 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210089 X-Proofpoint-GUID: b5UmtZaXR5JmsGu1Zqzr2uVH6bwmM-LW X-Proofpoint-ORIG-GUID: b5UmtZaXR5JmsGu1Zqzr2uVH6bwmM-LW Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Warning limits in xfs quota is an unused feature that is currently documented as unimplemented, and it is unclear what the intended behavior of these limits are. Remove the ‘warn’ field from struct xfs_quota_limits and any other related code. Signed-off-by: Catherine Hoang Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_qm.c | 9 --------- fs/xfs/xfs_qm.h | 5 ----- fs/xfs/xfs_qm_syscalls.c | 17 +++-------------- fs/xfs/xfs_quotaops.c | 3 --- fs/xfs/xfs_trans_dquot.c | 3 +-- 5 files changed, 4 insertions(+), 33 deletions(-) diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index f165d1a3de1d..8fc813cb6011 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -582,9 +582,6 @@ xfs_qm_init_timelimits( defq->blk.time = XFS_QM_BTIMELIMIT; defq->ino.time = XFS_QM_ITIMELIMIT; defq->rtb.time = XFS_QM_RTBTIMELIMIT; - defq->blk.warn = XFS_QM_BWARNLIMIT; - defq->ino.warn = XFS_QM_IWARNLIMIT; - defq->rtb.warn = XFS_QM_RTBWARNLIMIT; /* * We try to get the limits from the superuser's limits fields. @@ -608,12 +605,6 @@ xfs_qm_init_timelimits( defq->ino.time = dqp->q_ino.timer; if (dqp->q_rtb.timer) defq->rtb.time = dqp->q_rtb.timer; - if (dqp->q_blk.warnings) - defq->blk.warn = dqp->q_blk.warnings; - if (dqp->q_ino.warnings) - defq->ino.warn = dqp->q_ino.warnings; - if (dqp->q_rtb.warnings) - defq->rtb.warn = dqp->q_rtb.warnings; xfs_qm_dqdestroy(dqp); } diff --git a/fs/xfs/xfs_qm.h b/fs/xfs/xfs_qm.h index 5bb12717ea28..9683f0457d19 100644 --- a/fs/xfs/xfs_qm.h +++ b/fs/xfs/xfs_qm.h @@ -34,7 +34,6 @@ struct xfs_quota_limits { xfs_qcnt_t hard; /* default hard limit */ xfs_qcnt_t soft; /* default soft limit */ time64_t time; /* limit for timers */ - xfs_qwarncnt_t warn; /* limit for warnings */ }; /* Defaults for each quota type: time limits, warn limits, usage limits */ @@ -134,10 +133,6 @@ struct xfs_dquot_acct { #define XFS_QM_RTBTIMELIMIT (7 * 24*60*60) /* 1 week */ #define XFS_QM_ITIMELIMIT (7 * 24*60*60) /* 1 week */ -#define XFS_QM_BWARNLIMIT 5 -#define XFS_QM_IWARNLIMIT 5 -#define XFS_QM_RTBWARNLIMIT 5 - extern void xfs_qm_destroy_quotainfo(struct xfs_mount *); /* quota ops */ diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c index 7d5a31827681..e7f3ac60ebd9 100644 --- a/fs/xfs/xfs_qm_syscalls.c +++ b/fs/xfs/xfs_qm_syscalls.c @@ -250,17 +250,6 @@ xfs_setqlim_limits( return true; } -static inline void -xfs_setqlim_warns( - struct xfs_dquot_res *res, - struct xfs_quota_limits *qlim, - int warns) -{ - res->warnings = warns; - if (qlim) - qlim->warn = warns; -} - static inline void xfs_setqlim_timer( struct xfs_mount *mp, @@ -355,7 +344,7 @@ xfs_qm_scall_setqlim( if (xfs_setqlim_limits(mp, res, qlim, hard, soft, "blk")) xfs_dquot_set_prealloc_limits(dqp); if (newlim->d_fieldmask & QC_SPC_WARNS) - xfs_setqlim_warns(res, qlim, newlim->d_spc_warns); + res->warnings = newlim->d_spc_warns; if (newlim->d_fieldmask & QC_SPC_TIMER) xfs_setqlim_timer(mp, res, qlim, newlim->d_spc_timer); @@ -371,7 +360,7 @@ xfs_qm_scall_setqlim( xfs_setqlim_limits(mp, res, qlim, hard, soft, "rtb"); if (newlim->d_fieldmask & QC_RT_SPC_WARNS) - xfs_setqlim_warns(res, qlim, newlim->d_rt_spc_warns); + res->warnings = newlim->d_rt_spc_warns; if (newlim->d_fieldmask & QC_RT_SPC_TIMER) xfs_setqlim_timer(mp, res, qlim, newlim->d_rt_spc_timer); @@ -387,7 +376,7 @@ xfs_qm_scall_setqlim( xfs_setqlim_limits(mp, res, qlim, hard, soft, "ino"); if (newlim->d_fieldmask & QC_INO_WARNS) - xfs_setqlim_warns(res, qlim, newlim->d_ino_warns); + res->warnings = newlim->d_ino_warns; if (newlim->d_fieldmask & QC_INO_TIMER) xfs_setqlim_timer(mp, res, qlim, newlim->d_ino_timer); diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c index 07989bd67728..8b80cc43a6d1 100644 --- a/fs/xfs/xfs_quotaops.c +++ b/fs/xfs/xfs_quotaops.c @@ -40,9 +40,6 @@ xfs_qm_fill_state( tstate->spc_timelimit = (u32)defq->blk.time; tstate->ino_timelimit = (u32)defq->ino.time; tstate->rt_spc_timelimit = (u32)defq->rtb.time; - tstate->spc_warnlimit = defq->blk.warn; - tstate->ino_warnlimit = defq->ino.warn; - tstate->rt_spc_warnlimit = defq->rtb.warn; if (tempqip) xfs_irele(ip); } diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index 9ba7e6b9bed3..7b8c24ede1fd 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c @@ -597,8 +597,7 @@ xfs_dqresv_check( if (softlimit && total_count > softlimit) { time64_t now = ktime_get_real_seconds(); - if ((res->timer != 0 && now > res->timer) || - (res->warnings != 0 && res->warnings >= qlim->warn)) { + if (res->timer != 0 && now > res->timer) { *fatal = true; return QUOTA_NL_ISOFTLONGWARN; } From patchwork Thu Apr 21 16:58:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catherine Hoang X-Patchwork-Id: 12822057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD78BC433F5 for ; Thu, 21 Apr 2022 16:58:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232178AbiDURBT (ORCPT ); Thu, 21 Apr 2022 13:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348340AbiDURBR (ORCPT ); Thu, 21 Apr 2022 13:01:17 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78E0A3F89E for ; Thu, 21 Apr 2022 09:58:27 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23LFSRQ1020622 for ; Thu, 21 Apr 2022 16:58:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2021-07-09; bh=yFlV+mspXR1UWs2jMXsxGn4UBYuzqvBsyjLgl5xqH2I=; b=wj/FHkWUboduoVXVT9LkuHOxoHVc+UEz9UVFE03A7VIY/hd94il+uo5c2+Lmxc89kD05 6sOMYZMDh33dJ8XDOufKOvmXYpfT5X0XWYDTI5V690+p3dLfYXCY93bZL/Ud2PjQCCv0 vv0MP17S3gt+mNa08IU9XaB0ed19JR8w364Fy/bmb7M3eRrJe3WOL3yfHc1Ypt2t9PRy TGPqKBdtTloyq/PWSYMoSOCqx/eJHjwTg4hCoh0kMM8lmu4nG+XrFpvKkjDmnphfRJgg AMRSEFriwNPgPzmJits3tdWXduM/ZKTf0paIfFbkpRR+5JtCSB2G5zdNEty+dG/0trBP Sw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com with ESMTP id 3ffmd1cqb0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Apr 2022 16:58:27 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23LGqDqp018189 for ; Thu, 21 Apr 2022 16:58:26 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3ffm8c86yj-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Apr 2022 16:58:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pz7leUV5zgMX7Bngifkxf+bTjZDK6jb3BAP5FD2P/Y2qDPWHByFNkxxTUL/gKmYQDBt/8W28vCaDz2dwCGRc8HR4cdyEP2SyBNI0OgoOFdDpzCMYhacf+bYfTYX2eX8qHGJL/ijZQ2NGTKv+mB14rrmxmcP2qYkQtCF4SbovVmCF/QTknOwPMzSECyKcVVk20NE31TQ9F1t2hzIdeUJVrRt9fMiQM7RMkEiOTEJLFjtPzIlzgNj2FHzWa+VGmMDWZmau2uZqapWs2crFJw7Xo8VSTfPFD0pK/aPSA6KBl4/SBQGla9XQkZfILaxg6vhJxWviNx8NsT/sKbmLB8zowg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yFlV+mspXR1UWs2jMXsxGn4UBYuzqvBsyjLgl5xqH2I=; b=HdkGgbvTdbCiPVNebYCizhkdIpYkFMMB9LR67j0DwjEHfoNWwxRmYUvAso4jpuPULp5r/yPL0LpA115KJHv7APjgh0uJjIo1JvEzxdmgh6e42TG637b1OzLT9hm4YaznSMQjUkdXNzlerUvk89/WYha9bxndIzRn1Qps8d9ERqA96He5k+UsfIA+Gku7A5pFspmVbbG1sFus59rq1WHGewW1L9ov/staL1pjqBHCY4g3cFJwsJJH1aYBOxycac46E15tbiJKt0zwmAxERY1qIdc2qAMct6JoUAfE1QeKu0bA4rhli9Ptvm0TNqg4wc3PSDnYLz7gA5Z9KASUF+Oxtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yFlV+mspXR1UWs2jMXsxGn4UBYuzqvBsyjLgl5xqH2I=; b=HX/2YZprVRWB+cv1SSpZCDaMKn1a62zpzHi6Tl5Emkrt0KqpBoLEq+AGpdFwCaRZfv2RPGZcpSpWNnwB9y6jhzbG56PRMIFYbY7UIIkyMn+NJO9hDg5DDbJ+49qaNioCpm1rLbKQEe7cWgXWxESgfQrvEEYCLNZ+OQIYGegA20Y= Received: from BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) by DM6PR10MB2537.namprd10.prod.outlook.com (2603:10b6:5:b1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.26; Thu, 21 Apr 2022 16:58:24 +0000 Received: from BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::8433:507c:9751:97b0]) by BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::8433:507c:9751:97b0%3]) with mapi id 15.20.5164.025; Thu, 21 Apr 2022 16:58:24 +0000 From: Catherine Hoang To: linux-xfs@vger.kernel.org Subject: [RFC PATCH v1 2/2] xfs: don't set warns on the id==0 dquot Date: Thu, 21 Apr 2022 09:58:15 -0700 Message-Id: <20220421165815.87837-3-catherine.hoang@oracle.com> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20220421165815.87837-1-catherine.hoang@oracle.com> References: <20220421165815.87837-1-catherine.hoang@oracle.com> X-ClientProxiedBy: SJ0PR03CA0193.namprd03.prod.outlook.com (2603:10b6:a03:2ef::18) To BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f0cb9e2-a10a-43eb-52db-08da23b825f0 X-MS-TrafficTypeDiagnostic: DM6PR10MB2537:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 96cYCDRjDwtk3b+WUEQ1zX9YvSZgXgWK3zNH8UmzvhRI4a28DKb8dqVCGJ2IvUJDb/dkwIlIPqzMM9MVCbPgL0jgyYGXwVEBWz3/JlmxDLZoh0wOG2R95KojaS27bMjCb9q2NxijWUKVZ28zSdE4/DNyah9s6SAYQ0WaMCNE2Ockql4vm+0ZOhgD/U9ZSUXgB+nRRARyjHL8HXlQaM5Lc9YP1fVkixswfT9BgaA0pPhgCtUUCBPIHM4Do2Ye8P1Inl2eOB2gnGQ9JfxV1JfLBOd/FXW4crMfm8jyDhkd4+N7oF7InfwgoUwLPVPuMH406YKKzPoIi2NTrAp9ssdlB7HT2TbMnXvSQgA5gs0W3aTZX14A7vCQPwl0i25LF/0u7JeVmVpqOZX7aS/1YrsPXhPVtByGlVcCWn0Sh1vWL3reFxh+I7RX4a9uejF1Q4gXeTHLs13ay6QiMyUcmIu6AFaKnhc3w3XWrteZh01yLGU1MRBa3SsklhrrAzRqTOn7KNyycbhkPLqMIeDoLBQmwfWJgzY+ONfecxblIxsnVMxiPHNqiSHeEVIkyttbZiCZyjh9zwAgTHoW+qMYnrSO17VddDEKs30s/pVa0rFqr2CvEVWriMq9qKzadowNEj+WNcJ9MpFY35mcb/RYJ3ATCg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5316.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(66476007)(66946007)(6512007)(316002)(4744005)(38100700002)(66556008)(8676002)(6916009)(83380400001)(52116002)(508600001)(86362001)(1076003)(36756003)(6666004)(6506007)(44832011)(6486002)(186003)(8936002)(5660300002)(2616005)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: CexMbAe8RtukNturvLNlZCuucPaQvYD6K6hGQdBd9LaMTbTDntpO37fQsKk9otDkCKKuetrczbkHDwz7WWHC148o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A2RpKIMbcMRUGeJPEsD/iqFfsqkQ72D79ZRR7AKk08h/snf4E+gwU+3oeeRDBGnmDj3XPqYpXgoj/Vra61Q/9QFefruuFr7rEPCIb8m9nCS17kGavxUNmNusVn3E1mKcPTZ02yHYdP4Yah9b68y8CWQCDyXLxWsBzbdQPHs/am3TOOTk18JgzNZVymRnY8IzNxMyQmFJbxTgYYftoL2CPvRKssnBufndgVlJ70iErOgQptK/Ez6OW8lQCZEIMoBpKZUZDBBNbXZpgznrFp5t045Lmc4vHwHhzjTDTNpIWoDl42n/HlEGgq63BibFV1jVClgZR87Kv6qD2MuFq7qqOsAIyfsUXIHwd+FXPqR4/L+NC8WT7i7KflMvdHU0F3O2L2s1ND9BLaEfp2SIoZq8QKMEkqi/3SPGRdh3Pf9n5iRrvE4SElpDTIWDAs3zBpwcUjcykbQH+lNp47e67B8pKv/jhKbCuEZJ2lqflYhpZwLtFewmKJ6y1J6Trjt8XbTHZu7wr0nf6+NaZRp18+Wilf74NJIvw4evjX9akPfPnwyWZl0m/mwu9yr+pjlaH4cj1ENAt68RoHoTjExS/yK2xCzVkmgbGpa2ogU9iuKZFl0OdNfZLfv69SS4iX X-MS-Exchange-AntiSpam-MessageData-1: UXSjgio5vKtm33xwdwy3fr0NjNikXQcZSeo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f0cb9e2-a10a-43eb-52db-08da23b825f0 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5316.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2022 16:58:24.5995 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0cLF8lxnDkRxrZr6QV91WEJ8vKzD+BB3iaXDJCw7O50vp+RVLcgnfz8z8E0LCIqhVdhPn/ji9dz8mUdqC9jVnnhqF3NcByezlLrL6ZaJeAk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB2537 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-04-21_03:2022-04-21,2022-04-21 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 malwarescore=0 mlxlogscore=825 suspectscore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204210089 X-Proofpoint-ORIG-GUID: ieJpdCT8P-EyTuQM2Z9sTWlcRCPbRtRM X-Proofpoint-GUID: ieJpdCT8P-EyTuQM2Z9sTWlcRCPbRtRM Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Quotas are not enforced on the id==0 dquot, so the quota code uses it to store warning limits and timeouts. Having just dropped support for warning limits, this field no longer has any meaning. Return -EINVAL for this dquot id if the fieldmask has any of the QC_*_WARNS set. Signed-off-by: Catherine Hoang Reviewed-by: Darrick J. Wong Reported-by: kernel test robot --- fs/xfs/xfs_qm_syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c index e7f3ac60ebd9..bdbd5c83b08e 100644 --- a/fs/xfs/xfs_qm_syscalls.c +++ b/fs/xfs/xfs_qm_syscalls.c @@ -290,6 +290,8 @@ xfs_qm_scall_setqlim( return -EINVAL; if ((newlim->d_fieldmask & XFS_QC_MASK) == 0) return 0; + if ((newlim->d_fieldmask & QC_WARNS_MASK) && id == 0) + return -EINVAL; /* * Get the dquot (locked) before we start, as we need to do a