From patchwork Wed Sep 23 06:59:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794127 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 85D72618 for ; Wed, 23 Sep 2020 06:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C76F221F0 for ; Wed, 23 Sep 2020 06:59:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sm7+e6yy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgIWG71 (ORCPT ); Wed, 23 Sep 2020 02:59:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgIWG71 (ORCPT ); Wed, 23 Sep 2020 02:59:27 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9410EC061755 for ; Tue, 22 Sep 2020 23:59:27 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id bb1so612146plb.2 for ; Tue, 22 Sep 2020 23:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3M8M1GZG79EClznVjdpZihDccBwlRdgGQ8JMk2EzCPY=; b=sm7+e6yy4voPNSMZ6h8N8InAd9aZJWbIwvyktZd77sPfuq3SOKcStQqoW9KSyGVQKw Y4dyoQoRTR0K/OXjJg74YlKsbyL/Pdh7GKvgD19wQXcjRTOLRxdm5bDKWfLzteoFYhjS 1VNEUIm7Gm53lm4vfG3QuU4TzKSTF1E5t3dv4CQVmuSikNfHvJCB42P+OhFHvQSP2DOK 5kp661IeyNnhDaIm9CB04VHwDEIl43a3DvVlyJoEMizr4EboitoZxAeVTqIxmRSvX+os mQ1uOlzyn1JURsF0gZ5AqI7ysdlxi6TGyyBvBZHL+tFK0RvO3xnLTaxhg/w0uf8fGRzf Wrzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3M8M1GZG79EClznVjdpZihDccBwlRdgGQ8JMk2EzCPY=; b=Fhdfh2nduDV8pDFkMTVOzb/kaO856QdhUX5P7oVSuY5G8hZAZPIqIofHlle5vYEwVo R0D5VUJXSxpXypcL75/KdSg7JpJNLfXC62eiedYlDM8Bdddmp6XnYxF84L3q65xERi4A Z0DYW9HHpai7IIVJ48St9z6Pbwa7wfhzjdaHlU9PxLK+izD+15H1lQqTHTtqB0VmBn71 MMynx0mMYbuRDNfjs3+jmR88i0pYzWg3D1BhRCI9B9k7GtKdL6OmBZCLvEw7cIjkQ2Ab 8OzWccxGeoG2dlS2oxfGG0OfS36NLly4dwHV0mJGRKALyRQvye8uVkPrZ021/ZE2+F7W N+sQ== X-Gm-Message-State: AOAM531tMf896ncYvEKGwa3dW+nAnN8kWRlHCfyNa+YZiWE6AWGMggQ/ mBY9lCJeq54MnkBwbfm1dJwwftBmFf6c X-Google-Smtp-Source: ABdhPJzbfyN7OocU9gnQnkB6N0yTFjKpj8C3lPi5gYSxRUDg+yPPtl9B6JJwg9IKcQiCFUiYlhyCfQ== X-Received: by 2002:a17:902:6b05:b029:d0:a100:8365 with SMTP id o5-20020a1709026b05b02900d0a1008365mr8282863plk.11.1600844366857; Tue, 22 Sep 2020 23:59:26 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:26 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 1/7] xfs: remove the unused SYNCHRONIZE macro Date: Wed, 23 Sep 2020 14:59:12 +0800 Message-Id: <1600844358-16601-2-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia There are no callers of the SYNCHRONIZE() macro, so remove it. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_linux.h | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index ab737fed7b12..ad1009778d33 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h @@ -123,7 +123,6 @@ typedef __u32 xfs_nlink_t; #define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ #define EFSBADCRC EBADMSG /* Bad CRC detected */ -#define SYNCHRONIZE() barrier() #define __return_address __builtin_return_address(0) /* From patchwork Wed Sep 23 06:59:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794129 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 944AB618 for ; Wed, 23 Sep 2020 06:59:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 782632223E for ; Wed, 23 Sep 2020 06:59:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Iyp5F3mM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgIWG73 (ORCPT ); Wed, 23 Sep 2020 02:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgIWG72 (ORCPT ); Wed, 23 Sep 2020 02:59:28 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6166C061755 for ; Tue, 22 Sep 2020 23:59:28 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id mm21so2726480pjb.4 for ; Tue, 22 Sep 2020 23:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1xjEftt6BoWBnurJ2cfbr79NM6CiAL0+326aCaRrEN4=; b=Iyp5F3mMk7ubIR46GZQLkSIgXd039J4ehciH0rA4agt/xIDuxAxWaziwDycaeES3g3 UriqJYMG1pwioN2BW1/RbXBWhy3WBuklhmDXTs38mYte9vafZ5RaJABHTldJYQ0WWnrL SGGLBRmAHRS7obYW0iB8R6FvIEUpHVy2weTOr/6rTR+CS2BxJJRmnH/o5ukf1fWmWhxh sYpCcIPyyZoR7lmRAHcWMdtvLSpuKv8iwiU0s/kwtA/cy0cNZzFrr6wxsXrcvnYFbFGA UU2qfvenm51N0osK9B8lEW3eK21/0DjoShFWaV4rl3K0I6QZU2oSwDpvhr9S0sJKzKJA CyQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1xjEftt6BoWBnurJ2cfbr79NM6CiAL0+326aCaRrEN4=; b=iZCXo0pa7osy/KXQ9Sqycs1ASmYSUmhKl5DlW0NVCo5/p/YZzYB5KIRbFqX8lRv+CD ih5U1JEAoiuZ6jG1j3OEc88729xmscHPb3HhtMAkpQJX2cDgXXMy7BAJh+VmpIGbM/I+ TOr0e/qOWi1nLEHLCGgv7hwn0jVaHg7SBUaGlLdnSLZSPbNgZeAcqtDYeClnjVDyV9NH 8RPnsex8ra8a7HogoPMmiEdF8o70Vr8lzOR4MEmTvrUMJRn8Y0qzxSP4+EF2/nCpairG uiX7k4vXR9orl9TzPjatPM4f70lAWEgxrjqGb6s+Bx5lBHF1HhhKm2n51jK7Mb/YDLax 7GwQ== X-Gm-Message-State: AOAM531haXBsYE+szMgrnF2cfgHylhrWbjBrSQmVaLZEEcsOn2WfJKiL XGR5PI4AZnxHLsfdI2oFLyPnciRztD/k X-Google-Smtp-Source: ABdhPJz0hpumdCPwRzgtFoTKiu8LxFb2OBeXmU30ZS2tRqr+a7IukrXVxkIbNoyOlb6W5mDLwyYMlA== X-Received: by 2002:a17:902:8d86:b029:d1:9237:6dfd with SMTP id v6-20020a1709028d86b02900d192376dfdmr8216785plo.22.1600844368126; Tue, 22 Sep 2020 23:59:28 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:27 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 2/7] xfs: use the existing type definition for di_projid Date: Wed, 23 Sep 2020 14:59:13 +0800 Message-Id: <1600844358-16601-3-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia We have already defined the project ID type prid_t, so maybe should use it here. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/libxfs/xfs_inode_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/libxfs/xfs_inode_buf.h b/fs/xfs/libxfs/xfs_inode_buf.h index 536666143fe7..ef5eaf33d146 100644 --- a/fs/xfs/libxfs/xfs_inode_buf.h +++ b/fs/xfs/libxfs/xfs_inode_buf.h @@ -17,7 +17,7 @@ struct xfs_dinode; */ struct xfs_icdinode { uint16_t di_flushiter; /* incremented on flush */ - uint32_t di_projid; /* owner's project id */ + prid_t di_projid; /* owner's project id */ xfs_fsize_t di_size; /* number of bytes in file */ xfs_rfsblock_t di_nblocks; /* # of direct & btree blocks used */ xfs_extlen_t di_extsize; /* basic/minimum extent size for file */ From patchwork Wed Sep 23 06:59:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794133 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 564CD112C for ; Wed, 23 Sep 2020 06:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 393232223E for ; Wed, 23 Sep 2020 06:59:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W33noDxb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726179AbgIWG7b (ORCPT ); Wed, 23 Sep 2020 02:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgIWG7b (ORCPT ); Wed, 23 Sep 2020 02:59:31 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E789C061755 for ; Tue, 22 Sep 2020 23:59:31 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id l126so14464019pfd.5 for ; Tue, 22 Sep 2020 23:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=z9Z6ZLCA0t50O/FUHRry5+oFSnlJ3mf6I4oqL/odMzs=; b=W33noDxb6HybnUoiuk9h+OFmpKAkYnYKAFb5+XY/eD4WvH2GNja5Ib0GLsnwhgqq1M pjmr6FN9Wpv1/VZhi4OLuf++7fzjfnjErcDw3YPuxBx3GJmgjusywWefk8zIDqSydqiZ 1QY9V3K0j+/uRW+XwIfHid7SzS6XreWLCcmqYfdwkPAfhByQHHRxK90PnCX6ffYq23GH TVceynkr9sCcnfaKGjP3l66HZWtSGoPhLhVutCH3cxMZzcE2tf89QprLs/FfPm1YLfs1 ynABT7zl4qaaxBJArUHcEdBdfn/kYuJ4DsAyyAms6E450hM2w2uZJzhZqu4m/Z7vm2LZ Te/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=z9Z6ZLCA0t50O/FUHRry5+oFSnlJ3mf6I4oqL/odMzs=; b=YXSbo0abwvBOmpJo+ZXccaELEsSeCY21s/5bmfxqV4+HVB7NnS62Kp1EbZ75z5M6/U gZaCwlsJeZ8+OVkUT3W9OPCY2lduWJJkz5mb849/TE01PIYdKWIoQCP17Ebi7mB1zXHr bbY/+51nBMYqgQnj/mFjnVcnqFXnMbq7bUrPf521cyBjiKCTgjwGvdLTZJb8oidHjW5v hBnISqmH2wypauoHN6Wcc4/f5xWZEqvM7/LcvXYf0XAEB1MiuC6s8ATXk5CENZlKgHdV Yp7xuHRsSGbROtHV3CcKuemihISLFdqz/pcq9BL2DX0TWVGfwjNDB9ptnaGeAP9EkBlD KV4A== X-Gm-Message-State: AOAM533TtKz0KSYQ3/PT5eP5yorYQ4Zq/IuvS8J9SKSjFWqZJnV8JMbC UNqo4ITZM+g/sRjzeXm3OsE7ltIT80Bd X-Google-Smtp-Source: ABdhPJyXddE75jXQeD9kBOFrB/Dr3XXeNryy8cncxEUEZIpBZLHxyh7piYD5ZdJLvwiQoD5cn7OCjg== X-Received: by 2002:a63:4a0e:: with SMTP id x14mr2132659pga.222.1600844369343; Tue, 22 Sep 2020 23:59:29 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:28 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 3/7] xfs: remove the unnecessary xfs_dqid_t type cast Date: Wed, 23 Sep 2020 14:59:14 +0800 Message-Id: <1600844358-16601-4-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia Since the type prid_t and xfs_dqid_t both are uint32_t, seems the type cast is unnecessary, so remove it. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_qm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index 3f82e0c92c2d..41a459ffd1f2 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -1715,7 +1715,7 @@ xfs_qm_vop_dqalloc( if ((flags & XFS_QMOPT_PQUOTA) && XFS_IS_PQUOTA_ON(mp)) { if (ip->i_d.di_projid != prid) { xfs_iunlock(ip, lockflags); - error = xfs_qm_dqget(mp, (xfs_dqid_t)prid, + error = xfs_qm_dqget(mp, prid, XFS_DQTYPE_PROJ, true, &pq); if (error) { ASSERT(error != -ENOENT); From patchwork Wed Sep 23 06:59:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794131 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 2437692C for ; Wed, 23 Sep 2020 06:59:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0662A2223E for ; Wed, 23 Sep 2020 06:59:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="omdIszRc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgIWG7b (ORCPT ); Wed, 23 Sep 2020 02:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726179AbgIWG7b (ORCPT ); Wed, 23 Sep 2020 02:59:31 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61C03C061755 for ; Tue, 22 Sep 2020 23:59:31 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id z19so14444747pfn.8 for ; Tue, 22 Sep 2020 23:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hkwSFp3OZ06QXGPaczCp4QW2hKeAs6v4EaN1CI9ricw=; b=omdIszRcv8JW2ldTa73vP57fDq63BDbwL1cWvxg78yRN7FxFsY115ubZbGL7xgJo1K 1B54MuGDZbAM6/FxOV8WSOhAAHDK/t8PXG2PshCnStSOm/fX8jR4Oj+Gv5S51SZ0AKQg n+wXlh2nfE5C1aClRhD5v+FfNJ9KSQaVIGE/DwUSOYTMnWEZpjjCfkhpW9UptOQ/K+gn o3hMwuxxz4I5MG7GlIre8gt4bsSyvD8oi02Su+4qlt00LfpaURzb2gYCafIBAMAC1eL+ mRcbcfmgV0snex74Ex2qMOCszfz6O+yf3G7AHBPU2GyPM5AJlHBVNZ4EiJavEb0DwNjn PEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hkwSFp3OZ06QXGPaczCp4QW2hKeAs6v4EaN1CI9ricw=; b=n67mZq6zKROlQY993TX9c0nEPWeJY0C7T0pTSDaS+lOGHBckTj1BqaE+q5ZBGP1S2K 3VOOsB222DG7VngWXN9TFqDThZUeCA5VCJpr569MO+hktiWOQhLMLJTNl6SlnPrSf49R BTgMMQDVd2pGXT7oGVZgK105qez0glutInH2h2IWV5o9qeJIhdpHC0GFjroZ87fOc89Q /N+G698a8kt3UmDMqT6uTP1cskUod/Xy7NO2Q3c2DqNqLamNYH3qtCf+rYoYeibm4rpL 2YrCDQJOu+eJrnzlkT+T8Y+mbE/+hvZRDZeagA9yE6iwQ+0bM9WAvR3i8aBhZYPYKRe8 zfwg== X-Gm-Message-State: AOAM530uSX20OM7YijHvYf5XG/l23wsE90hmfPD2BvgSttlKjBewEFBL qR0YUrQQGPxM+PCI9x2g8Umhw8gyNNxc X-Google-Smtp-Source: ABdhPJxCFJg15gkMSLRIVaCeDRa5UVinHqvqxX9ZX/w+aoho6bjQGlmRpW0ECT1AKNCC1coVNNCJfw== X-Received: by 2002:a63:4d02:: with SMTP id a2mr6276836pgb.38.1600844370572; Tue, 22 Sep 2020 23:59:30 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:29 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 4/7] xfs: do the assert for all the log done items in xfs_trans_cancel Date: Wed, 23 Sep 2020 14:59:15 +0800 Message-Id: <1600844358-16601-5-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia We should do the assert for all the log intent-done items if they appear here. This patch detect intent-done items by the fact that their item ops don't have iop_unpin and iop_push methods and also move the helper xlog_item_is_intent to xfs_trans.h. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_log_recover.c | 7 ------- fs/xfs/xfs_trans.c | 2 +- fs/xfs/xfs_trans.h | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index a17d788921d6..8b437f2c0c35 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2475,13 +2475,6 @@ xlog_finish_defer_ops( return xfs_trans_commit(tp); } -/* Is this log item a deferred action intent? */ -static inline bool xlog_item_is_intent(struct xfs_log_item *lip) -{ - return lip->li_ops->iop_recover != NULL && - lip->li_ops->iop_match != NULL; -} - /* * When this is called, all of the log intent items which did not have * corresponding log done items should be in the AIL. What we do now diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index ca18a040336a..c94e71f741b6 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -959,7 +959,7 @@ xfs_trans_cancel( struct xfs_log_item *lip; list_for_each_entry(lip, &tp->t_items, li_trans) - ASSERT(!(lip->li_type == XFS_LI_EFD)); + ASSERT(!xlog_item_is_intent_done(lip)); } #endif xfs_trans_unreserve_and_mod_sb(tp); diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index f46534b75236..a71b4f443e39 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h @@ -78,6 +78,22 @@ struct xfs_item_ops { bool (*iop_match)(struct xfs_log_item *item, uint64_t id); }; +/* Is this log item a deferred action intent? */ +static inline bool +xlog_item_is_intent(struct xfs_log_item *lip) +{ + return lip->li_ops->iop_recover != NULL && + lip->li_ops->iop_match != NULL; +} + +/* Is this a log intent-done item? */ +static inline bool +xlog_item_is_intent_done(struct xfs_log_item *lip) +{ + return lip->li_ops->iop_unpin == NULL && + lip->li_ops->iop_push == NULL; +} + /* * Release the log item as soon as committed. This is for items just logging * intents that never need to be written back in place. From patchwork Wed Sep 23 06:59:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794135 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 416B0618 for ; Wed, 23 Sep 2020 06:59:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24E42221F0 for ; Wed, 23 Sep 2020 06:59:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oA3Ic24L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbgIWG7c (ORCPT ); Wed, 23 Sep 2020 02:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgIWG7c (ORCPT ); Wed, 23 Sep 2020 02:59:32 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59528C061755 for ; Tue, 22 Sep 2020 23:59:32 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id u4so612522plr.4 for ; Tue, 22 Sep 2020 23:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DoM58cBMly95vRrXSg4Nl9xCCYlU0fMPXEfNgDsWH5U=; b=oA3Ic24LC8T2+ARPoZRjerz6LqW+hmeUjP5ML4+MDKDVHOtLcX0XMpblWZnuvf7F5P ZX54dpluI7JjXkbxedrRoDXs6GXEdzlP0EGUV6SZie0ciH5EjXmSle3RrP8KjGNCSt2q 01RmBwtrhN/olv1ONVPcf+TMOtqMxcIlny36PY/rErd9Z9D+TeofUtD+Cdcku8nKe/KE bEU/LHOSZGj0xRTKrqUhb2MInC20ZA+1FieQ5qKoti8Z5zlBVRWNDAHaKThFL2QbjLnz 3+PywaF89fPh+NrrJs++3uLO3Mr8cvOzZv8PT8FPyhuUJfMDhssBRNFFTq9zVUTHk2c0 EHiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DoM58cBMly95vRrXSg4Nl9xCCYlU0fMPXEfNgDsWH5U=; b=S6KoXgVjBybd+otdht+pNPefFTeZ1oU3cJ6liEwhSCS+5W5dxO1fD8fDALyYpxAS4n dyJZiSa5Qp3O8rct4iPJYzzCZERWZy0v64BZ2VlJvWNrI05Wq6F5pjh41ioSIeidaGxe jsFkb8ZIJCZCvGbEEPbOkkXvVp8gViKQfFTbC8FVuDvY6+IjbaBbYGiQvXe9kBMiesd+ h1JX4i5hHebEGbYjCvfshIAqKZuAxoA/8+AkzKWNDWOpPk935W/kBfQhIzh+iWm7wxQm 5bR2akgUHYGEG8c6n1RlobkHjezY+8gQ+gaeYvvPvq7R1a4iTFd+24lpiGGLfvH2cXRx jpKg== X-Gm-Message-State: AOAM530UvV9ibKbbRb5itcX7akd8blMnXXTnJGiF3cZ61yARZP2gHBgL WjFr4abQfIKfJQfpvCeepLICGPgymwvz X-Google-Smtp-Source: ABdhPJzAnv+x/aNWUHjoQGOzRkuBahJDGK81B34zjrWvhOdlb1hud2c8cbVbceAKqkOYbhnHq7CqlA== X-Received: by 2002:a17:90b:46c4:: with SMTP id jx4mr2262513pjb.190.1600844371620; Tue, 22 Sep 2020 23:59:31 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:31 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 5/7] xfs: remove the redundant crc feature check in xfs_attr3_rmt_verify Date: Wed, 23 Sep 2020 14:59:16 +0800 Message-Id: <1600844358-16601-6-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia We already check whether the crc feature is enabled before calling xfs_attr3_rmt_verify(), so remove the redundant feature check in that function. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/libxfs/xfs_attr_remote.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c index 3f80cede7406..48d8e9caf86f 100644 --- a/fs/xfs/libxfs/xfs_attr_remote.c +++ b/fs/xfs/libxfs/xfs_attr_remote.c @@ -96,8 +96,6 @@ xfs_attr3_rmt_verify( { struct xfs_attr3_rmt_hdr *rmt = ptr; - if (!xfs_sb_version_hascrc(&mp->m_sb)) - return __this_address; if (!xfs_verify_magic(bp, rmt->rm_magic)) return __this_address; if (!uuid_equal(&rmt->rm_uuid, &mp->m_sb.sb_meta_uuid)) From patchwork Wed Sep 23 06:59:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794137 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 6D672618 for ; Wed, 23 Sep 2020 06:59:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51985221E8 for ; Wed, 23 Sep 2020 06:59:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FcrIzaJx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbgIWG7e (ORCPT ); Wed, 23 Sep 2020 02:59:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgIWG7d (ORCPT ); Wed, 23 Sep 2020 02:59:33 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE8EFC061755 for ; Tue, 22 Sep 2020 23:59:33 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id d13so13803761pgl.6 for ; Tue, 22 Sep 2020 23:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uzrcqek5YpHotqjw8QpiA/JofXip5yx4HlGgtaw1CZY=; b=FcrIzaJx3wtzWeMaGtL474QpR9N1kOisp5z6/EYvMVKhmtXxfTP5EsDGq63VuLeW8y HjlpVzLUGxWb4PauPRstcwM6JykadFD4fve1dAF5meurXYdd7j1K+0xMfyYrHXVzEB8x JwJZlo7MrQH1JjRtpw2aiEHb/8QQzU07nqbRG2kUvsmIRFGYoM2u4/FWUKZj9SBhTG1h Im1bUAnv+YCb6DWaUtDeBD/wZUDY8fwrcuICAxNyyUudlBzaSPb11AlYN4623DM4i6x9 0FOuD9pelq4utL04ekH0vXoW8wtm1V2HpsuykcyeQ4cgypedT/O+V2tB//H77Clqw5Oy uyHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Uzrcqek5YpHotqjw8QpiA/JofXip5yx4HlGgtaw1CZY=; b=ObxajvJ6orBxROe7bCdd9RyjYw87/XiG2ws2uBWovn7SvW/den1rfobwEyfa7a+qWS xj8zLAtxbbvIrrv61GoC3YmxTaqDgW4SEKiHzaq08MttYoz0zL9Z8dsUoZ6j4dOWwdgo aTD7U35GUiiQ22Ar9GPH/6rN94fKi0oWj3V0mQNmix97H1hy8FkU/42zJmuq3fXAX1Wa Ha8X2T8GAMyK+jSNSLUyXQGNu+ogmS4Ij5VJR0BzxpRS8kzZatVSKw+CpLB6qGbWfb+i DFp00OVE79FJg8InIDPk2Q5EDPyLeB+BefGRA7cjA89P8yQs5buXTBb0j0ze58S0U88D WHbA== X-Gm-Message-State: AOAM53374ekNvGwCW3LNjbRV3ByCdCxYx2LRcDcfKoh+k40R5w8BP3mw Ut6r8Ls/erDi0bSORXIxzI9WRhPA2Xyr X-Google-Smtp-Source: ABdhPJzk9Z8gnGCJNvYHa7AOkoxD4kNeXPjzd2uVLZGqkS15DW6nPjz5WBQBIhzuufCMHKvLrbftjQ== X-Received: by 2002:a62:1902:0:b029:13e:d13d:a12e with SMTP id 2-20020a6219020000b029013ed13da12emr7603740pfz.22.1600844372890; Tue, 22 Sep 2020 23:59:32 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:32 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 6/7] xfs: code cleanup in xfs_attr_leaf_entsize_{remote,local} Date: Wed, 23 Sep 2020 14:59:17 +0800 Message-Id: <1600844358-16601-7-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia Cleanup the typedef usage, the unnecessary parentheses, the unnecessary backslash and use the open-coded round_up call in xfs_attr_leaf_entsize_{remote,local}. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/libxfs/xfs_da_format.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h index b40a4e80f5ee..78225cc959d6 100644 --- a/fs/xfs/libxfs/xfs_da_format.h +++ b/fs/xfs/libxfs/xfs_da_format.h @@ -746,14 +746,14 @@ xfs_attr3_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx) */ static inline int xfs_attr_leaf_entsize_remote(int nlen) { - return ((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) + \ - XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1); + return round_up(sizeof(struct xfs_attr_leaf_name_remote) - 1 + + nlen, XFS_ATTR_LEAF_NAME_ALIGN); } static inline int xfs_attr_leaf_entsize_local(int nlen, int vlen) { - return ((uint)sizeof(xfs_attr_leaf_name_local_t) - 1 + (nlen) + (vlen) + - XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1); + return round_up(sizeof(struct xfs_attr_leaf_name_local) - 1 + + nlen + vlen, XFS_ATTR_LEAF_NAME_ALIGN); } static inline int xfs_attr_leaf_entsize_local_max(int bsize) From patchwork Wed Sep 23 06:59:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaixu Xia X-Patchwork-Id: 11794139 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 9A38592C for ; Wed, 23 Sep 2020 06:59:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CF522223E for ; Wed, 23 Sep 2020 06:59:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uuGmAQk8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbgIWG7f (ORCPT ); Wed, 23 Sep 2020 02:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgIWG7e (ORCPT ); Wed, 23 Sep 2020 02:59:34 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF3D9C061755 for ; Tue, 22 Sep 2020 23:59:34 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id d19so6348827pld.0 for ; Tue, 22 Sep 2020 23:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bgj/YZjhrsYxUdODnTUVN8FzNBeqdxMgw3D4BR0tbjg=; b=uuGmAQk8dvW/SA2/GMc/j+gU+AASuzVpODDznLF9aRF9s/+9XqKOeYJWyRI1iowfbH 680h/srU9/GnOYvFD4xSZJag02cWNO+khHBXfouFLIHTd/DYWk5TdwU/ggSzhi9eg/6Z ya9GeoatEzFby6vnwJyP2tt1eIi16eUFT85uut8sY12vrXaP9vM1uv1cbN1ECPC2t5YH ZI4Tbyo/0vo+1NWPAiuaK6ED+WoX7l0fRyI07rCDinX2JOhhnqxz6Xoz62mdKBcKbGLv XD5OIRlGGum6oprq4yKrhIUxJr13dF1aR8uhFwVNiu5ukhn66N9FM+hGWQbs+AqnKp3n b2IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bgj/YZjhrsYxUdODnTUVN8FzNBeqdxMgw3D4BR0tbjg=; b=pSEnBFfTFd8l9TuuI25PWkqkJ6b+qGL4G5YW05E+THlvr43y+G/YAHo4zl56mnElSC Ka5+gX4MDZt0CZcfneXnqOSB3lesEtxXI5m6nK+eQ+9HreKNz4AWTC9zEbDj7jkK/ncN y/+QBFeknDHB4CrbMEeu+K+1nsMtTs7gsIUV+sJ6DosX6/PlIDeWrCJiTWw+W0p04jjR gsFrBdojv+KGdiSTmkqF4GonRKqdxh3NMmp9fZg5fE62fO+AFHi7HjzeS1GfLKjBHGjD Q2T24mOP82+mU2CHXBWAJWo1FySPtT5gCkMA0QQjQw3FfUgcPyyoDa67XQ0lTdnZicsO Fw6A== X-Gm-Message-State: AOAM533TqCtlA3wRCvBSIualFwNXpMX1/2uOJvV3rznhp0gZXuzRS210 dOS70zF0Vzdqr3KTlgRzaT4yGaXITqr2 X-Google-Smtp-Source: ABdhPJwjnGLNjwuUtIGBoSheqVVF+9r79uQNHuWxr+E/wTaC+2wErlzYSt7xfMVIVVWfAyYDMoGpBw== X-Received: by 2002:a17:902:8489:b029:d2:4363:d47c with SMTP id c9-20020a1709028489b02900d24363d47cmr5315457plo.74.1600844374090; Tue, 22 Sep 2020 23:59:34 -0700 (PDT) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id c68sm10685745pfc.31.2020.09.22.23.59.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 23:59:33 -0700 (PDT) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: linux-xfs@vger.kernel.org Cc: darrick.wong@oracle.com, Kaixu Xia Subject: [PATCH v3 7/7] xfs: fix some comments Date: Wed, 23 Sep 2020 14:59:18 +0800 Message-Id: <1600844358-16601-8-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> References: <1600844358-16601-1-git-send-email-kaixuxia@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Kaixu Xia Fix the comments to help people understand the code. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/libxfs/xfs_da_format.h | 4 ++-- fs/xfs/xfs_dquot.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/libxfs/xfs_da_format.h b/fs/xfs/libxfs/xfs_da_format.h index 78225cc959d6..f13ee8939e78 100644 --- a/fs/xfs/libxfs/xfs_da_format.h +++ b/fs/xfs/libxfs/xfs_da_format.h @@ -35,8 +35,8 @@ typedef struct xfs_da_blkinfo { */ #define XFS_DA3_NODE_MAGIC 0x3ebe /* magic number: non-leaf blocks */ #define XFS_ATTR3_LEAF_MAGIC 0x3bee /* magic number: attribute leaf blks */ -#define XFS_DIR3_LEAF1_MAGIC 0x3df1 /* magic number: v2 dirlf single blks */ -#define XFS_DIR3_LEAFN_MAGIC 0x3dff /* magic number: v2 dirlf multi blks */ +#define XFS_DIR3_LEAF1_MAGIC 0x3df1 /* magic number: v3 dirlf single blks */ +#define XFS_DIR3_LEAFN_MAGIC 0x3dff /* magic number: v3 dirlf multi blks */ struct xfs_da3_blkinfo { /* diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 3072814e407d..1d95ed387d66 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c @@ -831,8 +831,8 @@ xfs_qm_dqget_checks( } /* - * Given the file system, id, and type (UDQUOT/GDQUOT), return a locked - * dquot, doing an allocation (if requested) as needed. + * Given the file system, id, and type (UDQUOT/GDQUOT/PDQUOT), return a + * locked dquot, doing an allocation (if requested) as needed. */ int xfs_qm_dqget(