Squashfs: refactor page_actor
authorAdrien Schildknecht <adriens@google.com>
Wed, 28 Sep 2016 20:59:18 +0000 (13:59 -0700)
committerDaniel Rosenberg <drosen@google.com>
Thu, 9 Feb 2017 04:03:50 +0000 (04:03 +0000)
commit417aca479b15292460e981f969d3bcb7fb89517c
treedcd3eaa648de4810ad6855407ee2a0a18303c503
parent50dcddba6c11f2156b4dfefa87e86d961f46b89e
Squashfs: refactor page_actor

This patch essentially does 3 things:
  1/ Always use an array of page to store the data instead of a mix of
     buffers and pages.
  2/ It is now possible to have 'holes' in a page actor, i.e. NULL
     pages in the array.
     When reading a block (default 128K), squashfs tries to grab all
     the pages covering this block. If a single page is up-to-date or
     locked, it falls back to using an intermediate buffer to do the
     read and then copy the pages in the actor. Allowing holes in the
     page actor remove the need for this intermediate buffer.
  3/ Refactor the wrappers to share code that deals with page actors.

Signed-off-by: Adrien Schildknecht <adriens@google.com>
Change-Id: I98128bed5d518cf31b67e788a85b275e9a323bec
fs/squashfs/cache.c
fs/squashfs/decompressor.c
fs/squashfs/file_direct.c
fs/squashfs/lz4_wrapper.c
fs/squashfs/lzo_wrapper.c
fs/squashfs/page_actor.c
fs/squashfs/page_actor.h
fs/squashfs/squashfs_fs_sb.h
fs/squashfs/xz_wrapper.c
fs/squashfs/zlib_wrapper.c