mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ovl: change error message to info for empty lowerdir
@ 2024-05-28  9:02 Eric Curtin
  2024-05-28 10:34 ` Miklos Szeredi
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Curtin @ 2024-05-28  9:02 UTC (permalink / raw)
  To: open list:OVERLAY FILESYSTEM
  Cc: Alexander Larsson, Eric Curtin, Wei Wang, Miklos Szeredi,
	Amir Goldstein, open list:OVERLAY FILESYSTEM, open list

In some deployments, an empty lowerdir is not considered an error.
The current implementation logs this scenario as an error during boot,
which can be misleading and cause unnecessary concern for users. This
commit changes the log level from pr_err to pr_info to reflect the
non-error nature of an empty lowerdir in these cases.

Reported-by: Wei Wang <weiwang@redhat.com>
Signed-off-by: Eric Curtin <ecurtin@redhat.com>
---
 fs/overlayfs/params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/overlayfs/params.c b/fs/overlayfs/params.c
index 4860fcc4611bb..53170d73bb79c 100644
--- a/fs/overlayfs/params.c
+++ b/fs/overlayfs/params.c
@@ -231,7 +231,7 @@ static int ovl_mount_dir_noesc(const char *name, struct path *path)
 	int err = -EINVAL;
 
 	if (!*name) {
-		pr_err("empty lowerdir\n");
+		pr_info("empty lowerdir\n");
 		goto out;
 	}
 	err = kern_path(name, LOOKUP_FOLLOW, path);
-- 
2.45.0


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

* Re: [PATCH] ovl: change error message to info for empty lowerdir
  2024-05-28  9:02 [PATCH] ovl: change error message to info for empty lowerdir Eric Curtin
@ 2024-05-28 10:34 ` Miklos Szeredi
  2024-05-28 10:54   ` Eric Curtin
  0 siblings, 1 reply; 5+ messages in thread
From: Miklos Szeredi @ 2024-05-28 10:34 UTC (permalink / raw)
  To: Eric Curtin
  Cc: open list:OVERLAY FILESYSTEM, Alexander Larsson, Wei Wang,
	Amir Goldstein, open list

On Tue, 28 May 2024 at 11:03, Eric Curtin <ecurtin@redhat.com> wrote:
>
> In some deployments, an empty lowerdir is not considered an error.

I don't think this can be triggered in upstream kernel and can be
removed completely.

Or do you have a reproducer?

Thanks,
Miklos

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

* Re: [PATCH] ovl: change error message to info for empty lowerdir
  2024-05-28 10:34 ` Miklos Szeredi
@ 2024-05-28 10:54   ` Eric Curtin
  2024-05-28 11:34     ` Miklos Szeredi
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Curtin @ 2024-05-28 10:54 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: open list:OVERLAY FILESYSTEM, Alexander Larsson, Wei Wang,
	Amir Goldstein, open list

On Tue, 28 May 2024 at 11:34, Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Tue, 28 May 2024 at 11:03, Eric Curtin <ecurtin@redhat.com> wrote:
> >
> > In some deployments, an empty lowerdir is not considered an error.
>
> I don't think this can be triggered in upstream kernel and can be
> removed completely.

True... Just switched to Fedora Rawhide and instead we just see this one:

pr_err("cannot append lower layer");

>
> Or do you have a reproducer?

Run one of these vms:

https://github.com/osbuild/bootc-image-builder

And on boot:

sudo bootc switch quay.io/fedora/fedora-bootc:rawhide && sudo reboot

is the reproducer that is closest to upstream

Is mise le meas/Regards,

Eric Curtin

>
> Thanks,
> Miklos
>


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

