linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fat: add support for directories without . and .. entries
@ 2024-06-25 17:51 Thadeu Lima de Souza Cascardo
  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
  0 siblings, 2 replies; 8+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2024-06-25 17:51 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: OGAWA Hirofumi, linux-kernel, Gwendal Grignou, dlunev,
	Thadeu Lima de Souza Cascardo

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-27 15:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 17:51 [PATCH v2 0/2] fat: add support for directories without . and .. entries Thadeu Lima de Souza Cascardo
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

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).