All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry Baryshkov" <dbaryshkov@gmail.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembeded-devel <openembedded-devel@lists.openembedded.org>
Subject: Re: [oe] [meta-oe][PATCH] image_types_sparse: stop using ext2simg
Date: Fri, 20 Aug 2021 17:43:45 +0300	[thread overview]
Message-ID: <CALT56yMBWzhbyH_exaKPgBZFceYfJFviLd1nX2d+tSs0U0MwqA@mail.gmail.com> (raw)
In-Reply-To: <CAMKF1sqL1aaJrNr4Fj1kkSb0+Ctd5sC8sUkDYiqKMYvJ3cyLUA@mail.gmail.com>

ср, 18 авг. 2021 г. в 21:23, Khem Raj <raj.khem@gmail.com>:
>
> On Wed, Aug 18, 2021 at 8:39 AM Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:
> >
> > Under some conditions ext2simg can corrupt the file system (see
> > https://lore.kernel.org/linux-ext4/CAP71WjwVdqmLEq1NGWK36JkEd-i05YcAu4jeY6GFjsk6TS=Mtg@mail.gmail.com/).
> > This has been reproduced with the ext2simg currently found meta-oe's
> > android-tools-native). Stop using ext2simg and always use img2simg. This
> > results in bigger images, but without the risk of image corruption.
>
> how big are the images ?

Just checked. I've 1GB (964 MB) ext4 image. gzipped it takes 227 MB.
Given that I got:
ext2simg - 518MB
img2simg - 655 MB

>
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  meta-oe/classes/image_types_sparse.bbclass | 12 ++----------
> >  1 file changed, 2 insertions(+), 10 deletions(-)
> >
> > diff --git a/meta-oe/classes/image_types_sparse.bbclass b/meta-oe/classes/image_types_sparse.bbclass
> > index 65d980fd913f..4263593a8dd1 100644
> > --- a/meta-oe/classes/image_types_sparse.bbclass
> > +++ b/meta-oe/classes/image_types_sparse.bbclass
> > @@ -2,15 +2,7 @@ inherit image_types
> >
> >  CONVERSIONTYPES += "sparse"
> >  CONVERSION_CMD:sparse = " \
> > -    case "${type}" in \
> > -        ext*) \
> > -            ext2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \
> > -                     "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \
> > -            ;; \
> > -        *) \
> > -            img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \
> > -                     "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \
> > -            ;; \
> > -    esac \
> > +    img2simg "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}" \
> > +             "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sparse" \
> >  "
> >  CONVERSION_DEPENDS_sparse = "android-tools-native"
> > --
> > 2.30.2
> >
> >
> > 
> >



-- 
With best wishes
Dmitry

  reply	other threads:[~2021-08-20 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 15:39 [meta-oe][PATCH] image_types_sparse: stop using ext2simg Dmitry Baryshkov
2021-08-18 18:22 ` [oe] " Khem Raj
2021-08-20 14:43   ` Dmitry Baryshkov [this message]
2021-08-20 18:03     ` Khem Raj
2021-08-25 19:45       ` Dmitry Baryshkov
2021-08-30 20:36       ` Dmitry Baryshkov
2021-08-30 20:45         ` Khem Raj
2021-08-30 20:48           ` Dmitry Baryshkov

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=CALT56yMBWzhbyH_exaKPgBZFceYfJFviLd1nX2d+tSs0U0MwqA@mail.gmail.com \
    --to=dbaryshkov@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.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.