All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Stewart Brodie <stewart.brodie@pace.co.uk>
Cc: linux-mtd@lists.infradead.org
Subject: Re: mkfs.jffs2 failing to use zlib to compress things
Date: Tue, 30 Jul 2002 23:48:49 +0100	[thread overview]
Message-ID: <15147.1028069329@redhat.com> (raw)
In-Reply-To: <c5e41c5a4b.sbrodie@sbrodie.cam.pace.co.uk>

stewart.brodie@pace.co.uk said:
> I have been having problems with mkfs.jffs2 (with the fs/jffs2 files
> from a MIPS Linux 2.4.17 kernel) not compressing files as it
> constructs the filesystem image.  I have no idea whether this will
> affect the run-time behaviour or not - I've not got that far.  After
> inserting debugging into the compression routines, it appears that
> Z_STREAM_ERROR streaming errors are occurring when the data is being
> passed through zlib, and thus the simple rtime compression is being
> used instead.

> It looks like mkfs.jffs2 is driving zlib's compression routines in a
> bizarre way (c.f. the decompression which uses a trivial loop) passing
> only small blocks of data at a time.  Is that loop correct?  Why is
> Z_PARTIAL_FLUSH being used?  The errors I get are all "final deflate
> returned -2".

> Any ideas what might be causing this? 

We compress only a page of data at a time, so we can get at them easily on 
demand without having to decompress a larger stream and discard some of the 
result. Normally, we do only one call to zlib_deflate() with 
Z_PARTIAL_FLUSH, which manages to deflate the entire input buffer. Then we 
try to do the Z_FINISH. I don't know why that would cause an error.

This is the same code as we use in the kernel though -- so it's possible 
that the same error is occurring there.

--
dwmw2

      reply	other threads:[~2002-07-30 22:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-22 16:25 mkfs.jffs2 failing to use zlib to compress things Stewart Brodie
2002-07-30 22:48 ` David Woodhouse [this message]

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=15147.1028069329@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=stewart.brodie@pace.co.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.