linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Phillip Lougher <phillip@lougher.demon.co.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-embedded@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, phillip.lougher@gmail.com,
	tim.bird@am.sony.com
Subject: Re: [PATCH 1/9] Squashfs: move zlib decompression wrapper code into a separate file
Date: Wed, 09 Dec 2009 12:00:52 +0200	[thread overview]
Message-ID: <1260352852.19669.1253.camel@localhost> (raw)
In-Reply-To: <4B1ED122.3040309@lougher.demon.co.uk>

On Tue, 2009-12-08 at 22:20 +0000, Phillip Lougher wrote:
> Andrew Morton wrote:
> > On Mon, 07 Dec 2009 02:25:08 +0000
> > Phillip Lougher <phillip@lougher.demon.co.uk> wrote:
> > 
> >> +
> >> +int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer,
> >> +	struct buffer_head **bh, int b, int offset, int length, int srclength,
> >> +	int pages)
> > 
> > This isn't a very good function name.  zlib_uncompress() now becomes a
> > kernel-wide identifier, but it's part of squashfs, not part of zlib.
> > 
> > Maybe that gets fixed in a later patch.  If so, thwap me.
> > 
> 
> Yes, they get fixed up in [PATCH 3/9] Squashfs: add a decompressor framework.
> That patch makes the functions static, and instead exports them via a
> suitably named decompressor ops structure.
> 
> +const struct squashfs_decompressor squashfs_zlib_comp_ops = {
> +	.init = zlib_init,
> +	.free = zlib_free,
> +	.decompress = zlib_uncompress,
> +	.id = ZLIB_COMPRESSION,
> +	.name = "zlib",
> +	.supported = 1
> +};
> 
> I split the patches up to make them easier to review.  The first two patches
> move the zlib code out to a separate file (ready for adding the framework).
> The third patch adds the framework.  At the time of the second patch, however,
> to not break compilation, the functions have to be global.  In hindsight
> I should have made named the functions squashfs_xxx, and removed the squashfs_
> when they were made static in the third patch.

Did you consider using cryptoapi? UBIFS uses zlib/lzo in cryptoapi - it
is a very clean way.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2009-12-09 10:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1NHTHg-0001sM-NQ@dylan.lougher.demon.co.uk>
2009-12-07 22:57 ` [PATCH 1/9] Squashfs: move zlib decompression wrapper code into a separate file Andrew Morton
2009-12-08 22:20   ` Phillip Lougher
2009-12-09 10:00     ` Artem Bityutskiy [this message]
2009-12-10  0:38       ` Phillip Lougher
2009-12-10 10:01         ` Geert Uytterhoeven
2009-12-10 21:17           ` Phillip Lougher
2009-12-10 22:20             ` Felix Fietkau
2009-12-10 23:20           ` Phillip Lougher
2009-12-07  8:37 Phillip Lougher
  -- strict thread matches above, loose matches on Subject: below --
2009-12-07  8:25 root

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=1260352852.19669.1253.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillip.lougher@gmail.com \
    --cc=phillip@lougher.demon.co.uk \
    --cc=tim.bird@am.sony.com \
    /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;
as well as URLs for NNTP newsgroup(s).