Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5935266rwb; Tue, 17 Jan 2023 21:58:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXuoPT5IIhqmVyvg/6V4MFidY0T2ePujb+tBKcOjuX6Op0W1izYvkUoOApLp+DspRTs+zqtd X-Received: by 2002:a17:902:ab50:b0:192:a10a:3270 with SMTP id ij16-20020a170902ab5000b00192a10a3270mr4697124plb.51.1674021517043; Tue, 17 Jan 2023 21:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674021517; cv=none; d=google.com; s=arc-20160816; b=EE2mmhJYLdSOUfmkwMAdIRsU3TlNQPrEL0eoaxkPfbKgkwohYcg5H8QjGtvi/WuXnt GudD+E6r5kg+R+ovUjBcjoVmYynZ/EfiJZ6e3u+Op12DgRY6wTlLYiU9RKwDrTI/Gs9Q tw4A1DS5+UNiGHub0yfqkXSO+Ph0M9BikUpBCbteCkxF2g/BlW9fbaYVBQG42FSRweta 9IjeB6ybrCRmVXA8Po10ILFtS1I6YBc/7nn6e3uhurWj2LhtScc2V7INBMkeDwg5yc2e 3FpER56KOj3PF4lShJ7AiRw2kGtgNe3v2/KQrGsF+gdWC5mQXuVLi+cOdUdPf4mSRCGg Teow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=A436UApHmz0grSqAYwsNLN0MVJOFyYJc8T8oEw5Aluc=; b=WcGXwFatYfoqFskrouZ+CgSzC5O7ZIhkVuwIZzU13SQBzINvT0/lFLX1zHDKebZhgc 5ERxdcAtba/x6YgxyaQDA1II0lD8Rvkskuu9OtghaOY8aKnsrG5+lDGjKXNyS5uDQEOI 5WUe7OhlvAnFj/VlZF/NHvDvp2tmZ/VXcRvne+/VNgX7vWCM8z8huCiWqH8acPWerzhV f9yNJdbOX+4f5uXEghCEv2xDE1qyc4RK/R/qrZRNYiOYokV3iO04smKDi+n3xO0Kf4ee 58K09CzosLlJCjkzceGKt1UU9miDhzeU+7OPnCqbGU9D6J4TWmXk3l87yvx+YnU5WMjy /fqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b="iuWe/uSJ"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a63e855000000b004ad0429ab7csi25967846pgk.405.2023.01.17.21.58.22; Tue, 17 Jan 2023 21:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b="iuWe/uSJ"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229379AbjARF4e (ORCPT + 99 others); Wed, 18 Jan 2023 00:56:34 -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> X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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