From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Daniel Hazelton" <dhazelton@enter.net>
Cc: "Michael-Luke Jones" <mlj28@cam.ac.uk>,
lkml <linux-kernel@vger.kernel.org>,
dwmw2@infradead.org, madler@alumni.caltech.edu, jloup@gzip.org
Subject: Re: JFFS2 using 'private' zlib header (was [RFC] LZO de/compression support - take 6)
Date: Tue, 29 May 2007 20:45:41 +0530 [thread overview]
Message-ID: <a781481a0705290815y32758055te52cb8657f34acc@mail.gmail.com> (raw)
In-Reply-To: <200705290943.11176.dhazelton@enter.net>
[ Trimmed Cc list; added original zlib authors. ]
> On Tuesday 29 May 2007 09:33:51 Michael-Luke Jones wrote:
> > On 29 May 2007, at 12:27, Satyam Sharma wrote:
> > > Right, actually, zlib could be switched over to [using a common
> > > directory].
> > > Because zlib_deflate/ and zlib_inflate/ too share a private header
> > > zutil.h which has unfortunately been stuck into include/linux/ with
> > > a big
> > > /* WARNING: this file should *not* be used by applications. */
> > > comment ...
> >
> > Well, unfortunately zutil.h is currently being used in-kernel by fs/
> > jffs2/compr_zlib.c despite the "WARNING: this file should *not* be
> > used by applications" notice.
Hmmm, either jffs2 thinks the zlib interfaces exposed through
include/linux/zlib.h are insufficient, or it isn't using zlib properly
(or at least the way it was supposed to be used :-)
Looking at fs/jffs2/compr_zlib.c, however, it just seems to be
an optimization -- skipping some checksum calculation if some
flag (PRESET_DICT) is absent from the input stream about to
be decompressed ...
This /looks/ like an optimization that might make sense for other
users of zlib too, in which case that entire check and
skip-the-checksum thing could actually be put into zlib proper. (?)
> > So moving this header to a truly private location isn't possible
> > right now, unfortunately,
> >
> > Michael-Luke Jones
> > [added David Whitehouse to cc]
On 5/29/07, Daniel Hazelton <dhazelton@enter.net> wrote:
> I've looked at that code and it seems to need that file for one constant.
> Perhaps it'd be better for jffs2/compr_zlib.c to define that constant itself
> (or use it as a "Magic Number") rather than include the zlib private header.
> Another possibility would be to move that constant out of zutil.h and into
> zconf.h or zlih.b - doing any of those would allow the zlib private header to
> be moved such that zlib could be changed to use a common directory *and* have
> said private header in that directory.
Moving PRESET_DICT to zlib.h robs lib/zlib_deflate/deflate.c from
being able to resolve that macro. FWIW, a dirty hack could be to
simply duplicate it in zlib.h. But then, implementation and interface
are decoupled for good reasons ...
Satyam
next prev parent reply other threads:[~2007-05-29 15:15 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-28 14:34 [RFC] LZO de/compression support - take 6 Nitin Gupta
2007-05-28 14:40 ` Nitin Gupta
2007-05-28 14:49 ` Daniel Hazelton
2007-05-28 15:06 ` Nitin Gupta
2007-05-28 15:43 ` Adrian Bunk
2007-05-28 16:03 ` Nitin Gupta
2007-05-28 17:11 ` Adrian Bunk
2007-05-28 19:59 ` Daniel Hazelton
2007-05-28 20:18 ` Daniel Hazelton
2007-05-28 20:52 ` Daniel Hazelton
2007-05-29 5:55 ` Nitin Gupta
2007-05-29 8:08 ` Michael-Luke Jones
2007-05-29 11:40 ` Adrian Bunk
2007-05-29 12:03 ` Nitin Gupta
2007-05-29 13:13 ` Daniel Hazelton
2007-05-29 21:10 ` Jan Engelhardt
2007-05-29 21:26 ` Adrian Bunk
2007-05-30 5:31 ` Nitin Gupta
2007-05-30 13:56 ` Johannes Stezenbach
2007-05-30 14:24 ` Satyam Sharma
2007-05-28 15:30 ` Adrian Bunk
2007-05-28 15:47 ` Nitin Gupta
2007-05-28 15:55 ` Daniel Hazelton
2007-05-28 17:01 ` Adrian Bunk
2007-05-28 19:51 ` Daniel Hazelton
2007-05-28 15:49 ` Daniel Hazelton
2007-05-28 22:57 ` Bret Towe
2007-05-29 5:48 ` Nitin Gupta
2007-05-29 13:09 ` Daniel Hazelton
2007-05-28 22:53 ` Bret Towe
2007-05-28 22:58 ` Bret Towe
2007-05-29 5:58 ` Nitin Gupta
2007-05-29 20:14 ` Daniel Hazelton
2007-05-29 20:33 ` Daniel Hazelton
2007-05-29 21:48 ` Daniel Hazelton
2007-05-29 23:32 ` Daniel Hazelton
2007-05-30 5:19 ` Nitin Gupta
2007-05-29 8:17 ` Makefile question (was [RFC] LZO de/compression support - take 6) Michael-Luke Jones
2007-05-29 10:41 ` Satyam Sharma
2007-05-29 10:51 ` Michael-Luke Jones
2007-05-29 11:27 ` Satyam Sharma
2007-05-29 13:33 ` JFFS2 using 'private' zlib header " Michael-Luke Jones
2007-05-29 13:43 ` Daniel Hazelton
2007-05-29 15:15 ` Satyam Sharma [this message]
2007-05-29 16:20 ` Daniel Hazelton
2007-05-30 5:31 ` Mark Adler
2007-05-30 13:05 ` Daniel Hazelton
2007-05-30 13:30 ` Satyam Sharma
2007-05-30 23:02 ` Mark Adler
2007-05-30 23:26 ` Daniel Hazelton
2007-06-01 3:06 ` Daniel Hazelton
2007-06-01 17:24 ` Satyam Sharma
2007-05-30 13:41 ` Artem Bityutskiy
2007-05-30 15:46 ` Artem Bityutskiy
2007-05-30 16:12 ` Satyam Sharma
2007-05-30 16:43 ` Artem Bityutskiy
2007-05-29 20:48 ` [RFC] LZO de/compression support - take 6 Jan Engelhardt
2007-05-30 5:54 ` Nitin Gupta
2007-05-30 8:31 ` Jan Engelhardt
2007-05-30 10:47 ` Nitin Gupta
2007-05-31 12:34 ` Nitin Gupta
2007-05-31 18:21 ` Satyam Sharma
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=a781481a0705290815y32758055te52cb8657f34acc@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=dhazelton@enter.net \
--cc=dwmw2@infradead.org \
--cc=jloup@gzip.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madler@alumni.caltech.edu \
--cc=mlj28@cam.ac.uk \
/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
all inboxes | Powered by JetHome®