From: Michael Tokarev <mjt@tls.msk.ru>
To: vince.kim@access-company.com
Cc: linux-kernel@vger.kernel.org, "Richard Purdie [rpurdie"@openedhand.com
Subject: Re: [PATCH 1/2 ] Add support LZO in cramfs
Date: Sat, 27 Oct 2007 13:09:45 +0400 [thread overview]
Message-ID: <47230059.80202@msgid.tls.msk.ru> (raw)
In-Reply-To: <1193441153.17726.17.camel@vince-desktop>
vince kim wrote:
> This is a kernel patch to add support LZO compression in cramfs.
[]
> --- linux-2.6.23/fs/cramfs/inode.c 2007-10-09 13:31:38.000000000 -0700
> +++ linux-2.6.23_cramfs_lzo/fs/cramfs/inode.c 2007-10-26 14:35:59.000000000 -0700
> @@ -31,6 +31,8 @@
> static const struct inode_operations cramfs_dir_inode_operations;
> static const struct file_operations cramfs_directory_operations;
> static const struct address_space_operations cramfs_aops;
> +/* function pointer to uncompress block */
> +static int (* cramfs_uncompress_block) (void *dst, int dstlen, void *src, int srclen);
Shouldn't this pointer be mountpoint-specific? I mean,
if I've two cramfs images, one using zlib and another
using lzo, the two will not work at the same time.
[]
> --- linux-2.6.23/fs/Kconfig 2007-10-09 13:31:38.000000000 -0700
> +++ linux-2.6.23_cramfs_lzo/fs/Kconfig 2007-10-26 14:19:01.000000000 -0700
> @@ -1348,6 +1348,7 @@
> tristate "Compressed ROM file system support (cramfs)"
> depends on BLOCK
> select ZLIB_INFLATE
> + select LZO_DECOMPRESS
> help
> Saying Y here includes support for CramFs (Compressed ROM File
> System). CramFs is designed to be a simple, small, and compressed
Hmm. How about using modular decompressor? I mean,
it isn't really necessary for a given config to handle
both lzo- and zlib-compressed cramfs images, only one
may be needed, so the other compression library becomes
a useless dependency. This is especially important for
embedded environments where memory/disk space is limited.
Since you're using a pointer-to-function anyway, it can
be done fully dynamically, by requesting a module to de-
compress the thing at runtime. Pretty much like it's
done f.e. in crypto/ipsec layer currently.
By the way, your patch is word-wrapped.
/mjt
next prev parent reply other threads:[~2007-10-27 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 23:25 [PATCH 1/2 ] Add support LZO in cramfs vince kim
2007-10-27 9:09 ` Michael Tokarev [this message]
[not found] ` <1193683508.27074.19.camel@vince-desktop>
2007-10-31 0:39 ` vince kim
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=47230059.80202@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc="Richard Purdie [rpurdie"@openedhand.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vince.kim@access-company.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 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.