aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 01:50:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 01:50:35 -0400
commit91d44d99992ff2587104df5760bfffbb3564b3c2 (patch)
tree71316dfc11385f5594962f91d7192fdd851e86a8
parent2dad3206db5c3832cde1f58650027fea3ff7adf3 (diff)
parentcc6d3497141adedb71de8ddce62bf4cd4817832d (diff)
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
-rw-r--r--Documentation/filesystems/squashfs.txt4
-rw-r--r--fs/squashfs/Kconfig14
-rw-r--r--fs/squashfs/Makefile3
-rw-r--r--fs/squashfs/decompressor.c6
-rw-r--r--fs/squashfs/decompressor.h4
-rw-r--r--fs/squashfs/squashfs.h3
6 files changed, 28 insertions, 6 deletions
diff --git a/Documentation/filesystems/squashfs.txt b/Documentation/filesystems/squashfs.txt
index d4d41465a0b1..7db3ebda5a4c 100644
--- a/Documentation/filesystems/squashfs.txt
+++ b/Documentation/filesystems/squashfs.txt
@@ -2,7 +2,7 @@ SQUASHFS 4.0 FILESYSTEM
2======================= 2=======================
3 3
4Squashfs is a compressed read-only filesystem for Linux. 4Squashfs is a compressed read-only filesystem for Linux.
5It uses zlib/lzo compression to compress files, inodes and directories. 5It uses zlib/lzo/xz compression to compress files, inodes and directories.
6Inodes in the system are very small and all blocks are packed to minimise 6Inodes in the system are very small and all blocks are packed to minimise
7data overhead. Block sizes greater than 4K are supported up to a maximum 7data overhead. Block sizes greater than 4K are supported up to a maximum
8of 1Mbytes (default block size 128K). 8of 1Mbytes (default block size 128K).
@@ -55,6 +55,8 @@ create populated squashfs filesystems. This and other squashfs utilities
55can be obtained from http://www.squashfs.org. Usage instructions can be 55can be obtained from http://www.squashfs.org. Usage instructions can be
56obtained from this site also. 56obtained from this site also.
57 57
58The squashfs-tools development tree is now located on kernel.org
59 git://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
58 60
593. SQUASHFS FILESYSTEM DESIGN 613. SQUASHFS FILESYSTEM DESIGN
60----------------------------- 62-----------------------------
diff --git a/fs/squashfs/Kconfig b/fs/squashfs/Kconfig
index 7797218d0b30..1360d4f88f41 100644
--- a/fs/squashfs/Kconfig
+++ b/fs/squashfs/Kconfig
@@ -1,7 +1,6 @@
1config SQUASHFS 1config SQUASHFS
2 tristate "SquashFS 4.0 - Squashed file system support" 2 tristate "SquashFS 4.0 - Squashed file system support"
3 depends on BLOCK 3 depends on BLOCK
4 select ZLIB_INFLATE
5 help 4 help
6 Saying Y here includes support for SquashFS 4.0 (a Compressed 5 Saying Y here includes support for SquashFS 4.0 (a Compressed
7 Read-Only File System). Squashfs is a highly compressed read-only 6 Read-Only File System). Squashfs is a highly compressed read-only
@@ -36,6 +35,19 @@ config SQUASHFS_XATTR
36 35
37 If unsure, say N. 36 If unsure, say N.
38 37
38config 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
39config SQUASHFS_LZO 51config SQUASHFS_LZO
40 bool "Include support for LZO compressed file systems" 52 bool "Include support for LZO compressed file systems"
41 depends on SQUASHFS 53 depends on SQUASHFS
diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile
index cecf2bea07af..110b0476f3b4 100644
--- a/fs/squashfs/Makefile
+++ b/fs/squashfs/Makefile
@@ -4,7 +4,8 @@
4 4
5obj-$(CONFIG_SQUASHFS) += squashfs.o 5obj-$(CONFIG_SQUASHFS) += squashfs.o
6squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o 6squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
7squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o 7squashfs-y += namei.o super.o symlink.o decompressor.o
8squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o 8squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o
9squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o 9squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
10squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o 10squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o
11squashfs-$(CONFIG_SQUASHFS_ZLIB) += zlib_wrapper.o
diff --git a/fs/squashfs/decompressor.c b/fs/squashfs/decompressor.c
index 9f1b0bb96f13..3f6271d86abc 100644
--- a/fs/squashfs/decompressor.c
+++ b/fs/squashfs/decompressor.c
@@ -52,6 +52,12 @@ static const struct squashfs_decompressor squashfs_xz_comp_ops = {
52}; 52};
53#endif 53#endif
54 54
55#ifndef CONFIG_SQUASHFS_ZLIB
56static const struct squashfs_decompressor squashfs_zlib_comp_ops = {
57 NULL, NULL, NULL, ZLIB_COMPRESSION, "zlib", 0
58};
59#endif
60
55static const struct squashfs_decompressor squashfs_unknown_comp_ops = { 61static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
56 NULL, NULL, NULL, 0, "unknown", 0 62 NULL, NULL, NULL, 0, "unknown", 0
57}; 63};
diff --git a/fs/squashfs/decompressor.h b/fs/squashfs/decompressor.h
index 8ba70cff09a6..330073e29029 100644
--- a/fs/squashfs/decompressor.h
+++ b/fs/squashfs/decompressor.h
@@ -56,4 +56,8 @@ extern const struct squashfs_decompressor squashfs_xz_comp_ops;
56extern const struct squashfs_decompressor squashfs_lzo_comp_ops; 56extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
57#endif 57#endif
58 58
59#ifdef CONFIG_SQUASHFS_ZLIB
60extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
61#endif
62
59#endif 63#endif
diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h
index e3be6a71cfa7..d1266516ed08 100644
--- a/fs/squashfs/squashfs.h
+++ b/fs/squashfs/squashfs.h
@@ -97,6 +97,3 @@ extern const struct inode_operations squashfs_symlink_inode_ops;
97 97
98/* xattr.c */ 98/* xattr.c */
99extern const struct xattr_handler *squashfs_xattr_handlers[]; 99extern const struct xattr_handler *squashfs_xattr_handlers[];
100
101/* zlib_wrapper.c */
102extern const struct squashfs_decompressor squashfs_zlib_comp_ops;