Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp824084rdb; Fri, 23 Feb 2024 00:34:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXbZts04ppvK1YAQGYfUWhO8WQB2DzkcdawMFbO5xoZGHSM4xtoJRWLdESjWpk0PfBv7cveHYHsOOJ0nqNvj05lMfN6DjkxuzppwdMOKw== X-Google-Smtp-Source: AGHT+IGrcuIgjum/9gInAlpLnsN5949U2K9rTxjHI0kEyYxUuMsVamnGYhaPYkjmBMwZI8tYqde2 X-Received: by 2002:a17:90a:aa85:b0:299:14e4:6579 with SMTP id l5-20020a17090aaa8500b0029914e46579mr944655pjq.22.1708677268630; Fri, 23 Feb 2024 00:34:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708677268; cv=pass; d=google.com; s=arc-20160816; b=afZp9C2/2vAJVftpP8p+ERKA5+udkRiqFsvSDwJ8LmJDECbG//Hyev92gUGFN2H0VW Lu2nJZbB0+xOBEBohWPVzOA2NcJGG2kVb99ApqAxgn59oVXG5ywV7zyLaeHkJALIPeCQ 0nL+4kNZmdNoa63xPswgUvRyk7l4T4KocXe94etYmHqS/HfFvhK4pkObKYlGNoQKIqcR 4jCvq8FtWxyo7jutJVvTsWmr4/9so/xLMphSASwm38S1vs/oWDq3ahCERgcbmfeA1Iyu OishzRFDi02/nZIYtwWOJk/iYL1jfPPX9RG38kDDEE9N/mPdnesNckf71YiTcSU/4dYn 1Q2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from; bh=pK0wS17P+ry2DYRREI8ULzjaUvMYe68K4J7md0VlXh8=; fh=8fMNz5XLes1q6KgZpQVNR7IFjb0t+7u9G1PE29ucuLE=; b=0rH3NrQaSjs2MEcwEY2towLPy0iu7ofgEqFy3zFbE5YMRdJEMlXp2jCpdMNmT8pPl+ jUCmjtOke+Pbk2JHDfaJeViTe5eL2jjB9l5nvRxIQgyzYNU7WFK3EhlL/IdAzNhD6ynE N1karpAy+qw2lLTo8G5bddZ3GChobz9r76SetjRY4cXN12qIcy66gCn1O0/T8KbhS219 5sffFYxs73Xz5Ca0kylcVn2w+ZrJeON4wt3rNiQWxFSKTIoOLbcW1+YRTJnOyisCen9K ExS7sX3T+iUUJoMBxAiq95eJ/vnIYUBSTzqbsF3s56rJ2VBie4OJHJ4ZzFZZHqTrfDwr iPYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=parknet.co.jp); spf=pass (google.com: domain of linux-kernel+bounces-77928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77928-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id me9-20020a17090b17c900b0029a890a03aasi25367pjb.44.2024.02.23.00.34.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 00:34:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=parknet.co.jp); spf=pass (google.com: domain of linux-kernel+bounces-77928-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77928-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 23161B25B1B for ; Fri, 23 Feb 2024 08:27:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2BFD1946B; Fri, 23 Feb 2024 08:27:15 +0000 (UTC) Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F414F17C9E; Fri, 23 Feb 2024 08:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.171.160.6 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708676834; cv=none; b=ldFQYvBtyqG8Z/iRM/RaPwvjzw3dYW2qWbDmSOb/6J6ilcvUq3EdOK6jH51emM5W/nW5cXeWIlOr/gkVfypWXp3/EBKYxwYtU5pHBRIqEGcJ8Q60yy0TkSl1oum3FN5tk/JPGi7tO2yjQiniFSMfgie0jCaXYn9lKVLmgxQ0Dos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708676834; c=relaxed/simple; bh=1ndl2jwEP/nNUP8s6SSUqM2otyCLFT+mXsleq3UHp4Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=U7Lw5rBQpkyiEhRxVjbNhK779ehHAGSsmBEzCDa8QRT/Z0/LZ3uAN8fut+5+MrLqnE61jjm3ULsZcFMuo4kJ0KjvaYnN4T2vQ8XKBTrZDgMHHJPf8v4lLXmPDNXn7l4Uer7mW9E55YIiFRmxn2H4GGL3gUfydOeaXBMrAgMrgmM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mail.parknet.co.jp; spf=pass smtp.mailfrom=parknet.co.jp; arc=none smtp.client-ip=210.171.160.6 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mail.parknet.co.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=parknet.co.jp Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id ABF63233CCB7; Fri, 23 Feb 2024 17:27:10 +0900 (JST) Received: from devron.myhome.or.jp (foobar@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.18.1/8.18.1/Debian-1) with ESMTPS id 41N8R9O9212176 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 17:27:10 +0900 Received: from devron.myhome.or.jp (foobar@localhost [127.0.0.1]) by devron.myhome.or.jp (8.18.1/8.18.1/Debian-1) with ESMTPS id 41N8R9KO1007742 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 17:27:09 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.18.1/8.18.1/Submit) id 41N8R8u71007741; Fri, 23 Feb 2024 17:27:08 +0900 From: OGAWA Hirofumi To: Thadeu Lima de Souza Cascardo Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Gwendal Grignou , dlunev@chromium.org Subject: Re: [PATCH] fat: ignore .. subdir and always add a link to dirs In-Reply-To: (Thadeu Lima de Souza Cascardo's message of "Thu, 22 Feb 2024 23:02:16 -0300") References: <20240222203013.2649457-1-cascardo@igalia.com> <87bk88oskz.fsf@mail.parknet.co.jp> Date: Fri, 23 Feb 2024 17:27:08 +0900 Message-ID: <874jdzpov7.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Thadeu Lima de Souza Cascardo writes: > On Fri, Feb 23, 2024 at 10:52:12AM +0900, OGAWA Hirofumi wrote: >> Thadeu Lima de Souza Cascardo writes: >> >> > The tools used for creating images for the Lego Mindstrom EV3 are not >> > adding '.' and '..' entry in the 'Projects' directory. >> > >> > Without this fix, the kernel can not fill the inode structure for >> > 'Projects' directory. >> > >> > See https://github.com/microsoft/pxt-ev3/issues/980 >> > And https://github.com/microsoft/uf2-linux/issues/6 >> > >> > When counting the number of subdirs, ignore .. subdir and add one when >> > setting the initial link count for directories. This way, when .. is >> > present, it is still accounted for, and when neither . or .. are present, a >> > single link is still done, as it should, since this link would be the one >> > from the parent directory. >> > >> > With this fix applied, we can mount an image with such empty directories, >> > access them, create subdirectories and remove them. >> >> This looks like the bug of those tools, isn't it? >> >> Thanks. >> -- >> OGAWA Hirofumi > > Which they refused to fix, arguing that there are already filesystems out there > in the world like that. Also, there is argument that this works on Windows, > though I haven't been able to test this. > > https://github.com/microsoft/pxt-ev3/issues/980 > https://github.com/microsoft/uf2-linux/issues/6 OK. If you want to add the workaround for this, it must emulate the correct format. I.e. sane link count even if without "."/"..". And furthermore it works for any operations. Thanks. -- OGAWA Hirofumi