Age | Commit message (Collapse) | Author |
|
Partially revers 2b7df394057c013fd042b85a4d5fd0104ba4a9be.
Making the queue fill the entire RAM had some unintended side
effects that need further investigation. For now, revert back
to the old behaviour.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
After the last modification, the directory index size counter
no longer counts the size, but the number of index entries. To
avoid future confusion, remove the thing entirely and compute
the size on the fly.
Furthermore, eliminate unaligned memory writes and fix the
darn counter once again.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Apparently mksquashfs writes an actual usage count (1 = 1 entry,
2 = 2 entries; i.e. NOT off by one).
Also, if it does happen to be garbage, guard against an overflow.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of using int or unsigned int for generic function flag
arguments, consistently use an unsigned, fixed size type.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Until now, filenames containing '/' or being equal to '..' or '.' where
not handled explicitly, because they are canonicalized later, which
will then fail.
This commit adds an explicit check to make those fail immediately with
a clear, specific error message.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Its the only user. The other code doesn't touch raw file
descriptors anymore.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
It's only ever used for padding tarballs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
That is IMO less confusing and express what it is (i.e. what it has
become) more clearly, i.e. common code shared by the utilities.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
It only contains helpers for _common_ stuff for all the utilities. The
actual high level stuff has been moved to libsquashfs a while ago.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Before the misspelled version has a chance to become stable API.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- Padd the compressor config union
- 128 bytes aught to be enough for everyone, i.e. future compressors.
- Insist that the padding space is initialized to 0. If a field gets
added to an existing compressor, it can test for 0 as a sentinel
value.
- Add a size field to the hook structure, aka "the Microsoft way".
- The explanation is in the comment.
- Don't make the Microsoft mistake of checking for >=, insist on *exact*
size match. Future users will need a fallback if their hooks are
rejected. But at least they will be rejected instead of silently not
being used.
- Add an unsupported flag check to the dir tree reader.
- Add a basic abi unit test that, for now, checks the size of the compressor
config struct fields.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Problem only showed up on a different machine and went unnoticed
earlier.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Instead of defaulting to -j 1 and -Q 10 times the job count if no option is
provided, let tar2sqfs and gensquashfs use all available CPUs and about
roughly half the available RAM, if this information can be gathered.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Combines all the type depenend attribute setting and inode type
promotion into a single function.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
This commit modifies the dir writer to store the directory index directly
in the payload area of the inode it creates. The size of the index in bytes
is stored in a seperate field. Storing the index is moved to the write
inode function.
The read inode function is in turn also modified to read the directory
index from disk and actually store it in the inode structure in memory
for later use.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
- str_table_t is used by libsquashfs; Don't write to stderr, report
an error code instead.
- Fix the comments about that and fix the SPDX license identifier
while we're at it.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
SquashFS restores the file mode from the type, so those bits are
completely redundant.
On a side note: this also reduces entropy, allowing the compressor
to *maybe* squeeze a few more bytes out.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
The file_info_t no longer stores the size or other such information,
so there is no need to do a stat on the input file. This also means
that gensquashfs no longer needs to change the working directory when
using the function.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
If we don't store the padding location in the deduplication list,
the block deduplication might try to deduplicate across two files
with padding in between, which can't be done.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
Same rational as for the dir-scanner code: It's actually the only user and
it is going to get a lot closer integerated with libsquashfs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
It's actually the only user and the dir-scanner xattr code is going
to get a lot closer integerated with libsquashfs.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|
|
If there were no key-value pairs recoreded during the lifetime of the
xattr writer, take a short cut out of the flush function and set the
super block values to indicate that.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
|