Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp14355pxb; Thu, 27 Jan 2022 13:57:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdNDCWCMpToMnM/AvTcxGMhuPSwISZEcqQz9D5s8KRpXOEpWVr/gfg4EfZy7L+OeE5rdGv X-Received: by 2002:a05:6402:50d1:: with SMTP id h17mr5413788edb.286.1643320646018; Thu, 27 Jan 2022 13:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643320646; cv=none; d=google.com; s=arc-20160816; b=NIFHx68kIPzKwvQFEKQpNZiaaxtVYBnTUj+qX9DaqqNVWsuHOzGlGg5wYo9FTeF0u2 JzEiCQxAUdgpElxdYHSQPh8Zh/nynBo3mDNAHUTk49V8NJAajKmSfWMP85F24w84WFE3 ucmPdw1T3or5elKz7NTDe2Dd3RXCP9WYFqOGp63g5+/vx6SNxRbpbp5WfnSzGYLkxZTe BFw0t8wLxq/ZDK8hbkqT/Z98f/RFLl7yLlx2UC2Gs0aNYfnLLtTDSGNnJ66tEG3KtWih Hy2SZy4GH8dWtDA//gA6LlJd1QGeRi4ZywXc71zNhjrS2+uLP7zUFPSBDW7+k7tCq7as rUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fhkX3cuAqsg+3k/dr3+e9855wqIq6Aj6ohJUQGiCvfQ=; b=ex2maNBL0R5j/hdCmZhAQlQBdqzKdCAPl9Q/ffa2vyvzdMiaL2AnpWhtVnSyVRtbx7 XkRAs9kXsR3E6gvXm89SbBVEgYfGC5IGpYKjlIV8vUZOUfIkG/ctzbMsOJ05XXv+tneS lqlPcs8wCDIekGIUVktsemaJ7M9TSKJv/K3v9mUNzHVOYUXDAY/SQrJnMO2DEEA9m+X6 qFi51tofv7UhhYdl1q+lAZlhpJF3qe42quCbP6jmSwpVk7O9Ad5xfae2zxEag9vYWtnh QVEJAV3FeXtclWJV5RLn+aJQEjVx3wNwV1xxNGw8e2DTulhcLIzD3ZCCjgwvd9biZdi8 sCpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mCdueMqP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si1918410ejq.761.2022.01.27.13.56.57; Thu, 27 Jan 2022 13:57:26 -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; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mCdueMqP; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229971AbiA0MUs (ORCPT + 99 others); Thu, 27 Jan 2022 07:20:48 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62116 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241033AbiA0MUs (ORCPT ); Thu, 27 Jan 2022 07:20:48 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20RBkEZb009133; Thu, 27 Jan 2022 12:20:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=fhkX3cuAqsg+3k/dr3+e9855wqIq6Aj6ohJUQGiCvfQ=; b=mCdueMqPnBH5R9k0cmk1u+7u1qIhxyaamnbVs8t2gSx0hFXuzD1m9xsBQIsUylpejpU4 h0jLxgwIeB3lStuSg8C2quixuWlhE6QcqRQLqmJTIwqLPoTDG4lWvpCEqx4dEC4ei2TQ wKH4HOYzV/awJzAwbSoqVK5IDgpQY6KiZQAyT4uiDe9YY5SDGiI4TERWHu3TcXDgYN3s e/Ff0QjCmrk2k1xKLh9xMcHCkXTFS4fBQxCfI14uR0hYRQqpACQTQ38VGhPz9J6eNJ+g iKGUgVia1v4/xJYG7rX+z/3W8gYJaweycvubc/cnh0hBEe35md2T5IPIdocLEFTZWtKe dA== Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dutt8gs7u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Jan 2022 12:20:46 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20RCE19j022505; Thu, 27 Jan 2022 12:20:45 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03fra.de.ibm.com with ESMTP id 3dr9j9nmu3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Jan 2022 12:20:45 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20RCKgiG47710588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jan 2022 12:20:42 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3837142045; Thu, 27 Jan 2022 12:20:42 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B6B842047; Thu, 27 Jan 2022 12:20:41 +0000 (GMT) Received: from localhost (unknown [9.43.13.79]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 27 Jan 2022 12:20:41 +0000 (GMT) Date: Thu, 27 Jan 2022 17:50:39 +0530 From: Ritesh Harjani To: Maxim Blinov Cc: linux-ext4@vger.kernel.org, linux-fsdevel Subject: Re: Help! How to delete an 8094-byte PATH? Message-ID: <20220127122039.45kxmnm3s7kflo6h@riteshh-domain> References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4awuAqW7Ym2xPMW5fqdoDFU-2vhpOvu- X-Proofpoint-ORIG-GUID: 4awuAqW7Ym2xPMW5fqdoDFU-2vhpOvu- X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-27_03,2022-01-27_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 mlxlogscore=999 clxscore=1011 impostorscore=0 adultscore=0 phishscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201270072 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org cc'ing linux-fsdevel too. On 22/01/27 07:06AM, Maxim Blinov wrote: > Hi all, > > I'm not a subscriber to this list (so please put me in the CC), but I've > hit a really annoying un-googleable issue that I don't know who to ask > about. > > A runaway script has been recursively creating sub-directories under > sub-directories until it hit the (apparent) OS limit. The path in > question goes something like this: > > /work/build-native/binutils-gdb/gnulib/confdir3/confdir3/confdir3/confdir3/confdir3/........ > (you get the idea) > > It was only stopped by the following error: > mkdir: cannot create directory 'confdir3': File name too long > > OK, fine, that was silly but whatever, right? I tried to delete this > huge directory from the top with ;) > > rm -rf confdir3/ > > but that simply generated the same error as above. So, I figured "Hey, Strange. Though I didn't try creating same name subdirectories like how you have done above i.e. confdir3 within confdir3 and recurse. But I was able to remove the parent directory after hitting the max PATH_LEN issue. I ran this test below test to see if it fails on my ext4 latest tree. But this passes. https://github.com/pjd/pjdfstest/blob/master/tests/mkdir/03.t But just curious, by any chance did below fixes it for you? echo 3 > /proc/sys/vm/drop_caches -ritesh > I'll just walk all the way to the bottom, and delete the directories > one-by-one bottom up". Here's the script I ran to get to the bottom: > > $ for i in $(seq 999999); do echo "im $i levels deep"; cd confdir3; done; > > It then ran for a while, and eventually I got to the bottom: > > ``` > ... > im 892 levels deep > im 893 levels deep > im 894 levels deep > im 895 levels deep > im 896 levels deep > bash: cd: confdir3: File name too long > $ ls > > ``` > > So then, I `cd ../`, and `rmdir confdir3`, but even here, I get > > rmdir: failed to remove 'confdir3/': File name too long > > I would be very grateful if someone could please help suggest how I > might get this infernal tower of directories off of my precious ext4 > partition. > > I was thinking maybe there's some kind of magic "forget this directory > inode ever existed" command, but I am out of my depth with filesystems. > > Best Regards, > > Maxim Blinov