Skip to content

Commit 91d44d9

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus: Squashfs: Make ZLIB compression support optional Squashfs: Update documentation for XZ and add squashfs-tools devel tree
2 parents 2dad320 + cc6d349 commit 91d44d9

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

Documentation/filesystems/squashfs.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SQUASHFS 4.0 FILESYSTEM
22
=======================
33

44
Squashfs is a compressed read-only filesystem for Linux.
5-
It uses zlib/lzo compression to compress files, inodes and directories.
5+
It uses zlib/lzo/xz compression to compress files, inodes and directories.
66
Inodes in the system are very small and all blocks are packed to minimise
77
data overhead. Block sizes greater than 4K are supported up to a maximum
88
of 1Mbytes (default block size 128K).
@@ -55,6 +55,8 @@ create populated squashfs filesystems. This and other squashfs utilities
5555
can be obtained from http://www.squashfs.org. Usage instructions can be
5656
obtained from this site also.
5757

58+
The squashfs-tools development tree is now located on kernel.org
59+
git://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
5860

5961
3. SQUASHFS FILESYSTEM DESIGN
6062
-----------------------------

fs/squashfs/Kconfig

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
config SQUASHFS
22
tristate "SquashFS 4.0 - Squashed file system support"
33
depends on BLOCK
4-
select ZLIB_INFLATE
54
help
65
Saying Y here includes support for SquashFS 4.0 (a Compressed
76
Read-Only File System). Squashfs is a highly compressed read-only
@@ -36,6 +35,19 @@ config SQUASHFS_XATTR
3635

3736
If unsure, say N.
3837

38+
config SQUASHFS_ZLIB
39+
bool "Include support for ZLIB compressed file systems"
40+
depends on SQUASHFS
41+
select ZLIB_INFLATE
42+
default y
43+
help
44+
ZLIB compression is the standard compression used by Squashfs
45+
file systems. It offers a good trade-off between compression
46+
achieved and the amount of CPU time and memory necessary to
47+
compress and decompress.
48+
49+
If unsure, say Y.
50+
3951
config SQUASHFS_LZO
4052
bool "Include support for LZO compressed file systems"
4153
depends on SQUASHFS

fs/squashfs/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
obj-$(CONFIG_SQUASHFS) += squashfs.o
66
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
7-
squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
7+
squashfs-y += namei.o super.o symlink.o decompressor.o
88
squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o
99
squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
1010
squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o
11+
squashfs-$(CONFIG_SQUASHFS_ZLIB) += zlib_wrapper.o

fs/squashfs/decompressor.c

+6
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ static const struct squashfs_decompressor squashfs_xz_comp_ops = {
5252
};
5353
#endif
5454

55+
#ifndef CONFIG_SQUASHFS_ZLIB
56+
static const struct squashfs_decompressor squashfs_zlib_comp_ops = {
57+
NULL, NULL, NULL, ZLIB_COMPRESSION, "zlib", 0
58+
};
59+
#endif
60+
5561
static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
5662
NULL, NULL, NULL, 0, "unknown", 0
5763
};

fs/squashfs/decompressor.h

+4
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@ extern const struct squashfs_decompressor squashfs_xz_comp_ops;
5656
extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
5757
#endif
5858

59+
#ifdef CONFIG_SQUASHFS_ZLIB
60+
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
61+
#endif
62+
5963
#endif

fs/squashfs/squashfs.h

-3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,3 @@ extern const struct inode_operations squashfs_symlink_inode_ops;
9797

9898
/* xattr.c */
9999
extern const struct xattr_handler *squashfs_xattr_handlers[];
100-
101-
/* zlib_wrapper.c */
102-
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;

0 commit comments

Comments
 (0)