initramfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dracut: dmsquash-live: overlay module can be built-in the kernel
@ 2022-05-18  9:47 Federico Vaga
       [not found] ` <20220518094707.943732-1-federico.vaga-vJEk5272eHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Vaga @ 2022-05-18  9:47 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: German Maglione, Federico Vaga

The dmsquash-live module assumes that `overlay` is always a module.
Therefore, when `overlay` is built-in the kernel, this module will fail
to detect the presence of such a feature.

This patch adds a fallback mechanism to check also `/proc/filesystem`.
This is also what happens with the dracut NSF module when loading the
kernel module `rpc_pipefs`.

Signed-off-by: Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org>
---
 v1 -> v2: do not use unnecessary sub-shell in the if statement

 modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
index fd8a858a..f68a979c 100755
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -170,7 +170,7 @@ do_live_overlay() {
         fi
     fi
     if [ -n "$overlayfs" ]; then
-        if ! modprobe overlay; then
+        if ! { modprobe overlay || strstr "$(cat /proc/filesystems)" overlay; }; then
             if [ "$overlayfs" = required ]; then
                 die "OverlayFS is required but not available."
                 exit 1
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dracut: dmsquash-live: overlay module can be built-in the kernel
       [not found] ` <20220518094707.943732-1-federico.vaga-vJEk5272eHo@public.gmane.org>
@ 2022-08-02 13:51   ` Federico Vaga
       [not found]     ` <CAEcBt+WXEhVnXkiCesXhS7QqROFbpcMBoSqqamuAcH8yRFwgaQ@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Vaga @ 2022-08-02 13:51 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

Hello,

I've never got a feedback on this patch. Will it be integrated?

Thanks

