public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@openedhand.com>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.6.22-rc1-mm1
Date: Wed, 16 May 2007 20:55:41 +0100	[thread overview]
Message-ID: <1179345341.5854.36.camel@localhost.localdomain> (raw)
In-Reply-To: <20070516100632.391f5459.akpm@linux-foundation.org>

Convert Reiser4 to use lzo implementation in lib/lzo/ instead of
including its own copy of minilzo.

Signed-off-by: Richard Purdie <rpurdie@openedhand.com>

---
[I've removed the deletion of minilzo.* and lzoconf.h from the LKML
version of this mail since its not very interesting]

 fs/reiser4/Kconfig                    |    1 
 fs/reiser4/Makefile                   |    1 
 fs/reiser4/plugin/compress/Makefile   |    1 
 fs/reiser4/plugin/compress/compress.c |   22 
 fs/reiser4/plugin/compress/lzoconf.h  |  216 ---
 fs/reiser4/plugin/compress/minilzo.c  | 1967 ----------------------------------
 fs/reiser4/plugin/compress/minilzo.h  |   70 -
 7 files changed, 10 insertions(+), 2268 deletions(-)

Index: linux-2.6.21/fs/reiser4/Kconfig
===================================================================
--- linux-2.6.21.orig/fs/reiser4/Kconfig	2007-05-16 18:46:01.000000000 +0100
+++ linux-2.6.21/fs/reiser4/Kconfig	2007-05-16 18:49:09.000000000 +0100
@@ -3,6 +3,7 @@ config REISER4_FS
 	depends on EXPERIMENTAL
 	select ZLIB_INFLATE
 	select ZLIB_DEFLATE
+	select LZO
 	select CRYPTO
 	help
 	  Reiser4 is a filesystem that performs all filesystem operations
Index: linux-2.6.21/fs/reiser4/Makefile
===================================================================
--- linux-2.6.21.orig/fs/reiser4/Makefile	2007-05-16 18:46:01.000000000 +0100
+++ linux-2.6.21/fs/reiser4/Makefile	2007-05-16 20:35:48.000000000 +0100
@@ -70,7 +70,6 @@ reiser4-y := \
 		   plugin/crypto/cipher.o \
 		   plugin/crypto/digest.o \
            \
-		   plugin/compress/minilzo.o \
 		   plugin/compress/compress.o \
 		   plugin/compress/compress_mode.o \
            \
Index: linux-2.6.21/fs/reiser4/plugin/compress/Makefile
===================================================================
--- linux-2.6.21.orig/fs/reiser4/plugin/compress/Makefile	2007-05-16 18:46:01.000000000 +0100
+++ linux-2.6.21/fs/reiser4/plugin/compress/Makefile	2007-05-16 18:48:42.000000000 +0100
@@ -2,5 +2,4 @@ obj-$(CONFIG_REISER4_FS) += compress_plu
 
 compress_plugins-objs :=	\
 	compress.o		\
-	minilzo.o		\
 	compress_mode.o
Index: linux-2.6.21/fs/reiser4/plugin/compress/compress.c
===================================================================
--- linux-2.6.21.orig/fs/reiser4/plugin/compress/compress.c	2007-05-16 18:46:01.000000000 +0100
+++ linux-2.6.21/fs/reiser4/plugin/compress/compress.c	2007-05-16 20:47:45.000000000 +0100
@@ -4,8 +4,8 @@
 #include "../../debug.h"
 #include "../../inode.h"
 #include "../plugin.h"
-#include "minilzo.h"
 
+#include <linux/lzo.h>
 #include <linux/zlib.h>
 #include <linux/types.h>
 #include <linux/hardirq.h>
@@ -226,11 +226,7 @@ gzip1_decompress(coa_t coa, __u8 * src_f
 
 static int lzo1_init(void)
 {
-	int ret;
-	ret = lzo_init();
-	if (ret != LZO_E_OK)
-		warning("edward-848", "lzo_init() failed with ret = %d\n", ret);
-	return ret;
+	return 0;
 }
 
 static int lzo1_overrun(unsigned in_len)
@@ -238,9 +234,6 @@ static int lzo1_overrun(unsigned in_len)
 	return in_len / 64 + 16 + 3;
 }
 
