All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Szymon Janc <szymon@janc.net.pl>
Cc: grub-devel@gnu.org
Subject: Re: [RFC] LZO support
Date: Thu, 06 Oct 2011 16:58:50 +0200	[thread overview]
Message-ID: <4E8DC22A.1030000@gmail.com> (raw)
In-Reply-To: <201110042211.40185.szymon@janc.net.pl>

[-- Attachment #1: Type: text/plain, Size: 2453 bytes --]

Looks good. You can commit it upstream.
On 04.10.2011 22:11, Szymon Janc wrote:
> On Wednesday 28 September 2011 23:39:24 Vladimir 'φ-coder/phcoder' Serbinenko 
> wrote:
>> On 14.09.2011 21:20, Szymon Janc wrote:
>>> Hello,
>>>
>>> I've implemented support for LZO in grub, this includes:
>>> - import of minilzo library (from [1])
>>> - support for LZO (de)compression in btrfs (compress=lzo mount option)
>>> - lzopio - for reading lzop compressed files
>> +  common = lib/minilzo/minilzo.c;
>> @@ -1650,6 +1653,14 @@
>> +  common = 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, at
>> least for now.
> Done.
>
>> +#include "minilzo.h"
>> I'd prefer <minilzo.h> 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 = 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 
> calculate_uncompressed_size().  Actually, uncompressed size is always 
> calculated. There is TODO to not do it on not-easily-seekable files as done in 
> other ios. And GRUB_FILE_SIZE_UNKNOWN is set for 'future proof' only.
>
>>> - lzopio works ok with grub-fstest (crc, testload), also able to load
>>> modules
>>>
>>>   compressed with lzop, but compressing all modules and doing
>>>   grub-install --modules=lzopio fails to boot, still need to investigate
>>>   that
>> 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.
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

      reply	other threads:[~2011-10-06 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 19:20 [RFC] LZO support Szymon Janc
2011-09-28 21:39 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-10-04 20:11   ` Szymon Janc
2011-10-06 14:58     ` Vladimir 'φ-coder/phcoder' Serbinenko [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=4E8DC22A.1030000@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=szymon@janc.net.pl \
    /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.