Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp481368lqk; Sat, 9 Mar 2024 21:52:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVGMOr5QVn7srFgvT9eaeN6O775Z2uIL5WDzWdoNbu5U8EklyY6Owikc68f/Uxb1gXP42+nFSYLk+BNMe6W9ppAryPhAq3Ua/YhYna2tQ== X-Google-Smtp-Source: AGHT+IFDDrspEgvnyXVUdtQzYbOAv3su+FfAi9PDtK5RFJDuFDSrEAYCZogWQzM82X1FnOszoYOC X-Received: by 2002:a17:907:a801:b0:a46:a24:b627 with SMTP id vo1-20020a170907a80100b00a460a24b627mr1718329ejc.45.1710049971274; Sat, 09 Mar 2024 21:52:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1710049971; cv=pass; d=google.com; s=arc-20160816; b=DyggEoIMSP5X2yn3jyDBb/kQj1FUEC4035no4iP2S3d1EfCasi8F+KwYWRu6iP6FlH zLdV8btCzzfj/CK9eRGLN8a2Jt43NBlBHwDY0FluPdOJQ8fuPN/+e6+chZgPKRW+LvgJ Tbqai3rWaGAeYWKlZeAq3rpl5RlSiHjHXAkmvrpVlbPqa7aP0fCkmM1mYCyE5IMo06e2 JVoYHhe0UYLAdyJqdTDPyMYKrWmt5C/VIVq1dX6W2uSxMQd5TOc+264iA2bsHdsFiiQM oGgSzRnOMrH9I6LKP84AlhHl3sWv29kvJqfmllJ3sojeE8m8VGGV7x8Twk5RRmWJ6idN x1UQ== 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=rqqUkWSBc3jg0aLWuf4Xq4Bh8yaH6Uuh+qelKWE6umY=; fh=8fMNz5XLes1q6KgZpQVNR7IFjb0t+7u9G1PE29ucuLE=; b=NDgz5TLV00+ZkY8AcNwX7PGOycw1cvrq0bBRYSBWq3AAIc9LP1gVUT3jQr/q2/arxL 0idN7JMqLqZMwpLvXpwwGmzdTSUcqmfL96oBvAVNOsyKhVguMFZgJaGK+bYd46eUvegy 3mUZh8KoCKTZstcM60CfVEHphz4oeqAF1JDp+4WntJfzW0znBIhP7PXyuPqB8HasY3yf n7zIzqvjlnANuNJ27p4+NgC8HGgNfaUiHt9qui1wjrGeAgS/DtLsrh7q3FdpwnTaIyba 8QIQAfkirNoKqJh4NMHQAILyy0U0RhtmRYfVibYB6fQbSTvO3kgOj77TMYlLCp5aXZq0 rdaw==; 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-98128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98128-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id va29-20020a17090711dd00b00a44122c582bsi1311289ejb.905.2024.03.09.21.52.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 21:52:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=parknet.co.jp); spf=pass (google.com: domain of linux-kernel+bounces-98128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98128-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 079041F22044 for ; Sun, 10 Mar 2024 05:52:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8835214A84; Sun, 10 Mar 2024 05:52:40 +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 1A6F016FF54; Sun, 10 Mar 2024 05:52:36 +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=1710049960; cv=none; b=M3teIGNk9JSW+aNEw1pxvnsz5qivnqZX0WJrZxbKTsLficdXJEwC6t7ZJyMSVzolTlQJPz1c5hwcx4kwtgNyFzT0iCQCS2y8WwmWKGp8cA9aQAdKQYw+knvMts4B8Pvz5uarZIImk+O+oEaI1agoZ3ZKkpp6dHFz1Wj9S2lAGGI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710049960; c=relaxed/simple; bh=A9LW5U9UCJNGxciKUSGPD7E5AULsadj2d4L30+gwoGU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Yc47rR+iXtz1k/lqaj4Eq6e7S4n5liqsgwpyJ3qAU+6fBLSdFc/YTYi7WPy4i3YSAM2ffUSXMm7h2NOiObsOjNttgq1MUfiJVNQJ/NmvSzsqXz5yQhMFxP1GVVyIxj+ibLh1OkgyV80YkGOG74TOE4xWx8DP4bCqAQQzGhKhy4Y= 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 358C5205DB9A; Sun, 10 Mar 2024 14:52:30 +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 42A5qRD9134432 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 10 Mar 2024 14:52:28 +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 42A5qRJl710650 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sun, 10 Mar 2024 14:52:27 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.18.1/8.18.1/Submit) id 42A5qR0w710649; Sun, 10 Mar 2024 14:52:27 +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 "Wed, 28 Feb 2024 06:10:22 -0300") References: <20240222203013.2649457-1-cascardo@igalia.com> <87bk88oskz.fsf@mail.parknet.co.jp> <874jdzpov7.fsf@mail.parknet.co.jp> <87zfvroa1c.fsf@mail.parknet.co.jp> <87v86fnz2o.fsf@mail.parknet.co.jp> <87le75s1fg.fsf@mail.parknet.co.jp> Date: Sun, 10 Mar 2024 14:52:26 +0900 Message-ID: <87h6hek50l.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: >> Can you share the image somehow? And fsck (chkdsk, etc.) works without >> any complain? > > Checking the filesystem on Windows runs without any complains, but it turns the > directory into an useless lump of data. Without checking the filesystem, > creating and reading files from that directory works just fine. > > I tried to use gzip or xz to compress the very sparse filesystem image that I > got, but they made it larger on disk than it really was. So here is a script > and pieces of the filesystem that will create a sparse 8GB image. I tested a your image with some tweaks. Windows's chkdsk complains about "BADDIR" directory, and it was fixed by converting it to normal file. Probably, chkdsk thought that "BADDIR" got ATTR_DIR bit by corruption. IOW, Windows FATFS driver may accept this image, but Windows also think this image as corrupt, like chkdsk says. I think the app that make this should be fixed. Windows accepts more than linux though, it looks also think as corrupt. If we really want to accept this image, we have to change the fat driver without affecting good image. And your patch affects to good image, because that patch doesn't count directory correctly, so bad link count. Thanks. -- OGAWA Hirofumi