<feed xmlns='http://www.w3.org/2005/Atom'>
<title>squashfs-tools-ng.git/lib/sqfs/block_processor, branch v1.1.0</title>
<subtitle>A new set of tools and libraries for working with SquashFS images</subtitle>
<id>https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.1.0</id>
<link rel='self' href='https://git.infraroot.at/squashfs-tools-ng.git/atom?h=v1.1.0'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/'/>
<updated>2021-03-25T13:47:06+00:00</updated>
<entry>
<title>Fix fail branch in block processor fragment backend</title>
<updated>2021-03-25T13:47:06+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-25T13:47:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=62a3a2e1ab14ca97a91376a6cc99be63c05db480'/>
<id>urn:sha1:62a3a2e1ab14ca97a91376a6cc99be63c05db480</id>
<content type='text'>
Only clean up the fragment if it hasn't been re-assigned to the
fragment block. The NULL check is definitely wrong, because we
no longer re-assign it as NULL.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix block processor queue accounting</title>
<updated>2021-03-24T13:05:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-24T12:59:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=14d0d4d55ed579c471ec24c03cb3808d4d721a79'/>
<id>urn:sha1:14d0d4d55ed579c471ec24c03cb3808d4d721a79</id>
<content type='text'>
Dequeuing won't work if we have a backlog of 1 or 2 and the blocks
are used for internal buffering. Take that into account, similar to
the sync code. Also bump the minimum backlog to 3, just to make
absolutely sure we cannot run into a dequeue loop trying to allocate
a block.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>block processor: Re-implement exact fragment matching</title>
<updated>2021-03-23T10:39:52+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-23T10:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=947670d992454033a13c70e36a53a2ac10b3d6ad'/>
<id>urn:sha1:947670d992454033a13c70e36a53a2ac10b3d6ad</id>
<content type='text'>
In the hash-table equals callback, if the hash and size match, do an
exact, byte-for-byte comparison of the fragment in question. The
fragment can either be in a fragment block that is in-flight (for which
we have the in-flight list), in the current, unfinished fragment block,
or it can be on disk.

In the later case, the fragment block is resolved through the fragment
table and read back from disk into a scratch buffer and decompressed.
After that, the fragment is checked for byte-for-byte equality with
the one we resolved through the hash table.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>block processor: keep duplicate copies of in-flight fragment blocks</title>
<updated>2021-03-23T10:00:49+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-22T10:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=cb8b925130c0ff5cdb445ad36fde47ca4f58e645'/>
<id>urn:sha1:cb8b925130c0ff5cdb445ad36fde47ca4f58e645</id>
<content type='text'>
If we want full, byte-for byte, verification of fragments during
de-duplication we need to check back with the blocks already written
to disk, or with the ones that are in flight.

The previous, extremely hacky approach simply locked up the thread
pool and investigated the queues. For the new approach, we treat the
thread pool as completely opaque and don't try to touch it.

This commit modifies the block processor to keep duplicate copies of
each submitted fragment block around, that are cleaned up once the
block is dequeued and written to disk. So instead of touching the
thread pool, we can simply investigate the in-fligth-block list and
the current block, before resorting to reading back fragment blocks
from the file.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>block processor: simplify backlog accounting</title>
<updated>2021-03-22T20:09:54+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-22T15:20:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=e8cc53ad5fbac2cb2f578091125dc506f136bfde'/>
<id>urn:sha1:e8cc53ad5fbac2cb2f578091125dc506f136bfde</id>
<content type='text'>
Simply count the number of blocks we hand out (malloc'ed or recycled)
and decrease the counter when we put blocks back for recycling.

The sync() part becomes a little more complicated, because we can get
stuck with a backlog of 1 or 2 because we have a fragment or current
block buffer in use. We also need to accout for this when creating the
processor, because we need to be able to request at least 2 blocks
without stalling.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup the block processor file structure</title>
<updated>2021-03-22T14:26:47+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-22T10:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=5aa0f30173ecf3b6538b9136cb4783fc19266288'/>
<id>urn:sha1:5aa0f30173ecf3b6538b9136cb4783fc19266288</id>
<content type='text'>
A cleaner separation between common code, frontend code and backend
code is made.

The "is this byte blob zero" function is moved out to libutil (with
test case and everything) with a more optimized implementation.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Fix missing error code initialization</title>
<updated>2021-03-21T16:41:47+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-21T16:41:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=c7056c1853b5defd5b933e651bf58dc94b4d3f8b'/>
<id>urn:sha1:c7056c1853b5defd5b933e651bf58dc94b4d3f8b</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: Rewrite block processor to use the libutil thread_pool_t</title>
<updated>2021-03-21T16:29:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-03-21T15:59:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=bb0ef9e0eec5c27610fe381b905ef46b3f5f09c6'/>
<id>urn:sha1:bb0ef9e0eec5c27610fe381b905ef46b3f5f09c6</id>
<content type='text'>
Throw out the messy thread pool implementation and temporarily also
remove the exact fragment matching for simplicity.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Always use the correct data type for realloc return value</title>
<updated>2021-02-10T11:19:36+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-02-10T11:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=3df53d76b5aeccd29ed7d50d5c798d50fd37ea3e'/>
<id>urn:sha1:3df53d76b5aeccd29ed7d50d5c798d50fd37ea3e</id>
<content type='text'>
This commit mainly serves the static analysis tooling.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>libsqfs: Implement exact matching of fragments</title>
<updated>2021-01-19T05:01:51+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2021-01-15T23:23:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/squashfs-tools-ng.git/commit/?id=8026849fda277f54a2a3e4fa5cf5d183cbc84bef'/>
<id>urn:sha1:8026849fda277f54a2a3e4fa5cf5d183cbc84bef</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
