From a9536fe9d0d2a01bf2b168e742736b014723c99b Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 8 Jul 2022 17:08:34 +0200 Subject: Fix: libfstree: actually use a full 32 bit hard link counter The squashfs on-disk format uses 32 bit link counters, but the fstree used 16 bit ones. Because the link count also includes child nodes, this artificially limited the number of entries in a directory to ~64k files. This patch removes the limit by switching libfstree to 32 bit counters. Reported-by: Marvin Renich Signed-off-by: David Oberhollenzer --- include/fstree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/fstree.h b/include/fstree.h index 6628540..e227f02 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -64,8 +64,8 @@ struct tree_node_t { sqfs_u32 gid; sqfs_u32 inode_num; sqfs_u32 mod_time; + sqfs_u32 link_count; sqfs_u16 mode; - sqfs_u16 link_count; /* SquashFS inode refernce number. 32 bit offset of the meta data block start (relative to inode table start), shifted left by 16 -- cgit v1.2.3