linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
To: linux-fsdevel@vger.kernel.org
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	linux-kernel@vger.kernel.org,
	Gwendal Grignou <gwendal@chromium.org>,
	dlunev@chromium.org,
	Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Subject: [PATCH v2 0/2] fat: add support for directories without . and .. entries
Date: Tue, 25 Jun 2024 14:51:31 -0300	[thread overview]
Message-ID: <20240625175133.922758-1-cascardo@igalia.com> (raw)

Some FAT filesystems do not have . and .. entries in some directories.
Currently, such filesystems are not mounted because such directories will
have no links. They are also corrupted as inodes are evicted and that leads
to such directories clusters being marked as freed. Later mounts will then
error out when finding such clusters.

These two commits allow those filesystems to be mounted and . and .. to
still appear when listing such directories.

v2:
- Also ignore the absence of . directory and always have at least two links.
- Add a second commit to always emit . and .. at readdir.

Thadeu Lima de Souza Cascardo (2):
  fat: ignore . and .. subdirs and always add links to dirs
  fat: always use dir_emit_dots and ignore . and .. entries

 fs/fat/dir.c   | 28 ++++++++++++----------------
 fs/fat/inode.c |  2 +-
 2 files changed, 13 insertions(+), 17 deletions(-)

-- 
2.34.1


             reply	other threads:[~2024-06-25 17:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25 17:51 Thadeu Lima de Souza Cascardo [this message]
2024-06-25 17:51 ` [PATCH v2 1/2] fat: ignore . and .. subdirs and always add links to dirs Thadeu Lima de Souza Cascardo
2024-06-25 17:51 ` [PATCH v2 2/2] fat: always use dir_emit_dots and ignore . and .. entries Thadeu Lima de Souza Cascardo
2024-06-25 21:47   ` OGAWA Hirofumi
2024-06-26 19:46     ` Thadeu Lima de Souza Cascardo
2024-06-26 20:10       ` OGAWA Hirofumi
2024-06-27 12:51         ` Thadeu Lima de Souza Cascardo
2024-06-27 15:28           ` OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240625175133.922758-1-cascardo@igalia.com \
    --to=cascardo@igalia.com \
    --cc=dlunev@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).