Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp515417pxb; Wed, 29 Sep 2021 04:18:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbXp1cFWiCa78GDHAq+qJF1OciWMFo7IrYe9RPjlHhBx7OUOLPcuCH5hKj2WdwKYYxyIxp X-Received: by 2002:a63:5911:: with SMTP id n17mr9046515pgb.177.1632914298425; Wed, 29 Sep 2021 04:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632914298; cv=none; d=google.com; s=arc-20160816; b=XNQmb2SMOfmCe4YY33vb1eWWCXTPwisxE9lJlgGMuyrH6AfESaUrgKwkA37WTpYK+F MG3Mm1MJJwa4VGLLntv/FZzMREoOv5SB5eyUry4MofjH+N9gsJCgDMPPkaYdLGk6LhV7 Ug1Or0o7MimUUlpVupxPeX6hZ80Cia0hpC1o7s7qKYXUapcxpLJBQ0FtjwU6spsE82bj lm5Q2Goer4NogKJJ0/x76EcOgyL+GC1UlclsyHWw+iZLhjEuWJ/4xx0fcOc31flSm9XS EyAh8qxPDprlw+B/zbpCHcdkaiIOcMXYDXlTtj7aovGxLV2hxOYXsqHAwLQ6eK1i7iTV k4rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8Hb/ExTfUg71jP0BZboRAxOnOSrI0J7gQ0p7JwuiO8M=; b=BhdVAaveIqlBpk165MFn/LvrNoIh+ZDXUBfqu5A3FHcHJ1FcmbY0LEtTJWY18GFqF3 TMYDSs6ABtfUwCURlWAWY2vA/xalexOMhlmqxRUGyDWhwej3DFHZpL6VUrheD6gml0j0 AEDZQChy8inPqPlVbK5S8GGnoVGFcq0FGw5HmP/lwNok+3sHwgdroB+qUZqKWLLGTXkf YoPzyITUdZKGVg+DMl/WUy8h9Gw4pARkujxf7rLIzZxZQfw+xCb6gBYfxCxk6xpZNgjk o6orm104zdAzUsrTLXs5yB7BR4p1n+grMi8DwM3i1cmhb6Y8FbJ/RgUVIDe5c048Ppy7 HgLg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si1326302pjm.62.2021.09.29.04.17.58; Wed, 29 Sep 2021 04:18:18 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245313AbhI2K4E (ORCPT + 99 others); Wed, 29 Sep 2021 06:56:04 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47804 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245275AbhI2K4E (ORCPT ); Wed, 29 Sep 2021 06:56:04 -0400 Received: from localhost.localdomain (unknown [IPv6:2401:4900:1c20:3124:6d32:b2f4:daed:4666]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: shreeya) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 3E7591F43F7F; Wed, 29 Sep 2021 11:54:20 +0100 (BST) From: Shreeya Patel To: tytso@mit.edu, viro@zeniv.linux.org.uk, adilger.kernel@dilger.ca, krisman@collabora.com Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Shreeya Patel Subject: [PATCH 0/2] Handle a soft hang and the inconsistent name issue Date: Wed, 29 Sep 2021 16:23:37 +0530 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org When d_add_ci is called from the fs layer, we face a soft hang which is caused by the deadlock in d_alloc_parallel. First patch in the series tries to resolve it by doing a case-exact match instead of the case-inexact match done by d_same_name function. The second patch resolves the inconsistent name that is exposed by /proc/self/cwd in case of a case-insensitive filesystem. /proc/self/cwd uses the dentry name stored in dcache. Since the dcache is populated only on the first lookup, with the string used in that lookup, cwd will have an unexpected case, depending on how the data was first looked-up in a case-insesitive filesystem. Shreeya Patel (2): fs: dcache: Handle case-exact lookup in d_alloc_parallel fs: ext4: Fix the inconsistent name exposed by /proc/self/cwd fs/dcache.c | 20 ++++++++++++++++++-- fs/ext4/namei.c | 13 +++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) -- 2.30.2