squashfs-add-a-commment-and-fix-some-other-comments.patch 1.3 KB

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