<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/squashfs/file_cache.c, branch v5.1</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Squashfs: Compute expected length from inode size rather than block length</title>
<updated>2018-08-02T16:34:02+00:00</updated>
<author>
<name>Phillip Lougher</name>
<email>phillip@squashfs.org.uk</email>
</author>
<published>2018-08-02T15:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a3f94cb99a854fa381fe7fadd97c4f61633717a5'/>
<id>a3f94cb99a854fa381fe7fadd97c4f61633717a5</id>
<content type='text'>
Previously in squashfs_readpage() when copying data into the page
cache, it used the length of the datablock read from the filesystem
(after decompression).  However, if the filesystem has been corrupted
this data block may be short, which will leave pages unfilled.

The fix for this is to compute the expected number of bytes to copy
from the inode size, and use this to detect if the block is short.

Signed-off-by: Phillip Lougher &lt;phillip@squashfs.org.uk&gt;
Tested-by: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Анатолий Тросиненко &lt;anatoly.trosinenko@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously in squashfs_readpage() when copying data into the page
cache, it used the length of the datablock read from the filesystem
(after decompression).  However, if the filesystem has been corrupted
this data block may be short, which will leave pages unfilled.

The fix for this is to compute the expected number of bytes to copy
from the inode size, and use this to detect if the block is short.

Signed-off-by: Phillip Lougher &lt;phillip@squashfs.org.uk&gt;
Tested-by: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Анатолий Тросиненко &lt;anatoly.trosinenko@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Squashfs: Restructure squashfs_readpage()</title>
<updated>2013-11-20T03:59:07+00:00</updated>
<author>
<name>Phillip Lougher</name>
<email>phillip@squashfs.org.uk</email>
</author>
<published>2013-10-31T19:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5f55dbc0c5c466a9cdfa4da7ac1bfe351c7fc52a'/>
<id>5f55dbc0c5c466a9cdfa4da7ac1bfe351c7fc52a</id>
<content type='text'>
Restructure squashfs_readpage() splitting it into separate
functions for datablocks, fragments and sparse blocks.

Move the memcpying (from squashfs cache entry) implementation of
squashfs_readpage_block into file_cache.c

This allows different implementations to be supported.

Signed-off-by: Phillip Lougher &lt;phillip@squashfs.org.uk&gt;
Reviewed-by: Minchan Kim &lt;minchan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Restructure squashfs_readpage() splitting it into separate
functions for datablocks, fragments and sparse blocks.

Move the memcpying (from squashfs cache entry) implementation of
squashfs_readpage_block into file_cache.c

This allows different implementations to be supported.

Signed-off-by: Phillip Lougher &lt;phillip@squashfs.org.uk&gt;
Reviewed-by: Minchan Kim &lt;minchan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
