Age | Commit message (Collapse) | Author |
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
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 <mrvn@renich.org>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
If the hard link counter or the inode number counter overflow the
maximum representable value (for SquashFS 16 bit and 32 bit
respecitively), abort with an error message.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- For now, enforce that hard links don't point to a directories.
- Instead of doing the swaping trickery, just reorder the flat list
and hand out new inode numbers.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
In libfstree, add a function to add a hard link to the fstree. The
hard links stores the target in the data.target field, canonicalizes
the target and sets a sentinel mode. A second function is used to
resolve link, i.e. replacing it with a direct pointer, setting another
sentinel mode and increasing the targets link count.
The post process function tries to resolve unresolved hard links and
only allocates inode numbers for nodes that aren't hard links. If the
target node of a hard link does not have an inode number yet, the two
need to be swapped, since this is also the order in which they are
serialized.
The serialization function in libcommon simply has to skip hard link
nodes and when writing directory entries, use the inode num/ref of
the target node.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|