aboutsummaryrefslogtreecommitdiff
path: root/fs/squashfs/cache.c
Commit message (Collapse)AuthorAgeFilesLines
* Squashfs: refactor page_actorAdrien Schildknecht2017-04-111-44/+29
| | | | | | | | | | | | | | | | | 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: I73f736611766962857c423320478af8cfab8df38
* Squashfs: Generalise paging handling in the decompressorsPhillip Lougher2017-04-111-5/+23
| | | | | | | | | | | | | | | | | | | | | | Further generalise the decompressors by adding a page handler abstraction. This adds helpers to allow the decompressors to access and process the output buffers in an implementation independant manner. This allows different types of output buffer to be passed to the decompressors, with the implementation specific aspects handled at decompression time, but without the knowledge being held in the decompressor wrapper code. This will allow the decompressors to handle Squashfs cache buffers, and page cache pages. This patch adds the abstraction and an implementation for the caches. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> Reviewed-by: Minchan Kim <minchan@kernel.org> Change-Id: I5f9bcb7e60de194d20418993def49e4b981dae99
* first commitMeizu OpenSource2016-08-151-0/+440