PD#SWPL-37734
Problem:
crash in fs if put page reference count
Solution:
1, remove modify of put page;
2, revert following changes introduced by google:
commit 60cc09a9e3
Author: Adrien Schildknecht <adriens@google.com>
Date: Thu Sep 29 15:25:30 2016 -0700
ANDROID: Squashfs: optimize reading uncompressed data
When dealing with uncompressed data, there is no need to read a whole
block (default 128K) to get the desired page: the pages are
independent from each others.
This patch change the readpages logic so that reading uncompressed
data only read the number of pages advised by the readahead algorithm.
Moreover, if the page actor contains holes (i.e. pages that are already
up-to-date), squashfs skips the buffer_head associated to those pages.
This patch greatly improve the performance of random reads for
uncompressed files because squashfs only read what is needed. It also
reduces the number of unnecessary reads.
Change-Id: I90a77343bb994a1de7482eb43eaf6d2021502c22
Signed-off-by: Adrien Schildknecht <adriens@google.com>
---------------------------------------------------
commit d840c1d772
Author: Adrien Schildknecht <adrien+dev@schischi.me>
Date: Fri Oct 14 21:03:54 2016 -0700
ANDROID: Squashfs: implement .readpages()
Squashfs does not implement .readpages(), so the kernel just repeatedly
calls .readpage().
The readpages function tries to pack as much pages as possible in the
same page actor so that only 1 read request is issued.
Now that the read requests are asynchronous, the kernel can truly
prefetch pages using its readahead algorithm.
Change-Id: I65b9aa2ddc9444aaf9ccf60781172ccca0f3f518
Signed-off-by: Adrien Schildknecht <adriens@google.com>
---------------------------------------------------
ANDROID: Squashfs: replace buffer_head with BIO
The 'll_rw_block' has been deprecated and BIO is now the basic container
for block I/O within the kernel.
Switching to BIO offers 2 advantages:
1/ It removes synchronous wait for the up-to-date buffers: SquashFS
now deals with decompressions/copies asynchronously.
Implementing an asynchronous mechanism to read data is needed to
efficiently implement .readpages().
2/ Prior to this patch, merging the read requests entirely depends on
the IO scheduler. SquashFS has more information than the IO
scheduler about what could be merged. Moreover, merging the reads
at the FS level means that we rely less on the IO scheduler.
Change-Id: I668812cc1e78e2f92497f9ebe0157cb8eec725ba
Signed-off-by: Adrien Schildknecht <adriens@google.com>
Verify:
t318
Change-Id: I9ea62393066122cd720f41d50bde6cdf925fb06a
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>