Skip to content

Commit b5b3097

Browse files
committed
Merge tag 'erofs-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs updates from Gao Xiang: "In this cycle, we would like to introduce a new feature called big pcluster so EROFS can compress file data into more than 1 fs block and different pcluster size can be selected for each (sub-)files by design. The current EROFS test results on my laptop are [1]: Testscript: erofs-openbenchmark Testdata: enwik9 (1000000000 bytes) ________________________________________________________________ | file system | size | seq read | rand read | rand9m read | |_______________|___________|_ MiB/s __|__ MiB/s __|___ MiB/s ___| |___erofs_4k____|_556879872_|_ 781.4 __|__ 55.3 ___|___ 25.3 ___| |___erofs_16k___|_452509696_|_ 864.8 __|_ 123.2 ___|___ 20.8 ___| |___erofs_32k___|_415223808_|_ 899.8 __|_ 105.8 _*_|___ 16.8 ____| |___erofs_64k___|_393814016_|_ 906.6 __|__ 66.6 _*_|___ 11.8 ____| |__squashfs_8k__|_556191744_|_ 64.9 __|__ 19.3 ___|____ 9.1 ____| |__squashfs_16k_|_502661120_|_ 98.9 __|__ 38.0 ___|____ 9.8 ____| |__squashfs_32k_|_458784768_|_ 115.4 __|__ 71.6 _*_|___ 10.0 ____| |_squashfs_128k_|_398204928_|_ 257.2 __|_ 253.8 _*_|___ 10.9 ____| |____ext4_4k____|____()_____|_ 786.6 __|__ 28.6 ___|___ 27.8 ____| which has been verified but I'd like warn it as experimental for a while. This matches erofs-utils dev branch and I'll also release a new userspace version for this later. Apart from that, several improvements are also included: eg complete a missing case for inplace I/O, optimize endio decompression logic for non-atomic contexts and support adjustable sliding window size, ... In addition to those, there are some cleanups as always. Summary: - avoid memory failure when applying rolling decompression - optimize endio decompression logic for non-atomic contexts - complete a missing case which can be safely selected for inplace I/O and thus decreasing more memory footprint - check unsupported on-disk inode i_format strictly - support adjustable lz4 sliding window size to decrease runtime memory footprint - support on-disk compression configurations - support big pcluster decompression - several code cleanups / spelling correction" * tag 'erofs-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: (21 commits) erofs: enable big pcluster feature erofs: support decompress big pcluster for lz4 backend erofs: support parsing big pcluster compact indexes erofs: support parsing big pcluster compress indexes erofs: adjust per-CPU buffers according to max_pclusterblks erofs: add big physical cluster definition erofs: fix up inplace I/O pointer for big pcluster erofs: introduce physical cluster slab pools erofs: introduce multipage per-CPU buffers erofs: reserve physical_clusterbits[] erofs: Clean up spelling mistakes found in fs/erofs erofs: add on-disk compression configurations erofs: introduce on-disk lz4 fs configurations erofs: support adjust lz4 history window size erofs: introduce erofs_sb_has_xxx() helpers erofs: add unsupported inode i_format check erofs: don't use erofs_map_blocks() any more erofs: complete a missing case for inplace I/O erofs: use sync decompression for atomic contexts only erofs: use workqueue decompression for atomic contexts only ...
2 parents befbfe0 + 8e6c8fa commit b5b3097

13 files changed

Lines changed: 887 additions & 307 deletions

File tree

fs/erofs/Kconfig

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,3 @@ config EROFS_FS_ZIP
7676

7777
If you don't want to enable compression feature, say N.
7878

79-
config EROFS_FS_CLUSTER_PAGE_LIMIT
80-
int "EROFS Cluster Pages Hard Limit"
81-
depends on EROFS_FS_ZIP
82-
range 1 256
83-
default "1"
84-
help
85-
Indicates maximum # of pages of a compressed
86-
physical cluster.
87-
88-
For example, if files in a image were compressed
89-
into 8k-unit, hard limit should not be configured
90-
less than 2. Otherwise, the image will be refused
91-
to mount on this kernel.
92-

fs/erofs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

33
obj-$(CONFIG_EROFS_FS) += erofs.o
4-
erofs-objs := super.o inode.o data.o namei.o dir.o utils.o
4+
erofs-objs := super.o inode.o data.o namei.o dir.o utils.o pcpubuf.o
55
erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o
66
erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o

fs/erofs/data.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,6 @@ static int erofs_map_blocks_flatmode(struct inode *inode,
109109
return err;
110110
}
111111

112-
int erofs_map_blocks(struct inode *inode,
113-
struct erofs_map_blocks *map, int flags)
114-
{
115-
if (erofs_inode_is_data_compressed(EROFS_I(inode)->datalayout)) {
116-
int err = z_erofs_map_blocks_iter(inode, map, flags);
117-
118-
if (map->mpage) {
119-
put_page(map->mpage);
120-
map->mpage = NULL;
121-
}
122-
return err;
123-
}
124-
return erofs_map_blocks_flatmode(inode, map, flags);
125-
}
126-
127112
static inline struct bio *erofs_read_raw_page(struct bio *bio,
128113
struct address_space *mapping,
129114
struct page *page,
@@ -159,7 +144,7 @@ static inline struct bio *erofs_read_raw_page(struct bio *bio,
159144
erofs_blk_t blknr;
160145
unsigned int blkoff;
161146

162-
err = erofs_map_blocks(inode, &map, EROFS_GET_BLOCKS_RAW);
147+
err = erofs_map_blocks_flatmode(inode, &map, EROFS_GET_BLOCKS_RAW);
163148
if (err)
164149
goto err_out;
165150

@@ -318,7 +303,7 @@ static sector_t erofs_bmap(struct address_space *mapping, sector_t block)
318303
return 0;
319304
}
320305

321-
if (!erofs_map_blocks(inode, &map, EROFS_GET_BLOCKS_RAW))
306+
if (!erofs_map_blocks_flatmode(inode, &map, EROFS_GET_BLOCKS_RAW))
322307
return erofs_blknr(map.m_pa);
323308

324309
return 0;

0 commit comments

Comments
 (0)