Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10114397pxu; Tue, 29 Dec 2020 14:26:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzc4PyOaQkrrwrLTucBkbMLP8MG98vHko3GklJRophjmtbyA4qs7D5kGHUrG8a29trju7fE X-Received: by 2002:a05:6402:2cd:: with SMTP id b13mr49666538edx.199.1609280810698; Tue, 29 Dec 2020 14:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609280810; cv=none; d=google.com; s=arc-20160816; b=laX87SEbOtckDA1aki6SWULxjc29x/HnPCqREP8HeRK6GXISiT96svAVjVZnF/w5QJ 5oTRBvODfbqMz4kQRZEQFF2azBRS41X5ZZcCC+q6FtpvI5PO8Q7A+Yhf6J65DWublBqe 4Z5vFInr1TWgHfdStQxVq1Gg/lDWbvW15FAtp5drbQbyOyrj+imJP/AxoFjFpX2SJT8f C/tWcrc5hlRw4AtbJEBKnFcIlHsLpaqjMtluJSejKAsdhdk9bIoD9ugvO7lk48V29z74 X7rkBRNQ/cDj0h31U1ms7KmDzyZBiuh80ta4+fj8ku7WPSWovco9X1fabfh+/r0N91k1 XHeA== 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; bh=/UW0LjGoU6BWQvFbmbf+h3Rq1MvXL92iUjSwGF2N9oA=; b=tMYy0Wb8XTGQC+ajM9vRZ6M2YaWUWBf5KbcHcX2JZPP7Rb5YDkyesQY0NRXCu4OleK RedqbbsnboDN4wS65IAFNWbsD73nY2la0kscwoM1GlezzbeHgtkxpwEtBNeYSWMz48q3 +ZTyXdX3wdvqHIZRUV1LMg+0WH47MaGBv5WbAoJ9ol9z478Yx1mo1yKllzo4f0G7dBoL IsEtiIF73pPtioQ9JojZIuhqjoQqlW+90j9B9DKrp2BLvsPBN6qz9/dpG9hif8ALkWhd iY1gXALy0qn6vXg2CDm1U3yZBnhGBnCAXM5a8sPYxoVmhGMF9khHrwUDbtSiyogH7Xnv Eveg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b2si20170010ejh.264.2020.12.29.14.26.19; Tue, 29 Dec 2020 14:26:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726221AbgL2WZH (ORCPT + 99 others); Tue, 29 Dec 2020 17:25:07 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:35386 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726138AbgL2WZH (ORCPT ); Tue, 29 Dec 2020 17:25:07 -0500 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 0BTMO6Dm006244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Dec 2020 17:24:07 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 3200D15C34A8; Tue, 29 Dec 2020 17:24:06 -0500 (EST) Date: Tue, 29 Dec 2020 17:24:06 -0500 From: "Theodore Ts'o" To: yangerkun Cc: linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca, jack@suse.cz, yi.zhang@huawei.com, lihaotian9@huawei.com, lutianxiong@huawei.com, linfeilong@huawei.com Subject: Re: [PATCH v2] ext4: fix bug for rename with RENAME_WHITEOUT Message-ID: References: <20201229090208.1113218-1-yangerkun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201229090208.1113218-1-yangerkun@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Dec 29, 2020 at 05:02:08PM +0800, yangerkun wrote: > ext4_rename will create a special inode for whiteout and use this 'ino' > to replace the source file's dir entry 'ino'. Once error happens > latter(small ext4 img, and consume all space, so the rename with dst > path not exist will fail due to the ENOSPC return from ext4_add_entry in > ext4_rename), the cleanup do drop the nlink for whiteout, but forget to > restore 'ino' with source file. This will lead to "deleted inode > referenced". Could you sendhave instructions how to reproduce this failure? Many thanks!! - Ted