Files
linux/fs
Tao Zeng 17ee56708e fs: fix crash in squash fs [1/1]
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>
2023-04-21 13:52:37 +09:00
..
2018-07-11 16:40:16 +02:00
2017-08-06 18:59:43 -07:00
2018-05-30 13:19:56 +02:00
2016-05-20 17:58:30 -07:00
2018-05-30 13:19:56 +02:00
2018-07-03 18:27:19 +02:00
2018-05-30 13:19:56 +02:00
2017-11-30 08:39:04 +00:00
2018-05-19 14:06:17 +02:00
2018-07-03 18:27:19 +02:00
2018-04-24 11:26:46 +02:00
2018-05-30 13:19:56 +02:00
2023-04-21 13:52:37 +09:00
2018-07-03 11:23:17 +02:00
2018-06-06 16:44:38 +02:00
2018-03-05 15:34:36 +08:00
2017-06-14 15:06:00 +02:00
2016-09-27 21:20:53 -04:00
2017-07-05 16:18:14 +02:00
2018-05-30 13:19:56 +02:00
2017-09-07 10:32:23 +02:00
2017-07-21 08:55:50 +02:00
2016-09-27 18:47:38 -04:00
2018-05-16 11:39:34 +02:00
2017-09-20 09:59:51 +02:00
2017-09-26 00:32:37 -07:00
2017-09-26 00:32:37 -07:00
2018-02-17 13:21:15 +01:00
2017-07-12 17:07:29 +02:00
2017-07-21 08:55:50 +02:00
2017-06-14 15:06:01 +02:00
2018-03-05 07:38:41 +01:00
2017-12-20 10:51:15 +01:00