-#define LZO_HEAP_SIZE(size) \
-	sizeof(lzo_align_t) * (((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t))
-
 static coa_t lzo1_alloc(tfm_action act)
 {
 	int ret = 0;
@@ -248,12 +241,12 @@ static coa_t lzo1_alloc(tfm_action act)
 
 	switch (act) {
 	case TFMA_WRITE:	/* compress */
-		coa = reiser4_vmalloc(LZO_HEAP_SIZE(LZO1X_1_MEM_COMPRESS));
+		coa = reiser4_vmalloc(LZO1X_1_MEM_COMPRESS);
 		if (!coa) {
 			ret = -ENOMEM;
 			break;
 		}
-		memset(coa, 0, LZO_HEAP_SIZE(LZO1X_1_MEM_COMPRESS));
+		memset(coa, 0, LZO1X_1_MEM_COMPRESS);
 	case TFMA_READ:		/* decompress */
 		break;
 	default:
@@ -295,12 +288,13 @@ static void
 lzo1_compress(coa_t coa, __u8 * src_first, unsigned src_len,
 	      __u8 * dst_first, unsigned *dst_len)
 {
+	unsigned long dstlen = *dst_len;
 	int result;
 
 	assert("edward-846", coa != NULL);
 	assert("edward-847", src_len != 0);
 
-	result = lzo1x_1_compress(src_first, src_len, dst_first, dst_len, coa);
+	result = lzo1x_1_compress(src_first, src_len, dst_first, &dstlen, coa);
 	if (result != LZO_E_OK) {
 		warning("edward-849", "lzo1x_1_compress failed\n");
 		goto out;
@@ -319,14 +313,16 @@ static void
 lzo1_decompress(coa_t coa, __u8 * src_first, unsigned src_len,
 		__u8 * dst_first, unsigned *dst_len)
 {
+	unsigned long dstlen = *dst_len;
 	int result;
 
 	assert("edward-851", coa == NULL);
 	assert("edward-852", src_len != 0);
 
-	result = lzo1x_decompress(src_first, src_len, dst_first, dst_len, NULL);
+	result = lzo1x_decompress(src_first, src_len, dst_first, &dstlen, NULL);
 	if (result != LZO_E_OK)
 		warning("edward-853", "lzo1x_1_decompress failed\n");
+	*dst_len = dstlen;
 	return;
 }
 



  reply	other threads:[~2007-05-16 19:56 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  3:19 2.6.22-rc1-mm1 Andrew Morton
2007-05-16  6:06 ` 2.6.22-rc1-mm1 KAMEZAWA Hiroyuki
2007-05-16  7:58   ` 2.6.22-rc1-mm1 Jeff Garzik
2007-05-16  8:04     ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-16 15:33       ` 2.6.22-rc1-mm1 Jeff Garzik
2007-05-16 20:24       ` 2.6.22-rc1-mm1 Darrick J. Wong
2007-05-16 16:54   ` 2.6.22-rc1-mm1 Randy Dunlap
2007-05-16  7:57 ` 2.6.22-rc1-mm1 - s390 vs. md Cornelia Huck
2007-05-16 17:21   ` Williams, Dan J
2007-05-16 10:18 ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-05-16 15:16   ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-16 17:40     ` 2.6.22-rc1-mm1 Mel Gorman
2007-05-16 17:55       ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-16 18:18         ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-05-16 18:00       ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-16 23:32       ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-16 23:36       ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-17  9:35         ` 2.6.22-rc1-mm1 Mel Gorman
2007-05-29 22:34           ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-01  9:50             ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-01 23:12               ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-06-05 18:38                 ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-05 22:57                   ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-06-07  9:49                     ` 2.6.22-rc1-mm1 Andy Whitcroft
2007-06-11 13:58                       ` 2.6.22-rc1-mm1 Andy Whitcroft
     [not found]                         ` <63a08cc7547f14065becdf9a94d0d529@pinky>
2007-06-11 16:15                           ` [PATCH] move the kernel to 16MB for NUMA-Q Andrew Morton
2007-06-11 17:20                             ` Dave Jones
2007-06-11 17:36                               ` H. Peter Anvin
2007-06-11 18:19                                 ` Jan Engelhardt
2007-06-11 18:46                                   ` Dave Jones
2007-06-11 19:17                                     ` Alan Cox
2007-06-11 20:07                                     ` Rene Herman
2007-06-11 20:21                                       ` Rene Herman
2007-06-11 19:01                                   ` H. Peter Anvin
2007-06-11 20:44                                     ` Jan Engelhardt
2007-06-11 20:51                                       ` H. Peter Anvin
2007-06-15 11:12                                         ` Jan Engelhardt
2007-06-11 17:49                               ` Rene Herman
2007-06-11 17:58                                 ` H. Peter Anvin
2007-06-11 18:01                                   ` Rene Herman
2007-05-17  4:16     ` 2.6.22-rc1-mm1 Bharata B Rao
2007-05-18  8:54     ` 2.6.22-rc1-mm1 young dave
2007-05-18 10:07       ` 2.6.22-rc1-mm1 young dave
2007-05-18 16:54         ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-18 16:59           ` 2.6.22-rc1-mm1 Mel Gorman
2007-05-21  0:53           ` 2.6.22-rc1-mm1 young dave
2007-05-21  4:49             ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-21  5:00               ` 2.6.22-rc1-mm1 young dave
2007-05-21  5:03                 ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-21  5:39                   ` 2.6.22-rc1-mm1 young dave
     [not found]                     ` <465138CC.3060605@zytor.com>
2007-05-21  8:41                       ` 2.6.22-rc1-mm1 young dave
2007-05-21 16:35                         ` 2.6.22-rc1-mm1 H. Peter Anvin
2007-05-22  2:14                           ` 2.6.22-rc1-mm1 young dave
     [not found]                             ` <465319C1.2080206@zytor.com>
2007-05-23  1:15                               ` 2.6.22-rc1-mm1 young dave
2007-05-16 12:10 ` (NFS) BUG: at page-writeback.c:829 [Was: 2.6.22-rc1-mm1] Jiri Slaby
2007-05-16 12:39   ` Nick Piggin
2007-05-16 12:44     ` Jiri Slaby
2007-05-16 12:47       ` Nick Piggin
2007-05-16 13:00     ` Trond Myklebust
2007-05-16 13:06       ` Nick Piggin
2007-05-16 12:52   ` Trond Myklebust
2007-05-16 14:30 ` 2.6.22-rc1-mm1 Michal Piotrowski
2007-05-16 14:37   ` 2.6.22-rc1-mm1 Nick Piggin
     [not found]     ` <6bffcb0e0705160935r1767a764hce72f24f9eee6c1e@mail.gmail.com>
2007-05-16 16:58       ` 2.6.22-rc1-mm1 Jiri Slaby
2007-05-16 15:34   ` 2.6.22-rc1-mm1 Gabriel C
2007-05-16 16:24 ` 2.6.22-rc1-mm1 Michal Piotrowski
2007-05-16 16:41   ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-17  2:06     ` 2.6.22-rc1-mm1 David Chinner
2007-05-17  8:41       ` [xfs-masters] 2.6.22-rc1-mm1 Christoph Hellwig
2007-05-17 20:05         ` Michal Piotrowski
2007-05-18  2:11           ` David Chinner
2007-05-21 10:11             ` David Chinner
2007-05-21 10:23               ` Christoph Hellwig
2007-05-22 10:44                 ` David Chinner
2007-05-22 11:42                   ` Christoph Hellwig
2007-05-22 23:23                   ` Nathan Scott
2007-05-22 14:45               ` Michal Piotrowski
2007-05-16 16:50 ` 2.6.22-rc1-mm1 Randy Dunlap
2007-05-16 17:00   ` 2.6.22-rc1-mm1 Richard Purdie
2007-05-16 17:06     ` 2.6.22-rc1-mm1 Andrew Morton
2007-05-16 19:55       ` Richard Purdie [this message]
2007-05-16 20:00       ` 2.6.22-rc1-mm1 Richard Purdie
2007-05-18 17:34         ` 2.6.22-rc1-mm1 Edward Shishkin
2007-05-16 17:37 ` 2.6.22-rc1-mm1 [cannot change thermal trip points] Maciej Rutecki
2007-05-16 17:47   ` Chuck Ebbert
2007-05-16 18:10     ` Goulven Guillard
2007-05-17  9:23     ` Pavel Machek
2007-05-17 13:36       ` Maciej Rutecki
2007-05-17 19:08         ` Len Brown
2007-05-17 20:09           ` Maciej Rutecki
2007-05-17 20:42             ` Maciej Rutecki
2007-05-17 21:53           ` Pavel Machek
2007-05-17 22:42             ` Len Brown
2007-05-21 12:11               ` Pavel Machek
2007-06-01  2:46                 ` Len Brown
2007-06-04 11:16                   ` Pavel Machek
2007-05-17 19:17       ` Len Brown
2007-05-17 21:52         ` Pavel Machek
2007-05-17 22:35           ` Len Brown
2007-06-04  9:02             ` Stefan Seyfried
2007-06-04 11:06               ` Pavel Machek
2007-05-19 19:56         ` Thomas Renninger
2007-05-21  3:50           ` Len Brown
2007-05-21 11:31             ` Thomas Renninger
2007-05-21 12:10             ` Pavel Machek
2007-05-21 13:27               ` Matthew Garrett
2007-05-21 13:29                 ` Pavel Machek
2007-05-21 13:36                   ` Matthew Garrett
2007-05-21 13:40                     ` Pavel Machek
2007-05-21 13:45                       ` Matthew Garrett
2007-05-21 22:42                         ` Pavel Machek
2007-05-22  0:31                           ` Matthew Garrett
2007-05-22  9:06                             ` Pavel Machek
2007-05-22  9:16                               ` Matthew Garrett
2007-05-22  9:28                                 ` Goulven Guillard
2007-05-22 10:05                                 ` Maciej Rutecki
2007-06-04  9:13                               ` Stefan Seyfried
2007-05-24 14:16                             ` 2.6.22-rc1-mm1 Implementing fan/thermal control in userspace - Was: " Thomas Renninger
2007-05-24 14:36                               ` Matthew Garrett
2007-05-24 18:18                                 ` Thomas Renninger
2007-05-25  6:38                                 ` Pavel Machek
2007-05-27 21:51                                   ` Matthew Garrett
2007-05-28 10:58                                     ` Pavel Machek
2007-05-28 12:50                                       ` Matthew Garrett
2007-05-28 12:53                                         ` Pavel Machek
2007-05-16 18:55 ` 2.6.22-rc1-mm1: IDE compile error Adrian Bunk
2007-05-23 23:45   ` Bartlomiej Zolnierkiewicz
2007-05-24 10:55     ` Alan Cox
2007-05-24 18:53       ` H. Peter Anvin
2007-05-25  0:05       ` H. Peter Anvin
2007-05-25  0:14         ` Alan Cox
2007-05-25  0:18           ` H. Peter Anvin
2007-05-25  0:38             ` Alan Cox
2007-05-25  0:51               ` H. Peter Anvin
2007-05-25 14:19                 ` Alan Cox
2007-05-17 12:38 ` 2.6.22-rc1-mm1 - Call trace in slub_def.h Reuben Farrelly
2007-05-17 12:52   ` Satyam Sharma
2007-05-20 10:12 ` 2.6.22-rc1-mm1 Mariusz Kozlowski
2007-05-20 10:21   ` 2.6.22-rc1-mm1 Sam Ravnborg
2007-05-20 15:33     ` 2.6.22-rc1-mm1 Kumar Gala
2007-05-22  7:25 ` 2.6.22-rc1-mm1: evm BUG when reading sysfs file Joseph Fannin
2007-05-22 21:23   ` Andrew Morton
2007-05-25 21:05     ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1179345341.5854.36.camel@localhost.localdomain \
    --to=rpurdie@openedhand.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox