Skip to content

Commit 412106c

Browse files
committed
Merge tag 'erofs-for-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs updates from Gao Xiang: "In this cycle, direct I/O and fsdax support for uncompressed files are now added in order to avoid double-caching for loop device and VM container use cases. All uncompressed cases are now turned into iomap infrastructure, which looks much simpler and cleaner. In addition, fiemap support is added for both (un)compressed files by using iomap infrastructure as well so end users can easily get file distribution. We've also added chunk-based uncompressed files support for data deduplication as the next step of VM container use cases. Summary: - support direct I/O for all uncompressed files - support fsdax for non-tailpacking regular files - use iomap infrastructure for all uncompressed cases - support fiemap for both (un)compressed files - introduce chunk-based files for chunk deduplication - some cleanups" * tag 'erofs-for-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix double free of 'copied' erofs: support reading chunk-based uncompressed files erofs: introduce chunk-based file on-disk format erofs: add fiemap support with iomap erofs: add support for the full decompressed length erofs: remove the mapping parameter from erofs_try_to_free_cached_page() erofs: directly use wrapper erofs_page_is_managed() when shrinking erofs: convert all uncompressed cases to iomap erofs: dax support for non-tailpacking regular file erofs: iomap support for non-tailpacking DIO
2 parents 89594c7 + 1266b4a commit 412106c

File tree

10 files changed

+517
-217
lines changed

10 files changed

+517
-217
lines changed

Documentation/filesystems/erofs.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ cache_strategy=%s Select a strategy for cached decompression from now on:
8484
It still does in-place I/O decompression
8585
for the rest compressed physical clusters.
8686
========== =============================================
87+
dax={always,never} Use direct access (no page cache). See
88+
Documentation/filesystems/dax.rst.
89+
dax A legacy option which is an alias for ``dax=always``.
8790
=================== =========================================================
8891

8992
On-disk details
@@ -153,13 +156,14 @@ may not. All metadatas can be now observed in two different spaces (views):
153156

154157
Xattrs, extents, data inline are followed by the corresponding inode with
155158
proper alignment, and they could be optional for different data mappings.
156-
_currently_ total 4 valid data mappings are supported:
159+
_currently_ total 5 data layouts are supported:
157160

158161
== ====================================================================
159162
0 flat file data without data inline (no extent);
160163
1 fixed-sized output data compression (with non-compacted indexes);
161164
2 flat file data with tail packing data inline (no extent);
162-
3 fixed-sized output data compression (with compacted indexes, v5.3+).
165+
3 fixed-sized output data compression (with compacted indexes, v5.3+);
166+
4 chunk-based file (v5.15+).
163167
== ====================================================================
164168

165169
The size of the optional xattrs is indicated by i_xattr_count in inode
@@ -210,6 +214,17 @@ Note that apart from the offset of the first filename, nameoff0 also indicates
210214
the total number of directory entries in this block since it is no need to
211215
introduce another on-disk field at all.
212216

217+
Chunk-based file
218+
----------------
219+
In order to support chunk-based data deduplication, a new inode data layout has
220+
been supported since Linux v5.15: Files are split in equal-sized data chunks
221+
with ``extents`` area of the inode metadata indicating how to get the chunk
222+
data: these can be simply as a 4-byte block address array or in the 8-byte
223+
chunk index form (see struct erofs_inode_chunk_index in erofs_fs.h for more
224+
details.)
225+
226+
By the way, chunk-based files are all uncompressed for now.
227+
213228
Data compression
214229
----------------
215230
EROFS implements LZ4 fixed-sized output compression which generates fixed-sized

fs/erofs/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
config EROFS_FS
44
tristate "EROFS filesystem support"
55
depends on BLOCK
6+
select FS_IOMAP
67
select LIBCRC32C
78
help
89
EROFS (Enhanced Read-Only File System) is a lightweight

0 commit comments

Comments
 (0)