From mboxrd@z Thu Jan 1 00:00:00 1970 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 149B7C004D4 for ; Wed, 18 Jan 2023 05:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbjARF4h (ORCPT ); Wed, 18 Jan 2023 00:56:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjARFyQ (ORCPT ); Wed, 18 Jan 2023 00:54:16 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A180054138 for ; Tue, 17 Jan 2023 21:53:40 -0800 (PST) Received: from cwcc.thunk.org (pool-173-48-120-46.bstnma.fios.verizon.net [173.48.120.46]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 30I5rDNP010782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Jan 2023 00:53:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1674021195; bh=A436UApHmz0grSqAYwsNLN0MVJOFyYJc8T8oEw5Aluc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=iuWe/uSJv46QhWCIK5FYit3CBPxP0dhNpJSjMJ3JT4uNDpZTBc131WZqhLeknjVxw DM9E+pd1XTGr4RV1EacSLm3TK1EggoE1JK62D6yXaLnjCE9m8NVcZLAdq4E99Vf5Xk Qrtv0CssCwOO8shpU8zFpYk6spa4utIf7edsemF6MwR0V65a1PYiQJc0m38TaxfQwj iXnl6+XBf2gg3800GwgJH5A8ZMKaN+tSCPnQ39XjngZHE4fk5HRsZv/19zCkZAGVNc YGAc6TNXDXqRT0I9cLIZKHbxFWmBBb7fRN52ahKiKb7Qy3CKGxsq6kQ5ZpODMhNL/F T0bICPtUXSu4g== Received: by cwcc.thunk.org (Postfix, from userid 15806) id D41CC15C469B; Wed, 18 Jan 2023 00:53:13 -0500 (EST) Date: Wed, 18 Jan 2023 00:53:13 -0500 From: "Theodore Ts'o" To: Li Jinlin Cc: linux-ext4@vger.kernel.org, Zhiqiang Liu , linfeilong@huawei.com Subject: Re: [PATCH] e2fsck: subtract acl blocks when setting i_file_acl to zero Message-ID: References: <20220317172943.2426272-1-lijinlin3@huawei.com> <8e8f277d-6222-5f63-0dcb-a17771a0deff@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e8f277d-6222-5f63-0dcb-a17771a0deff@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This patch is not correct. We don't need to create a new ext2fs_adjust_ea_refcount4 to return the h_blocks field in the extended attribute block, since that only thing that we support is a single xattr block. The real issue, as Zhiqiang Liu pointed out in [1], is that we should not be clearing the i_file_acl block is the inode is only being truncated, and not being unlinked. [1] https://lore.kernel.org/all/ed518b11-3c38-1c1f-a75d-3293c91f17d4@huawei.com/ - Ted