Files
linux/fs
Gao Xiang dcd77f0b74 UPSTREAM: erofs: fix 1 lcluster-sized pcluster for big pcluster
If the 1st NONHEAD lcluster of a pcluster isn't CBLKCNT lcluster type
rather than a HEAD or PLAIN type instead, which means its pclustersize
_must_ be 1 lcluster (since its uncompressed size < 2 lclusters),
as illustrated below:

       HEAD     HEAD / PLAIN    lcluster type
   ____________ ____________
  |_:__________|_________:__|   file data (uncompressed)
   .                .
  .____________.
  |____________|                pcluster data (compressed)

Such on-disk case was explained before [1] but missed to be handled
properly in the runtime implementation.

It can be observed if manually generating 1 lcluster-sized pcluster
with 2 lclusters (thus CBLKCNT doesn't exist.) Let's fix it now.

[1] https://lore.kernel.org/r/20210407043927.10623-1-xiang@kernel.org

Link: https://lore.kernel.org/r/20210510064715.29123-1-xiang@kernel.org
Fixes: cec6e93bea ("erofs: support parsing big pcluster compress indexes")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <xiang@kernel.org>

Bug: 201372112
Change-Id: I7e46baa993790f8908287ac36e19d32e536116db
(cherry picked from commit 0852b6ca94)
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
2021-09-28 08:33:46 +00:00
..
2020-12-09 08:09:26 +01:00
2021-06-03 18:47:38 +02:00
2020-10-16 11:11:22 -07:00
2021-06-12 14:48:14 +02:00
2021-05-22 15:34:48 +02:00
2021-06-03 18:47:38 +02:00
2021-05-19 10:12:52 +02:00
2021-06-12 14:48:14 +02:00
2021-06-12 14:48:14 +02:00
2021-05-20 15:35:25 +02:00
2021-04-09 09:29:17 +02:00
2021-05-13 14:22:11 +02:00
2021-03-07 12:53:30 +01:00
2021-06-03 18:47:38 +02:00
2021-01-19 09:33:21 +01:00
2021-06-12 14:48:14 +02:00
2021-05-13 14:22:11 +02:00
2021-05-15 09:28:55 +02:00
2021-06-03 18:47:38 +02:00
2021-04-15 14:23:41 +02:00
2021-05-13 14:22:11 +02:00
2020-08-04 21:02:38 -04:00
2020-09-22 23:45:57 -04:00
2020-07-31 08:16:01 +02:00
2021-02-18 11:21:01 +01:00
2020-05-14 16:44:24 +02:00
2021-04-15 14:23:41 +02:00
2020-08-27 16:06:47 -04:00
2020-06-25 14:25:32 +02:00
2020-07-31 08:16:01 +02:00