process_fragments: move fragment checksumming to the process fragment threads

Move fragment checksumming to the process fragment threads, and away
from the main thread.

This has a couple of minor side effects:

1. Tail end fragments (fragments belonging to files larger than the
block size) are now checksummed up front.

2. This means add_non_dup() gains an extra checksum_frag_flag,
because we now have a combination of True/False statuses for
the block checksum and the fragment checksum.  Previously, we
either had both the block checksum and fragment checksum, or neither.
(fragments pre-existing on disk on append are not checksummed up front).

3. duplicate() no longer needs the fragment checksum to be passed,
because it is contained within the file_buffer structure which
is always passed.

Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
3 files changed
tree: 4bc4149df86719ad0835fafaab760b4be356f7cc
  1. kernel/
  2. kernel-2.4/
  3. squashfs-tools/
  4. README