Received: from list by lists.gnu.org with archive (Exim 4.71) id 1RBBSY-0008KL-VU for mharc-grub-devel@gnu.org; Tue, 04 Oct 2011 16:19:26 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBBSV-0008IZ-Kz for grub-devel@gnu.org; Tue, 04 Oct 2011 16:19:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBBSU-0000e8-FK for grub-devel@gnu.org; Tue, 04 Oct 2011 16:19:23 -0400 Received: from cox.rootnode.net ([89.248.165.14]:46854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBBSU-0000dh-8d for grub-devel@gnu.org; Tue, 04 Oct 2011 16:19:22 -0400 Received: from DSPAM-Daemon (localhost [127.0.0.1]) by cox.rootnode.net (Postfix) with SMTP id 14A82801FC4F for ; Tue, 4 Oct 2011 22:11:42 +0200 (CEST) Received: from athlon.localnet (93-181-164-64.internetia.net.pl [93.181.164.64]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cox.rootnode.net (Postfix) with ESMTPSA id DD13580144E7; Tue, 4 Oct 2011 22:11:41 +0200 (CEST) From: Szymon Janc To: grub-devel@gnu.org Subject: Re: [RFC] LZO support Date: Tue, 4 Oct 2011 22:11:40 +0200 User-Agent: KMail/1.13.7 (Linux/3.0.0-1-686-pae; KDE/4.6.5; i686; ; ) References: <201109142120.06740.szymon@janc.net.pl> <4E83940C.8060601@gmail.com> In-Reply-To: <4E83940C.8060601@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Message-Id: <201110042211.40185.szymon@janc.net.pl> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.3.8 (cox.rootnode.net [0.0.0.0]); Tue, 04 Oct 2011 22:11:41 +0200 (CEST) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Oct 4 22:11:42 2011 X-DSPAM-Confidence: 0.9937 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4e8b687e255565315134984 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 89.248.165.14 Cc: Vladimir =?utf-8?q?=27=CF=86-coder/phcoder=27?= Serbinenko X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2011 20:19:24 -0000 On Wednesday 28 September 2011 23:39:24 Vladimir '=CF=86-coder/phcoder' S= erbinenko=20 wrote: > On 14.09.2011 21:20, Szymon Janc wrote: > > Hello, > >=20 > > I've implemented support for LZO in grub, this includes: > > - import of minilzo library (from [1]) > > - support for LZO (de)compression in btrfs (compress=3Dlzo mount opti= on) > > - lzopio - for reading lzop compressed files >=20 > + common =3D lib/minilzo/minilzo.c; > @@ -1650,6 +1653,14 @@ > + common =3D lib/minilzo/minilzo.c; > Please don't include same file twice in different modules it creates a > symbol conflict. It's ok to have btrfs depend on lzopio if necessary, a= t > least for now. Done. > +#include "minilzo.h" > I'd prefer and an explicit -I on cppflags if necessary. Done. > - grub_disk_addr_t *outaddr, grub_size_t *outsize, > + grub_disk_addr_t * outaddr, grub_size_t * outsize, > this is a stylistic regression. (several such occurences) > - if (desc->data[desc->depth - 1].iter > - < desc->data[desc->depth - 1].maxiter) > + if (desc->data[desc->depth - 1].iter < > + desc->data[desc->depth - 1].maxiter) > Likewise. Oops. Fixed. > + grub_uint8_t context[lzopio->ccheck_fun->contextsize]; > This isn't necessarily well-aligned. Use grub_uint64_t > context[(lzopio->ccheck_fun->contextsize + 7) / 8]; > (several occurences) Done. > + file->size =3D GRUB_FILE_SIZE_UNKNOWN; > Several components have trouble with such files. Is there any way to > retrieve the size of lzio compressed file? It is possible and it is already implemented, please see=20 calculate_uncompressed_size(). Actually, uncompressed size is always=20 calculated. There is TODO to not do it on not-easily-seekable files as do= ne in=20 other ios. And GRUB_FILE_SIZE_UNKNOWN is set for 'future proof' only. >=20 > > - lzopio works ok with grub-fstest (crc, testload), also able to load > > modules > >=20 > > compressed with lzop, but compressing all modules and doing > > grub-install --modules=3Dlzopio fails to boot, still need to invest= igate > > that >=20 > That because dependencies on hashes are soft so it's not correctly > tracked by grub-install and so you end up in an infinite recursion. Branch on savannah updated. --=20 Szymon K. Janc szymon@janc.net.pl // GG: 1383435