SOURCES: kernel-desktop-squashfs.patch - updated, from squashfs3.1...
sparky
sparky at pld-linux.org
Sun Nov 19 01:24:39 CET 2006
Author: sparky Date: Sun Nov 19 00:24:39 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated, from squashfs3.1-r2, for 2.6.18.1
---- Files affected:
SOURCES:
kernel-desktop-squashfs.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/kernel-desktop-squashfs.patch
diff -u SOURCES/kernel-desktop-squashfs.patch:1.1 SOURCES/kernel-desktop-squashfs.patch:1.2
--- SOURCES/kernel-desktop-squashfs.patch:1.1 Mon Jun 19 13:39:04 2006
+++ SOURCES/kernel-desktop-squashfs.patch Sun Nov 19 01:24:33 2006
@@ -1,20 +1,20 @@
-diff --new-file -urp linux-2.6.15/fs/Kconfig linux-2.6.15-squashfs3.0/fs/Kconfig
---- linux-2.6.15/fs/Kconfig 2006-03-01 22:37:27.000000000 +0000
-+++ linux-2.6.15-squashfs3.0/fs/Kconfig 2006-03-07 21:12:37.000000000 +0000
-@@ -1151,6 +1151,71 @@ config CRAMFS
+diff --new-file -urp linux-2.6.8.1/fs/Kconfig linux-2.6.8.1-squashfs3.1/fs/Kconfig
+--- linux-2.6.8.1/fs/Kconfig 2004-08-14 11:55:33.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/fs/Kconfig 2006-08-20 01:16:58.000000000 +0100
+@@ -1231,6 +1231,71 @@ config CRAMFS
If unsure, say N.
+config SQUASHFS
-+ tristate "SquashFS 3.0 - Squashed file system support"
++ tristate "SquashFS 3.1 - Squashed file system support"
+ select ZLIB_INFLATE
+ help
-+ Saying Y here includes support for SquashFS 3.0 (a Compressed Read-Only File
++ Saying Y here includes support for SquashFS 3.1 (a Compressed Read-Only File
+ System). Squashfs is a highly compressed read-only filesystem for Linux.
+ It uses zlib compression to compress both files, inodes and directories.
+ Inodes in the system are very small and all blocks are packed to minimise
+ data overhead. Block sizes greater than 4K are supported up to a maximum of 64K.
-+ SquashFS 3.0 supports 64 bit filesystems and files (larger than 4GB), full
++ SquashFS 3.1 supports 64 bit filesystems and files (larger than 4GB), full
+ uid/gid information, hard links and timestamps.
+
+ Squashfs is intended for general read-only filesystem use, for archival
@@ -73,10 +73,10 @@
config VXFS_FS
tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
help
-diff --new-file -urp linux-2.6.15/fs/Makefile linux-2.6.15-squashfs3.0/fs/Makefile
---- linux-2.6.15/fs/Makefile 2006-03-01 22:37:27.000000000 +0000
-+++ linux-2.6.15-squashfs3.0/fs/Makefile 2006-03-07 21:12:37.000000000 +0000
-@@ -55,6 +55,7 @@ obj-$(CONFIG_EXT3_FS) += ext3/ # Before
+diff --new-file -urp linux-2.6.8.1/fs/Makefile linux-2.6.8.1-squashfs3.1/fs/Makefile
+--- linux-2.6.8.1/fs/Makefile 2004-08-14 11:55:33.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/fs/Makefile 2006-08-11 09:34:50.000000000 +0100
+@@ -50,6 +50,7 @@ obj-$(CONFIG_EXT3_FS) += ext3/ # Before
obj-$(CONFIG_JBD) += jbd/
obj-$(CONFIG_EXT2_FS) += ext2/
obj-$(CONFIG_CRAMFS) += cramfs/
@@ -84,10 +84,10 @@
obj-$(CONFIG_RAMFS) += ramfs/
obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
obj-$(CONFIG_CODA_FS) += coda/
-diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/fs/squashfs/inode.c
---- linux-2.6.15/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/fs/squashfs/inode.c 2006-03-07 21:12:37.000000000 +0000
-@@ -0,0 +1,2127 @@
+diff --new-file -urp linux-2.6.8.1/fs/squashfs/inode.c linux-2.6.8.1-squashfs3.1/fs/squashfs/inode.c
+--- linux-2.6.8.1/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/fs/squashfs/inode.c 2006-08-20 01:16:58.000000000 +0100
+@@ -0,0 +1,2155 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+ *
@@ -116,6 +116,7 @@
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
++#include <linux/zlib.h>
+#include <linux/fs.h>
+#include <linux/smp_lock.h>
+#include <linux/slab.h>
@@ -126,7 +127,6 @@
+#include <linux/init.h>
+#include <linux/dcache.h>
+#include <linux/wait.h>
-+#include <linux/zlib.h>
+#include <linux/blkdev.h>
+#include <linux/vmalloc.h>
+#include <asm/uaccess.h>
@@ -153,9 +153,6 @@
+static struct super_block *squashfs_get_sb(struct file_system_type *, int,
+ const char *, void *);
+
-+
-+static z_stream stream;
-+
+static struct file_system_type squashfs_fs_type = {
+ .owner = THIS_MODULE,
+ .name = "squashfs",
@@ -339,20 +336,20 @@
+ if (compressed) {
+ int zlib_err;
+
-+ stream.next_in = c_buffer;
-+ stream.avail_in = c_byte;
-+ stream.next_out = buffer;
-+ stream.avail_out = msblk->read_size;
++ msblk->stream.next_in = c_buffer;
++ msblk->stream.avail_in = c_byte;
++ msblk->stream.next_out = buffer;
++ msblk->stream.avail_out = msblk->read_size;
+
-+ if (((zlib_err = zlib_inflateInit(&stream)) != Z_OK) ||
-+ ((zlib_err = zlib_inflate(&stream, Z_FINISH))
++ if (((zlib_err = zlib_inflateInit(&msblk->stream)) != Z_OK) ||
++ ((zlib_err = zlib_inflate(&msblk->stream, Z_FINISH))
+ != Z_STREAM_END) || ((zlib_err =
-+ zlib_inflateEnd(&stream)) != Z_OK)) {
++ zlib_inflateEnd(&msblk->stream)) != Z_OK)) {
+ ERROR("zlib_fs returned unexpected result 0x%x\n",
+ zlib_err);
+ bytes = 0;
+ } else
-+ bytes = stream.total_out;
++ bytes = msblk->stream.total_out;
+
+ up(&msblk->read_data_mutex);
+ }
@@ -1057,6 +1054,10 @@
+ }
+ memset(s->s_fs_info, 0, sizeof(struct squashfs_sb_info));
+ msblk = s->s_fs_info;
++ if (!(msblk->stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
++ ERROR("Failed to allocate zlib workspace\n");
++ goto failure;
++ }
+ sblk = &msblk->sblk;
+
+ msblk->devblksize = sb_min_blocksize(s, BLOCK_SIZE);
@@ -1229,6 +1230,7 @@
+ kfree(msblk->read_data);
+ kfree(msblk->block_cache);
+ kfree(msblk->fragment_index_2);
++ vfree(msblk->stream.workspace);
+ kfree(s->s_fs_info);
+ s->s_fs_info = NULL;
+ return -EINVAL;
@@ -1571,7 +1573,7 @@
+ struct inode *inode = page->mapping->host;
+ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
+ struct squashfs_super_block *sblk = &msblk->sblk;
-+ unsigned char block_list[SIZE];
++ unsigned char *block_list;
+ long long block;
+ unsigned int bsize, i = 0, bytes = 0, byte_offset = 0;
+ int index = page->index >> (sblk->block_log - PAGE_CACHE_SHIFT);
@@ -1587,6 +1589,11 @@
+ page->index,
+ SQUASHFS_I(inode)->start_block);
+
++ if (!(block_list = kmalloc(SIZE, GFP_KERNEL))) {
++ ERROR("Failed to allocate block_list\n");
++ goto skip_read;
++ }
++
+ if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
+ PAGE_CACHE_SHIFT))
+ goto skip_read;
@@ -1669,6 +1676,7 @@
+ else
+ release_cached_fragment(msblk, fragment);
+
++ kfree(block_list);
+ return 0;
+
+skip_read:
@@ -1679,6 +1687,7 @@
+ SetPageUptodate(page);
+ unlock_page(page);
+
++ kfree(block_list);
+ return 0;
+}
+
@@ -1688,7 +1697,7 @@
+ struct inode *inode = page->mapping->host;
+ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
+ struct squashfs_super_block *sblk = &msblk->sblk;
-+ unsigned char block_list[SIZE];
++ unsigned char *block_list;
+ long long block;
+ unsigned int bsize, bytes = 0;
+ void *pageaddr;
@@ -1700,6 +1709,14 @@
+ if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
+ PAGE_CACHE_SHIFT)) {
+ pageaddr = kmap_atomic(page, KM_USER0);
++ block_list = NULL;
++ goto skip_read;
++ }
++
++ if (!(block_list = kmalloc(SIZE, GFP_KERNEL))) {
++ ERROR("Failed to allocate block_list\n");
++ pageaddr = kmap_atomic(page, KM_USER0);
++ block_list = NULL;
+ goto skip_read;
+ }
+
@@ -1745,6 +1762,7 @@
+ SetPageUptodate(page);
+ unlock_page(page);
+
++ kfree(block_list);
+ return 0;
+}
+
@@ -1808,12 +1826,18 @@
+ struct squashfs_sb_info *msblk = s->s_fs_info;
+ struct squashfs_super_block *sblk = &msblk->sblk;
+ int i, length = 0;
-+ char buffer[sizeof(struct squashfs_dir_index) + SQUASHFS_NAME_LEN + 1];
-+ struct squashfs_dir_index *index = (struct squashfs_dir_index *) buffer;
-+ char str[SQUASHFS_NAME_LEN + 1];
++ struct squashfs_dir_index *index;
++ char *str;
+
+ TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count);
+
++ if (!(str = kmalloc(sizeof(struct squashfs_dir_index) +
++ (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_index\n");
++ goto failure;
++ }
++
++ index = (struct squashfs_dir_index *) (str + SQUASHFS_NAME_LEN + 1);
+ strncpy(str, name, size);
+ str[size] = '\0';
+
@@ -1845,6 +1869,8 @@
+ }
+
+ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++ kfree(str);
++failure:
+ return length + 3;
+}
+
@@ -1856,14 +1882,19 @@
+ struct squashfs_super_block *sblk = &msblk->sblk;
+ long long next_block = SQUASHFS_I(i)->start_block +
+ sblk->directory_table_start;
-+ int next_offset = SQUASHFS_I(i)->offset, length = 0, dirs_read = 0,
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
+ dir_count;
+ struct squashfs_dir_header dirh;
-+ char buffer[sizeof(struct squashfs_dir_entry) + SQUASHFS_NAME_LEN + 1];
-+ struct squashfs_dir_entry *dire = (struct squashfs_dir_entry *) buffer;
++ struct squashfs_dir_entry *dire;
+
+ TRACE("Entered squashfs_readdir [%llx:%x]\n", next_block, next_offset);
+
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto finish;
++ }
++
+ while(file->f_pos < 3) {
+ char *name;
+ int size, i_ino;
@@ -1889,7 +1920,6 @@
+ goto finish;
+ }
+ file->f_pos += size;
-+ dirs_read++;
+ }
+
+ length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset,
@@ -1970,16 +2000,17 @@
+ goto finish;
+ }
+ file->f_pos = length;
-+ dirs_read++;
+ }
+ }
+
+finish:
-+ return dirs_read;
++ kfree(dire);
++ return 0;
+
+failed_read:
+ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
+ next_offset);
++ kfree(dire);
+ return 0;
+}
+
@@ -1997,11 +2028,16 @@
+ int next_offset = SQUASHFS_I(i)->offset, length = 0,
+ dir_count;
+ struct squashfs_dir_header dirh;
-+ char buffer[sizeof(struct squashfs_dir_entry) + SQUASHFS_NAME_LEN];
-+ struct squashfs_dir_entry *dire = (struct squashfs_dir_entry *) buffer;
++ struct squashfs_dir_entry *dire;
+
+ TRACE("Entered squashfs_lookup [%llx:%x]\n", next_block, next_offset);
+
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto exit_loop;
++ }
++
+ if (len > SQUASHFS_NAME_LEN)
+ goto exit_loop;
+
@@ -2082,6 +2118,7 @@
+ }
+
+exit_loop:
++ kfree(dire);
+ d_add(dentry, inode);
+ return ERR_PTR(0);
+
@@ -2114,6 +2151,7 @@
+ kfree(sbi->fragment_index);
+ kfree(sbi->fragment_index_2);
+ kfree(sbi->meta_index);
++ vfree(sbi->stream.workspace);
+ kfree(s->s_fs_info);
+ s->s_fs_info = NULL;
+ }
@@ -2133,20 +2171,11 @@
+ if (err)
+ goto out;
+
-+ printk(KERN_INFO "squashfs: version 3.0 (2006/03/15) "
++ printk(KERN_INFO "squashfs: version 3.1 (2006/08/19) "
+ "Phillip Lougher\n");
+
-+ if (!(stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
-+ ERROR("Failed to allocate zlib workspace\n");
-+ destroy_inodecache();
-+ err = -ENOMEM;
-+ goto out;
-+ }
-+
-+ if ((err = register_filesystem(&squashfs_fs_type))) {
-+ vfree(stream.workspace);
++ if ((err = register_filesystem(&squashfs_fs_type)))
+ destroy_inodecache();
-+ }
+
+out:
+ return err;
@@ -2155,7 +2184,6 @@
+
+static void __exit exit_squashfs_fs(void)
+{
-+ vfree(stream.workspace);
+ unregister_filesystem(&squashfs_fs_type);
+ destroy_inodecache();
+}
@@ -2212,12 +2240,12 @@
+
+module_init(init_squashfs_fs);
+module_exit(exit_squashfs_fs);
-+MODULE_DESCRIPTION("squashfs, a compressed read-only filesystem");
++MODULE_DESCRIPTION("squashfs 3.1, a compressed read-only filesystem");
+MODULE_AUTHOR("Phillip Lougher <phillip at lougher.org.uk>");
+MODULE_LICENSE("GPL");
-diff --new-file -urp linux-2.6.15/fs/squashfs/Makefile linux-2.6.15-squashfs3.0/fs/squashfs/Makefile
---- linux-2.6.15/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/fs/squashfs/Makefile 2006-03-07 21:12:37.000000000 +0000
+diff --new-file -urp linux-2.6.8.1/fs/squashfs/Makefile linux-2.6.8.1-squashfs3.1/fs/squashfs/Makefile
+--- linux-2.6.8.1/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/fs/squashfs/Makefile 2006-08-11 09:34:50.000000000 +0100
@@ -0,0 +1,7 @@
+#
+# Makefile for the linux squashfs routines.
@@ -2226,10 +2254,10 @@
+obj-$(CONFIG_SQUASHFS) += squashfs.o
+squashfs-y += inode.o
+squashfs-y += squashfs2_0.o
-diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashfs3.0/fs/squashfs/squashfs2_0.c
---- linux-2.6.15/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/fs/squashfs/squashfs2_0.c 2006-03-07 21:12:37.000000000 +0000
-@@ -0,0 +1,758 @@
+diff --new-file -urp linux-2.6.8.1/fs/squashfs/squashfs2_0.c linux-2.6.8.1-squashfs3.1/fs/squashfs/squashfs2_0.c
+--- linux-2.6.8.1/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/fs/squashfs/squashfs2_0.c 2006-08-20 01:16:58.000000000 +0100
+@@ -0,0 +1,779 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+ *
@@ -2258,6 +2286,7 @@
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
++#include <linux/zlib.h>
+#include <linux/fs.h>
+#include <linux/smp_lock.h>
+#include <linux/slab.h>
@@ -2717,12 +2746,18 @@
+ struct squashfs_sb_info *msblk = s->s_fs_info;
+ struct squashfs_super_block *sblk = &msblk->sblk;
+ int i, length = 0;
-+ char buffer[sizeof(struct squashfs_dir_index_2) + SQUASHFS_NAME_LEN + 1];
-+ struct squashfs_dir_index_2 *index = (struct squashfs_dir_index_2 *) buffer;
-+ char str[SQUASHFS_NAME_LEN + 1];
++ struct squashfs_dir_index_2 *index;
++ char *str;
+
+ TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count);
+
++ if (!(str = kmalloc(sizeof(struct squashfs_dir_index) +
++ (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_index\n");
++ goto failure;
++ }
++
++ index = (struct squashfs_dir_index_2 *) (str + SQUASHFS_NAME_LEN + 1);
+ strncpy(str, name, size);
+ str[size] = '\0';
+
@@ -2754,6 +2789,8 @@
+ }
+
+ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++ kfree(str);
++failure:
+ return length;
+}
+
@@ -2765,14 +2802,19 @@
+ struct squashfs_super_block *sblk = &msblk->sblk;
+ long long next_block = SQUASHFS_I(i)->start_block +
+ sblk->directory_table_start;
-+ int next_offset = SQUASHFS_I(i)->offset, length = 0, dirs_read = 0,
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
+ dir_count;
+ struct squashfs_dir_header_2 dirh;
-+ char buffer[sizeof(struct squashfs_dir_entry_2) + SQUASHFS_NAME_LEN + 1];
-+ struct squashfs_dir_entry_2 *dire = (struct squashfs_dir_entry_2 *) buffer;
++ struct squashfs_dir_entry_2 *dire;
+
+ TRACE("Entered squashfs_readdir_2 [%llx:%x]\n", next_block, next_offset);
+
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto finish;
++ }
++
+ length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset,
+ SQUASHFS_I(i)->u.s2.directory_index_start,
+ SQUASHFS_I(i)->u.s2.directory_index_offset,
@@ -2850,16 +2892,17 @@
+ goto finish;
+ }
+ file->f_pos = length;
-+ dirs_read++;
+ }
+ }
+
+finish:
-+ return dirs_read;
++ kfree(dire);
++ return 0;
+
+failed_read:
+ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
+ next_offset);
++ kfree(dire);
+ return 0;
+}
+
@@ -2877,11 +2920,16 @@
+ int next_offset = SQUASHFS_I(i)->offset, length = 0,
+ dir_count;
+ struct squashfs_dir_header_2 dirh;
-+ char buffer[sizeof(struct squashfs_dir_entry_2) + SQUASHFS_NAME_LEN];
-+ struct squashfs_dir_entry_2 *dire = (struct squashfs_dir_entry_2 *) buffer;
++ struct squashfs_dir_entry_2 *dire;
+ int sorted = sblk->s_major == 2 && sblk->s_minor >= 1;
+
-+ TRACE("Entered squashfs_lookup [%llx:%x]\n", next_block, next_offset);
++ TRACE("Entered squashfs_lookup_2 [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto exit_loop;
++ }
+
+ if (len > SQUASHFS_NAME_LEN)
+ goto exit_loop;
@@ -2962,6 +3010,7 @@
+ }
+
+exit_loop:
++ kfree(dire);
+ d_add(dentry, inode);
+ return ERR_PTR(0);
+
@@ -2988,9 +3037,9 @@
+
+ return 1;
+}
-diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs.h linux-2.6.15-squashfs3.0/fs/squashfs/squashfs.h
---- linux-2.6.15/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/fs/squashfs/squashfs.h 2006-03-07 21:12:37.000000000 +0000
+diff --new-file -urp linux-2.6.8.1/fs/squashfs/squashfs.h linux-2.6.8.1-squashfs3.1/fs/squashfs/squashfs.h
+--- linux-2.6.8.1/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/fs/squashfs/squashfs.h 2006-08-11 09:34:50.000000000 +0100
@@ -0,0 +1,86 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
@@ -3078,9 +3127,9 @@
+ return 0;
+}
+#endif
-diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squashfs3.0/include/linux/squashfs_fs.h
---- linux-2.6.15/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/include/linux/squashfs_fs.h 2006-03-07 21:12:37.000000000 +0000
+diff --new-file -urp linux-2.6.8.1/include/linux/squashfs_fs.h linux-2.6.8.1-squashfs3.1/include/linux/squashfs_fs.h
+--- linux-2.6.8.1/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/include/linux/squashfs_fs.h 2006-08-11 09:34:50.000000000 +0100
@@ -0,0 +1,911 @@
+#ifndef SQUASHFS_FS
+#define SQUASHFS_FS
@@ -3993,9 +4042,9 @@
+
+#endif
+#endif
-diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs_i.h linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_i.h
---- linux-2.6.15/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_i.h 2006-03-07 21:12:37.000000000 +0000
+diff --new-file -urp linux-2.6.8.1/include/linux/squashfs_fs_i.h linux-2.6.8.1-squashfs3.1/include/linux/squashfs_fs_i.h
+--- linux-2.6.8.1/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/include/linux/squashfs_fs_i.h 2006-08-11 09:34:50.000000000 +0100
@@ -0,0 +1,45 @@
+#ifndef SQUASHFS_FS_I
+#define SQUASHFS_FS_I
@@ -4042,10 +4091,10 @@
+ struct inode vfs_inode;
+};
+#endif
-diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs_sb.h linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_sb.h
---- linux-2.6.15/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_sb.h 2006-03-07 21:12:37.000000000 +0000
-@@ -0,0 +1,74 @@
+diff --new-file -urp linux-2.6.8.1/include/linux/squashfs_fs_sb.h linux-2.6.8.1-squashfs3.1/include/linux/squashfs_fs_sb.h
+--- linux-2.6.8.1/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/include/linux/squashfs_fs_sb.h 2006-08-20 01:16:58.000000000 +0100
+@@ -0,0 +1,75 @@
+#ifndef SQUASHFS_FS_SB
+#define SQUASHFS_FS_SB
+/*
@@ -4112,17 +4161,18 @@
+ wait_queue_head_t waitq;
+ wait_queue_head_t fragment_wait_queue;
+ struct meta_index *meta_index;
-+ struct inode *(*iget)(struct super_block *s, squashfs_inode_t \
++ z_stream stream;
++ struct inode *(*iget)(struct super_block *s, squashfs_inode_t
+ inode);
-+ long long (*read_blocklist)(struct inode *inode, int \
-+ index, int readahead_blks, char *block_list, \
++ long long (*read_blocklist)(struct inode *inode, int
++ index, int readahead_blks, char *block_list,
+ unsigned short **block_p, unsigned int *bsize);
+ int (*read_fragment_index_table)(struct super_block *s);
+};
+#endif
-diff --new-file -urp linux-2.6.15/init/do_mounts_rd.c linux-2.6.15-squashfs3.0/init/do_mounts_rd.c
---- linux-2.6.15/init/do_mounts_rd.c 2006-03-01 22:37:27.000000000 +0000
-+++ linux-2.6.15-squashfs3.0/init/do_mounts_rd.c 2006-03-07 21:12:37.000000000 +0000
+diff --new-file -urp linux-2.6.8.1/init/do_mounts_rd.c linux-2.6.8.1-squashfs3.1/init/do_mounts_rd.c
+--- linux-2.6.8.1/init/do_mounts_rd.c 2004-08-14 11:55:48.000000000 +0100
++++ linux-2.6.8.1-squashfs3.1/init/do_mounts_rd.c 2006-08-20 01:16:58.000000000 +0100
@@ -5,6 +5,7 @@
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
@@ -4155,7 +4205,7 @@
memset(buf, 0xe5, size);
/*
-@@ -101,6 +105,15 @@ identify_ramdisk_image(int fd, int start
+@@ -101,6 +105,18 @@ identify_ramdisk_image(int fd, int start
goto done;
}
@@ -4164,7 +4214,10 @@
+ printk(KERN_NOTICE
+ "RAMDISK: squashfs filesystem found at block %d\n",
+ start_block);
-+ nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++ if (squashfsb->s_major < 3)
++ nblocks = (squashfsb->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++ else
++ nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
+ goto done;
+ }
+
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/kernel-desktop-squashfs.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list