On Wed, May 18, 2022 at 11:47:07AM +0200, Federico Vaga wrote:
>The dmsquash-live module assumes that `overlay` is always a module.
>Therefore, when `overlay` is built-in the kernel, this module will fail
>to detect the presence of such a feature.
>
>This patch adds a fallback mechanism to check also `/proc/filesystem`.
>This is also what happens with the dracut NSF module when loading the
>kernel module `rpc_pipefs`.
>
>Signed-off-by: Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org>
>---
> v1 -> v2: do not use unnecessary sub-shell in the if statement
>
> modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
>index fd8a858a..f68a979c 100755
>--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
>+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
>@@ -170,7 +170,7 @@ do_live_overlay() {
>         fi
>     fi
>     if [ -n "$overlayfs" ]; then
>-        if ! modprobe overlay; then
>+        if ! { modprobe overlay || strstr "$(cat /proc/filesystems)" overlay; }; then
>             if [ "$overlayfs" = required ]; then
>                 die "OverlayFS is required but not available."
>                 exit 1
>-- 
>2.27.0
>

-- 
-------------------------------
Federico Vaga - CERN BE-CEM-EDL

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dracut: dmsquash-live: overlay module can be built-in the kernel
       [not found]       ` <CAEcBt+WXEhVnXkiCesXhS7QqROFbpcMBoSqqamuAcH8yRFwgaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-08-03 15:10         ` Federico Vaga
       [not found]           ` <20220803151025.gvst5p2ymdcdfhif-1QOQnPiIM9xnkehFW44Bwe1GAupnlqi7@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Vaga @ 2022-08-03 15:10 UTC (permalink / raw)
  To: Frederick Grose; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

Great, thanks. Should I do directly do a pull request next time?

On Tue, Aug 02, 2022 at 07:00:33PM -0400, Frederick Grose wrote:
>How about this?
>https://github.com/dracutdevs/dracut/pull/1886
>
>On Tue, Aug 2, 2022 at 9:56 AM Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org> wrote:
>
>> Hello,
>>
>> I've never got a feedback on this patch. Will it be integrated?
>>
>> Thanks
>>
>> On Wed, May 18, 2022 at 11:47:07AM +0200, Federico Vaga wrote:
>> >The dmsquash-live module assumes that `overlay` is always a module.
>> >Therefore, when `overlay` is built-in the kernel, this module will fail
>> >to detect the presence of such a feature.
>> >
>> >This patch adds a fallback mechanism to check also `/proc/filesystem`.
>> >This is also what happens with the dracut NSF module when loading the
>> >kernel module `rpc_pipefs`.
>> >
>> >Signed-off-by: Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org>
>> >---
>> > v1 -> v2: do not use unnecessary sub-shell in the if statement
>> >
>> > modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
>> > 1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> >diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh
>> b/modules.d/90dmsquash-live/dmsquash-live-root.sh
>> >index fd8a858a..f68a979c 100755
>> >--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
>> >+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
>> >@@ -170,7 +170,7 @@ do_live_overlay() {
>> >         fi
>> >     fi
>> >     if [ -n "$overlayfs" ]; then
>> >-        if ! modprobe overlay; then
>> >+        if ! { modprobe overlay || strstr "$(cat /proc/filesystems)"
>> overlay; }; then
>> >             if [ "$overlayfs" = required ]; then
>> >                 die "OverlayFS is required but not available."
>> >                 exit 1
>> >--
>> >2.27.0
>> >
>>
>> --
>> -------------------------------
>> Federico Vaga - CERN BE-CEM-EDL
>>

-- 
-------------------------------
Federico Vaga - CERN BE-CEM-EDL

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dracut: dmsquash-live: overlay module can be built-in the kernel
       [not found]           ` <20220803151025.gvst5p2ymdcdfhif-1QOQnPiIM9xnkehFW44Bwe1GAupnlqi7@public.gmane.org>
@ 2022-08-03 17:41             ` Frederick Grose
  0 siblings, 0 replies; 5+ messages in thread
From: Frederick Grose @ 2022-08-03 17:41 UTC (permalink / raw)
  To: Federico Vaga; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

Yes, but see the question from Marcos Mello (marcosfrm).  Please explain.

On Wed, Aug 3, 2022 at 11:10 AM Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org> wrote:
>
> Great, thanks. Should I do directly do a pull request next time?
>
> On Tue, Aug 02, 2022 at 07:00:33PM -0400, Frederick Grose wrote:
> >How about this?
> >https://github.com/dracutdevs/dracut/pull/1886
> >
> >On Tue, Aug 2, 2022 at 9:56 AM Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org> wrote:
> >
> >> Hello,
> >>
> >> I've never got a feedback on this patch. Will it be integrated?
> >>
> >> Thanks
> >>
> >> On Wed, May 18, 2022 at 11:47:07AM +0200, Federico Vaga wrote:
> >> >The dmsquash-live module assumes that `overlay` is always a module.
> >> >Therefore, when `overlay` is built-in the kernel, this module will fail
> >> >to detect the presence of such a feature.
> >> >
> >> >This patch adds a fallback mechanism to check also `/proc/filesystem`.
> >> >This is also what happens with the dracut NSF module when loading the
> >> >kernel module `rpc_pipefs`.
> >> >
> >> >Signed-off-by: Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org>
> >> >---
> >> > v1 -> v2: do not use unnecessary sub-shell in the if statement
> >> >
> >> > modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
> >> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> >diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >> b/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >> >index fd8a858a..f68a979c 100755
> >> >--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >> >+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >> >@@ -170,7 +170,7 @@ do_live_overlay() {
> >> >         fi
> >> >     fi
> >> >     if [ -n "$overlayfs" ]; then
> >> >-        if ! modprobe overlay; then
> >> >+        if ! { modprobe overlay || strstr "$(cat /proc/filesystems)"
> >> overlay; }; then
> >> >             if [ "$overlayfs" = required ]; then
> >> >                 die "OverlayFS is required but not available."
> >> >                 exit 1
> >> >--

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dracut: dmsquash-live: overlay module can be built-in the kernel
@ 2022-08-02 23:33 Frederick Grose
  0 siblings, 0 replies; 5+ messages in thread
From: Frederick Grose @ 2022-08-02 23:33 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

How about this?
https://github.com/dracutdevs/dracut/pull/1886

On Tue, Aug 2, 2022 at 9:56 AM Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org> wrote:
>
> Hello,
>
> I've never got a feedback on this patch. Will it be integrated?
>
> Thanks
>
> On Wed, May 18, 2022 at 11:47:07AM +0200, Federico Vaga wrote:
> >The dmsquash-live module assumes that `overlay` is always a module.
> >Therefore, when `overlay` is built-in the kernel, this module will fail
> >to detect the presence of such a feature.
> >
> >This patch adds a fallback mechanism to check also `/proc/filesystem`.
> >This is also what happens with the dracut NSF module when loading the
> >kernel module `rpc_pipefs`.
> >
> >Signed-off-by: Federico Vaga <federico.vaga-vJEk5272eHo@public.gmane.org>
> >---
> > v1 -> v2: do not use unnecessary sub-shell in the if statement
> >
> > modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >index fd8a858a..f68a979c 100755
> >--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
> >@@ -170,7 +170,7 @@ do_live_overlay() {
> >         fi
> >     fi
> >     if [ -n "$overlayfs" ]; then
> >-        if ! modprobe overlay; then
> >+        if ! { modprobe overlay || strstr "$(cat /proc/filesystems)" overlay; }; then
> >             if [ "$overlayfs" = required ]; then
> >                 die "OverlayFS is required but not available."
> >                 exit 1
> >--
> >2.27.0
> >
>
> --
> -------------------------------
> Federico Vaga - CERN BE-CEM-EDL

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-03 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18  9:47 [PATCH v2] dracut: dmsquash-live: overlay module can be built-in the kernel Federico Vaga
     [not found] ` <20220518094707.943732-1-federico.vaga-vJEk5272eHo@public.gmane.org>
2022-08-02 13:51   ` Federico Vaga
     [not found]     ` <CAEcBt+WXEhVnXkiCesXhS7QqROFbpcMBoSqqamuAcH8yRFwgaQ@mail.gmail.com>
     [not found]       ` <CAEcBt+WXEhVnXkiCesXhS7QqROFbpcMBoSqqamuAcH8yRFwgaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-08-03 15:10         ` Federico Vaga
     [not found]           ` <20220803151025.gvst5p2ymdcdfhif-1QOQnPiIM9xnkehFW44Bwe1GAupnlqi7@public.gmane.org>
2022-08-03 17:41             ` Frederick Grose
2022-08-02 23:33 Frederick Grose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).