[PATCH 1/1] expand last partition supports btrfs

10 views
Skip to first unread message

Roberto A. Foglietta

unread,
Sep 30, 2022, 3:43:37 AM9/30/22
to isar-...@googlegroups.com
Hi,

 the patch is in attachment, I am sorry. However, it has been created with git format-patch as requested by contributions rules.

 This patch extend the last partition to btrfs because only ext4 was supported.

 Cheers, R-
0001-expand-last-partition-btrfs-support-added.patch

Henning Schild

unread,
Sep 30, 2022, 6:58:18 AM9/30/22
to Roberto A. Foglietta, isar-...@googlegroups.com, Schmidl, Tobias
Am Fri, 30 Sep 2022 09:43:23 +0200
schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:
We had a similar patch floating around, but as already mentioned our
current understanding is that systemd-resizefs will be the way forward.

So this patch should not be merged while we still hold on to that idea
and wait for that systemd patch to arrive and cover the one corner-case
it still leaves open.

Henning

> Cheers, R-
>

Roberto A. Foglietta

unread,
Sep 30, 2022, 7:30:05 AM9/30/22
to Henning Schild, isar-...@googlegroups.com, Schmidl, Tobias
Is the btrfs a corner case? ;-)

It is OK do not let go it into the mainstream. After all the btrfs is less performant than ext4 but it has a data corruption feature that cannot allow corrupted data to be read. It might worth a consideration in some fields/applications.

It has been designed just to be a transitional quick-patch.

Thanks for your opinion and feedback, R-

Henning Schild

unread,
Sep 30, 2022, 7:42:12 AM9/30/22
to Roberto A. Foglietta, isar-...@googlegroups.com, Schmidl, Tobias
Am Fri, 30 Sep 2022 13:29:52 +0200
schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:

> Il Ven 30 Set 2022, 12:58 Henning Schild <henning...@siemens.com>
> ha scritto:
>
> > Am Fri, 30 Sep 2022 09:43:23 +0200
> > schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:
> >
> > > Hi,
> > >
> > > the patch is in attachment, I am sorry. However, it has been
> > > created with git format-patch as requested by contributions rules.
> > >
> > > This patch extend the last partition to btrfs because only ext4
> > > was supported.
> >
> > We had a similar patch floating around, but as already mentioned our
> > current understanding is that systemd-resizefs will be the way
> > forward.
> >
> > So this patch should not be merged while we still hold on to that
> > idea and wait for that systemd patch to arrive and cover the one
> > corner-case it still leaves open.
> >
>
> Is the btrfs a corner case? ;-)

No. We appreciate btrfs and see it as a very valuable fs some people
might want to use for their images. Several Isar users already use it
today.

The corner-case is systemd-resizefs not working in Debian9, while Isar
still supports this. So a patch has to deal with that until we drop the
support for that EoL distro.

> It is OK do not let go it into the mainstream. After all the btrfs is
> less performant than ext4 but it has a data corruption feature that
> cannot allow corrupted data to be read. It might worth a
> consideration in some fields/applications.
>
> It has been designed just to be a transitional quick-patch.

Such things cause more headache than a proper solution would. And that
solution is very much in reach.

Feel free to apply that patch in your layer, you can likely bbappend
somehow and do not actually have to patch isar.

Henning

Roberto A. Foglietta

unread,
Sep 30, 2022, 1:37:46 PM9/30/22
to Henning Schild, isar-...@googlegroups.com, Schmidl, Tobias
Il giorno ven 30 set 2022 alle ore 13:42 Henning Schild <henning...@siemens.com> ha scritto:

Feel free to apply that patch in your layer, you can likely bbappend
somehow and do not actually have to patch isar.

Geniale!

However the fact that DEBIAN_DEPENDS requires a comma separation that upsets me.

$ cat recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bbappend

DEBIAN_DEPENDS += ", btrfs-progs"

FILESEXTRAPATHS_prepend := "${THISDIR}:"

SRC_URI += "file://expand-last-partition.sh"

The second thing that upset me is that ${THISDIR}: search always on /debx86 which is the name of the layer

/build/../repo/recipes-support/expand-on-first-boot/debx86

In case I use this one  ${THISDIR}/files: then the path would be debx86/files - mumble mumble

Thanks, R.


Henning Schild

