1 Upstream-Status: Backport
3 unsquashfs: add a commment and fix some other comments
5 Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
7 diff -urpN a/unsquashfs.c b/unsquashfs.c
8 --- a/unsquashfs.c 2012-11-30 15:27:14.000000000 +0800
9 +++ b/unsquashfs.c 2012-11-30 15:27:56.000000000 +0800
10 @@ -814,7 +814,7 @@ int write_file(struct inode *inode, char
13 * the writer thread is queued a squashfs_file structure describing the
14 - * file. If the file has one or more blocks or a fragments they are
15 + * file. If the file has one or more blocks or a fragment they are
16 * queued separately (references to blocks in the cache).
19 @@ -838,7 +838,7 @@ int write_file(struct inode *inode, char
21 block->size = i == file_end ? inode->data & (block_size - 1) :
23 - if(block_list[i] == 0) /* sparse file */
24 + if(block_list[i] == 0) /* sparse block */
27 block->buffer = cache_get(data_cache, start,
28 @@ -2161,6 +2161,10 @@ options:
29 block_size = sBlk.s.block_size;
30 block_log = sBlk.s.block_log;
33 + * convert from queue size in Mbytes to queue size in
36 fragment_buffer_size <<= 20 - block_log;
37 data_buffer_size <<= 20 - block_log;
38 initialise_threads(fragment_buffer_size, data_buffer_size);