* Re: [PATCH] ovl: change error message to info for empty lowerdir
  2024-05-28 10:54   ` Eric Curtin
@ 2024-05-28 11:34     ` Miklos Szeredi
       [not found]       ` <CAL7ro1Hm7EOxKUv9U5vEMbe2Ui2oaCdM0b2Xbm0wbdZ52+JV2w@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Miklos Szeredi @ 2024-05-28 11:34 UTC (permalink / raw)
  To: Eric Curtin
  Cc: open list:OVERLAY FILESYSTEM, Alexander Larsson, Wei Wang,
	Amir Goldstein, open list

On Tue, 28 May 2024 at 12:55, Eric Curtin <ecurtin@redhat.com> wrote:
>
> On Tue, 28 May 2024 at 11:34, Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > On Tue, 28 May 2024 at 11:03, Eric Curtin <ecurtin@redhat.com> wrote:
> > >
> > > In some deployments, an empty lowerdir is not considered an error.
> >
> > I don't think this can be triggered in upstream kernel and can be
> > removed completely.
>
> True... Just switched to Fedora Rawhide and instead we just see this one:
>
> pr_err("cannot append lower layer");
>
> >
> > Or do you have a reproducer?
>
> Run one of these vms:
>
> https://github.com/osbuild/bootc-image-builder

Apparently it is using the legacy lowerdir append mode
"lowerdir=:foo".  This works only on 6.5.

In 6.6 and later the same can be achieved with "lowerdir+=foo".

It's strange that there are not side effects other then the error message.

Thanks,
Miklos

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

* Re: [PATCH] ovl: change error message to info for empty lowerdir
       [not found]       ` <CAL7ro1Hm7EOxKUv9U5vEMbe2Ui2oaCdM0b2Xbm0wbdZ52+JV2w@mail.gmail.com>
@ 2024-05-28 12:25         ` Eric Curtin
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Curtin @ 2024-05-28 12:25 UTC (permalink / raw)
  To: Alexander Larsson
  Cc: Miklos Szeredi, open list:OVERLAY FILESYSTEM, Wei Wang,
	Amir Goldstein, open list

On Tue, 28 May 2024 at 13:23, Alexander Larsson <alexl@redhat.com> wrote:
>
>
>
> On Tue, May 28, 2024 at 1:34 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
>>
>> On Tue, 28 May 2024 at 12:55, Eric Curtin <ecurtin@redhat.com> wrote:
>> >
>> > On Tue, 28 May 2024 at 11:34, Miklos Szeredi <miklos@szeredi.hu> wrote:
>> > >
>> > > On Tue, 28 May 2024 at 11:03, Eric Curtin <ecurtin@redhat.com> wrote:
>> > > >
>> > > > In some deployments, an empty lowerdir is not considered an error.
>> > >
>> > > I don't think this can be triggered in upstream kernel and can be
>> > > removed completely.
>> >
>> > True... Just switched to Fedora Rawhide and instead we just see this one:
>> >
>> > pr_err("cannot append lower layer");
>> >
>> > >
>> > > Or do you have a reproducer?
>> >
>> > Run one of these vms:
>> >
>> > https://github.com/osbuild/bootc-image-builder
>>
>> Apparently it is using the legacy lowerdir append mode
>> "lowerdir=:foo".  This works only on 6.5.
>>
>> In 6.6 and later the same can be achieved with "lowerdir+=foo".
>>
>> It's strange that there are not side effects other then the error message.
>
>
> The code tries to use the new mode, but then falls back on ENOSYS:
>
> https://github.com/containers/composefs/blob/main/libcomposefs/lcfs-mount.c#L431
>
> So, I guess with a more recent kernel it will not print the warning.
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                Red Hat, Inc
>        alexl@redhat.com         alexander.larsson@gmail.com

I realized I never posted the version of the kernel producing this
error message:

pr_err("cannot append lower layer");

So just for clarity in general, that was this one:

Linux fedora 6.9.0-64.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 13
11:58:46 UTC 2024 x86_64 GNU/Linux

Is mise le meas/Regards,

Eric Curtin


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

end of thread, other threads:[~2024-05-28 12:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-28  9:02 [PATCH] ovl: change error message to info for empty lowerdir Eric Curtin
2024-05-28 10:34 ` Miklos Szeredi
2024-05-28 10:54   ` Eric Curtin
2024-05-28 11:34     ` Miklos Szeredi
     [not found]       ` <CAL7ro1Hm7EOxKUv9U5vEMbe2Ui2oaCdM0b2Xbm0wbdZ52+JV2w@mail.gmail.com>
2024-05-28 12:25         ` Eric Curtin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®