Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2535683pxf; Sat, 20 Mar 2021 21:02:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL1OMKYiHXWLWlRdIF3y3utbqxUqXqlczrqbX4Rr7WSbVm8NyjkxAZ1I5HI/jFgQ+l8ZER X-Received: by 2002:a17:906:5e55:: with SMTP id b21mr12464060eju.289.1616299321761; Sat, 20 Mar 2021 21:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616299321; cv=none; d=google.com; s=arc-20160816; b=f9bHUkf0iF0sb1ls00mKnAiJ3b1LAbZTLR0Qv3ps+nKwYzGkkDNUcpFRMGqxI89C7W wSafadsIUasllENBsBeucr5tIk2YCQR/VbJyG8xRr5xl91tWDs0GgXE9bQ3RC+CDmsR3 AA1F/DwQxeLFHU90ZXyKCB1ktMHUOrESfsa9e3XdXrSxFff55hV7lK1BymdmtTPSo2ix /5qitdWUyWfaVRXJtE7IhUgSjuodj8pPdRjo+dTsad/OSVPawq9T94uB/mxla4jQjpnd d89cQ87/lZxUKHXwk+AnhnoKUbE7wQc4ZtEbYghk2PaBb4BdKoey4o+tnoBQ72Iw9314 fzJA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7YEJJNYhw8fgv4T2yYRv2rVkFUMqY17Eua8WDASFrG4=; b=yw5AG3D8WFeJaSflbQv+hnuy6L39ZDNvuEdkgEuPtofetxlFmFiPs3uGBnctib8fRW 5Ehlz31Ym+iNgJD8sNtGK10ZQ02V1uLszFwMNN+BkUZiIDQiWbfc8J4HbdMI9i5hSizm wLgWybUjYxlc0QdJcXUCD1eMazpwYZ58re08dk2rdGYM5LO5MqImSTufwZExHNCpkLf1 woUoReXPcE1s7QnAB2u6KN4Vbx1a5yX987YgVeCtJd3RSLPj4gYUGqAvXvf05isbjD1r rp3JGx8/omTfHiGgXnd6l+zI4ALssKOfs+7s9mf52DEX0g6Tvbkq3s0YoUrI7tahsQ84 y2Zw== 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 y14si7565473ejw.723.2021.03.20.21.01.24; Sat, 20 Mar 2021 21:02:01 -0700 (PDT) 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 S229854AbhCUEAK (ORCPT + 99 others); Sun, 21 Mar 2021 00:00:10 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:34366 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229840AbhCUEAF (ORCPT ); Sun, 21 Mar 2021 00:00:05 -0400 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 12L3xh4l022579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 20 Mar 2021 23:59:44 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 4975815C39CA; Sat, 20 Mar 2021 23:59:43 -0400 (EDT) Date: Sat, 20 Mar 2021 23:59:43 -0400 From: "Theodore Ts'o" To: "zhangyi (F)" Cc: linux-ext4@vger.kernel.org, jack@suse.cz, yangerkun@huawei.com Subject: Re: [PATCH v1 1/2] ext4: find old entry again if failed to rename whiteout Message-ID: References: <20210303131703.330415-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Mar 12, 2021 at 10:01:50AM +0800, zhangyi (F) wrote: > > In this error path of whiteout rename, we want to restore the old inode > number and old name back to the old entry, it's just a rollback operation. > The old entry will stay where it was in common cases, but it can be moved > from the first block to the leaf block during make indexed dir for one > special case, but it cannot be deleted in theory. So if we cannot find it > again, there must some bad thing happen and the filesystem may probably > inconsistency. So I calling ext4_std_error() here,or am I missing something? After looking at this more closely, I agree, this should be OK. The directory is going to be locked, so it shouldn't be changing out from under us. Thanks, applied. - Ted