unread,
Sep 30, 2022, 2:25:17 PM9/30/22
to Roberto A. Foglietta, isar-...@googlegroups.com, Schmidl, Tobias
Am Fri, 30 Sep 2022 19:37:09 +0200
schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:

> Il giorno ven 30 set 2022 alle ore 13:42 Henning Schild <
> henning...@siemens.com> ha scritto:
>
> >
> > Feel free to apply that patch in your layer, you can likely bbappend
> > somehow and do not actually have to patch isar.
> >
>
> Geniale!

That sounds like the trick works for you. Make sure to revert it once
the systemd patches are merged and you switch to a new isar. But i
assume the version will be bumped so the append will tell you that it
does not work any longer.

> However the fact that DEBIAN_DEPENDS requires a comma separation that
> upsets me.

We once tried to make that more OE but that is hard. Here you just have
a string that makes it into the control file. It can contain things
like "or" operators and versions. Too debian-specific to find a good
way to apply OE standards on it.

> $ cat
> recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bbappend
>
> DEBIAN_DEPENDS += ", btrfs-progs"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}:"
>
> SRC_URI += "file://expand-last-partition.sh"
>
> The second thing that upset me is that ${THISDIR}: search always on
> /debx86 which is the name of the layer

Mhh you layer.conf should have LAYERDIR_debx86 defined. And you can go

FILESEXTRAPATHS_prepend :=
"${LAYERDIR_debx86}/recipes-support/expand-on-first-boot/files:"

regards,
Henning

Roberto A. Foglietta

unread,
Oct 1, 2022, 10:36:25 AM10/1/22
to Henning Schild, isar-...@googlegroups.com, Schmidl, Tobias
Il giorno ven 30 set 2022 alle ore 20:25 Henning Schild <henning...@siemens.com> ha scritto:
Am Fri, 30 Sep 2022 19:37:09 +0200
schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:

> Il giorno ven 30 set 2022 alle ore 13:42 Henning Schild <
> henning...@siemens.com> ha scritto: 
>
> >
> > Feel free to apply that patch in your layer, you can likely bbappend
> > somehow and do not actually have to patch isar.
> > 
>
> Geniale!

That sounds like the trick works for you. Make sure to revert it once
the systemd patches are merged and you switch to a new isar. But i
assume the version will be bumped so the append will tell you that it
does not work any longer.

> However the fact that DEBIAN_DEPENDS requires a comma separation that
> upsets me.

We once tried to make that more OE but that is hard. Here you just have
a string that makes it into the control file. It can contain things
like "or" operators and versions. Too debian-specific to find a good
way to apply OE standards on it.

Ok, it makes sense now.
 

> $ cat
> recipes-support/expand-on-first-boot/expand-on-first-boot_1.1.bbappend
>
> DEBIAN_DEPENDS += ", btrfs-progs"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}:"
>
> SRC_URI += "file://expand-last-partition.sh"
>
> The second thing that upset me is that ${THISDIR}: search always on
> /debx86 which is the name of the layer

Mhh you layer.conf should have LAYERDIR_debx86 defined. And you can go

FILESEXTRAPATHS_prepend :=
"${LAYERDIR_debx86}/recipes-support/expand-on-first-boot/files:"

yes, it works

FILESEXTRAPATHS_prepend := "${LAYERDIR_debx86}/recipes-support/${PN}/files:"

Thanks, R-

Roberto A. Foglietta

unread,
Oct 4, 2022, 6:17:30 PM10/4/22
to Henning Schild, isar-...@googlegroups.com, Schmidl, Tobias
Il giorno ven 30 set 2022 alle ore 13:42 Henning Schild
<henning...@siemens.com> ha scritto:
>
> Am Fri, 30 Sep 2022 13:29:52 +0200
> schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:
>
> > Il Ven 30 Set 2022, 12:58 Henning Schild <henning...@siemens.com>
> > ha scritto:
> >
> > > Am Fri, 30 Sep 2022 09:43:23 +0200
> > > schrieb "Roberto A. Foglietta" <roberto....@gmail.com>:
> > >

> >
> > Is the btrfs a corner case? ;-)
>
> No. We appreciate btrfs and see it as a very valuable fs some people
> might want to use for their images. Several Isar users already use it
> today.
>

Btrfs Brings Some Great Performance Improvements With Linux 6.1

https://www.phoronix.com/news/Linux-6.1-Btrfs

Just in time! ;-)
Reply all
Reply to author
Forward
0 new messages