All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-07-31  9:10 ` Heinrich Schuchardt
  0 siblings, 0 replies; 14+ messages in thread
From: Heinrich Schuchardt @ 2022-07-31  9:10 UTC (permalink / raw)
  To: Huang Jianan; +Cc: u-boot, linux-erofs, Heinrich Schuchardt

fs_set_blk_dev() probes all file-systems until it finds one that matches
the volume. We do not expect any console output for non-matching
file-systems.

Convert error messages in erofs_read_superblock() to debug output.

Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 fs/erofs/super.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 4cca322b9e..095754dc28 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -65,14 +65,14 @@ int erofs_read_superblock(void)
 
 	ret = erofs_blk_read(data, 0, 1);
 	if (ret < 0) {
-		erofs_err("cannot read erofs superblock: %d", ret);
+		erofs_dbg("cannot read erofs superblock: %d", ret);
 		return -EIO;
 	}
 	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
 
 	ret = -EINVAL;
 	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
-		erofs_err("cannot find valid erofs superblock");
+		erofs_dbg("cannot find valid erofs superblock");
 		return ret;
 	}
 
@@ -81,7 +81,7 @@ int erofs_read_superblock(void)
 	blkszbits = dsb->blkszbits;
 	/* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
 	if (blkszbits != LOG_BLOCK_SIZE) {
-		erofs_err("blksize %u isn't supported on this platform",
+		erofs_dbg("blksize %u isn't supported on this platform",
 			  1 << blkszbits);
 		return ret;
 	}
-- 
2.36.1


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

* [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-07-31  9:10 ` Heinrich Schuchardt
  0 siblings, 0 replies; 14+ messages in thread
From: Heinrich Schuchardt @ 2022-07-31  9:10 UTC (permalink / raw)
  To: Huang Jianan; +Cc: linux-erofs, u-boot, Heinrich Schuchardt

fs_set_blk_dev() probes all file-systems until it finds one that matches
the volume. We do not expect any console output for non-matching
file-systems.

Convert error messages in erofs_read_superblock() to debug output.

Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 fs/erofs/super.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 4cca322b9e..095754dc28 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -65,14 +65,14 @@ int erofs_read_superblock(void)
 
 	ret = erofs_blk_read(data, 0, 1);
 	if (ret < 0) {
-		erofs_err("cannot read erofs superblock: %d", ret);
+		erofs_dbg("cannot read erofs superblock: %d", ret);
 		return -EIO;
 	}
 	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
 
 	ret = -EINVAL;
 	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
-		erofs_err("cannot find valid erofs superblock");
+		erofs_dbg("cannot find valid erofs superblock");
 		return ret;
 	}
 
@@ -81,7 +81,7 @@ int erofs_read_superblock(void)
 	blkszbits = dsb->blkszbits;
 	/* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
 	if (blkszbits != LOG_BLOCK_SIZE) {
-		erofs_err("blksize %u isn't supported on this platform",
+		erofs_dbg("blksize %u isn't supported on this platform",
 			  1 << blkszbits);
 		return ret;
 	}
-- 
2.36.1


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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
  2022-07-31  9:10 ` Heinrich Schuchardt
@ 2022-07-31 13:49   ` Huang Jianan
  -1 siblings, 0 replies; 14+ messages in thread
From: Huang Jianan @ 2022-07-31 13:49 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot, linux-erofs



在 2022/7/31 17:10, Heinrich Schuchardt 写道:
> fs_set_blk_dev() probes all file-systems until it finds one that matches
> the volume. We do not expect any console output for non-matching
> file-systems.
> 
> Convert error messages in erofs_read_superblock() to debug output.
> 
> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>   fs/erofs/super.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 4cca322b9e..095754dc28 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>   
>   	ret = erofs_blk_read(data, 0, 1);
>   	if (ret < 0) {
> -		erofs_err("cannot read erofs superblock: %d", ret);
> +		erofs_dbg("cannot read erofs superblock: %d", ret);
>   		return -EIO;
>   	}
>   	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>   
>   	ret = -EINVAL;
>   	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> -		erofs_err("cannot find valid erofs superblock");
> +		erofs_dbg("cannot find valid erofs superblock");
>   		return ret;
>   	}
>   
> @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
>   	blkszbits = dsb->blkszbits;
>   	/* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
>   	if (blkszbits != LOG_BLOCK_SIZE) {
> -		erofs_err("blksize %u isn't supported on this platform",
> +		erofs_dbg("blksize %u isn't supported on this platform",
>   			  1 << blkszbits);
>   		return ret;
>   	}
Reviewed-by: Huang Jianan <jnhuang95@gmail.com>

Thanks,
Jianan

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-07-31 13:49   ` Huang Jianan
  0 siblings, 0 replies; 14+ messages in thread
From: Huang Jianan @ 2022-07-31 13:49 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: linux-erofs, u-boot



在 2022/7/31 17:10, Heinrich Schuchardt 写道:
> fs_set_blk_dev() probes all file-systems until it finds one that matches
> the volume. We do not expect any console output for non-matching
> file-systems.
> 
> Convert error messages in erofs_read_superblock() to debug output.
> 
> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>   fs/erofs/super.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 4cca322b9e..095754dc28 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>   
>   	ret = erofs_blk_read(data, 0, 1);
>   	if (ret < 0) {
> -		erofs_err("cannot read erofs superblock: %d", ret);
> +		erofs_dbg("cannot read erofs superblock: %d", ret);
>   		return -EIO;
>   	}
>   	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>   
>   	ret = -EINVAL;
>   	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> -		erofs_err("cannot find valid erofs superblock");
> +		erofs_dbg("cannot find valid erofs superblock");
>   		return ret;
>   	}
>   
> @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
>   	blkszbits = dsb->blkszbits;
>   	/* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
>   	if (blkszbits != LOG_BLOCK_SIZE) {
> -		erofs_err("blksize %u isn't supported on this platform",
> +		erofs_dbg("blksize %u isn't supported on this platform",
>   			  1 << blkszbits);
>   		return ret;
>   	}
Reviewed-by: Huang Jianan <jnhuang95@gmail.com>

Thanks,
Jianan

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
  2022-07-31  9:10 ` Heinrich Schuchardt
@ 2022-07-31 18:41   ` Simon Glass
  -1 siblings, 0 replies; 14+ messages in thread
From: Simon Glass @ 2022-07-31 18:41 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Huang Jianan, linux-erofs, U-Boot Mailing List

On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> fs_set_blk_dev() probes all file-systems until it finds one that matches
> the volume. We do not expect any console output for non-matching
> file-systems.
>
> Convert error messages in erofs_read_superblock() to debug output.
>
> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  fs/erofs/super.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 4cca322b9e..095754dc28 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>
>         ret = erofs_blk_read(data, 0, 1);
>         if (ret < 0) {
> -               erofs_err("cannot read erofs superblock: %d", ret);
> +               erofs_dbg("cannot read erofs superblock: %d", ret);
>                 return -EIO;
>         }
>         dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>
>         ret = -EINVAL;
>         if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> -               erofs_err("cannot find valid erofs superblock");
> +               erofs_dbg("cannot find valid erofs superblock");
>                 return ret;
>         }
>
> @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
>         blkszbits = dsb->blkszbits;
>         /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
>         if (blkszbits != LOG_BLOCK_SIZE) {
> -               erofs_err("blksize %u isn't supported on this platform",
> +               erofs_dbg("blksize %u isn't supported on this platform",
>                           1 << blkszbits);

Does this message appear in normal scanning, or is it a genuine error?

>                 return ret;
>         }

> --
> 2.36.1
>

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-07-31 18:41   ` Simon Glass
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Glass @ 2022-07-31 18:41 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: U-Boot Mailing List, linux-erofs

On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> fs_set_blk_dev() probes all file-systems until it finds one that matches
> the volume. We do not expect any console output for non-matching
> file-systems.
>
> Convert error messages in erofs_read_superblock() to debug output.
>
> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  fs/erofs/super.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 4cca322b9e..095754dc28 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>
>         ret = erofs_blk_read(data, 0, 1);
>         if (ret < 0) {
> -               erofs_err("cannot read erofs superblock: %d", ret);
> +               erofs_dbg("cannot read erofs superblock: %d", ret);
>                 return -EIO;
>         }
>         dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>
>         ret = -EINVAL;
>         if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> -               erofs_err("cannot find valid erofs superblock");
> +               erofs_dbg("cannot find valid erofs superblock");
>                 return ret;
>         }
>
> @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
>         blkszbits = dsb->blkszbits;
>         /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
>         if (blkszbits != LOG_BLOCK_SIZE) {
> -               erofs_err("blksize %u isn't supported on this platform",
> +               erofs_dbg("blksize %u isn't supported on this platform",
>                           1 << blkszbits);

Does this message appear in normal scanning, or is it a genuine error?

>                 return ret;
>         }

> --
> 2.36.1
>

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
  2022-07-31 18:41   ` Simon Glass
@ 2022-07-31 20:53     ` Heinrich Schuchardt
  -1 siblings, 0 replies; 14+ messages in thread
From: Heinrich Schuchardt @ 2022-07-31 20:53 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List, linux-erofs



On 7/31/22 20:41, Simon Glass wrote:
> On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>> fs_set_blk_dev() probes all file-systems until it finds one that matches
>> the volume. We do not expect any console output for non-matching
>> file-systems.
>>
>> Convert error messages in erofs_read_superblock() to debug output.
>>
>> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>>   fs/erofs/super.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
>>
>> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
>> index 4cca322b9e..095754dc28 100644
>> --- a/fs/erofs/super.c
>> +++ b/fs/erofs/super.c
>> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>>
>>          ret = erofs_blk_read(data, 0, 1);
>>          if (ret < 0) {
>> -               erofs_err("cannot read erofs superblock: %d", ret);
>> +               erofs_dbg("cannot read erofs superblock: %d", ret);
>>                  return -EIO;
>>          }
>>          dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>>
>>          ret = -EINVAL;
>>          if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
>> -               erofs_err("cannot find valid erofs superblock");
>> +               erofs_dbg("cannot find valid erofs superblock");
>>                  return ret;
>>          }
> 
>> @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
>>          blkszbits = dsb->blkszbits;
>>          /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
>>          if (blkszbits != LOG_BLOCK_SIZE) {
>> -               erofs_err("blksize %u isn't supported on this platform",
>> +               erofs_dbg("blksize %u isn't supported on this platform",
>>                            1 << blkszbits);
> 
> Does this message appear in normal scanning, or is it a genuine error?

The erofs driver on Linux only supports LOG_BLOCK_SIZE == 12. So if we 
see this message we don't have a valid erofs file system.

@linux-erofs:

The Linux driver requires EROFS_BLKSIZ == PAGE_SIZE == 4096.
The page size on arm64 can be 4 KiB, 16 KiB, or 64 KiB.
The page size on amd64 can be 4 KiB, 2 MiB or 4 MiB.
Requiring EROFS_BLKSIZ == PAGE_SIZE is obviously a restriction that 
should be lifted.

Best regards

Heinrich

> 
>>                  return ret;
>>          }
> 
>> --
>> 2.36.1
>>

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-07-31 20:53     ` Heinrich Schuchardt
  0 siblings, 0 replies; 14+ messages in thread
From: Heinrich Schuchardt @ 2022-07-31 20:53 UTC (permalink / raw)
  To: Simon Glass; +Cc: Huang Jianan, linux-erofs, U-Boot Mailing List



On 7/31/22 20:41, Simon Glass wrote:
> On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt
> <heinrich.schuchardt@canonical.com> wrote:
>>
>> fs_set_blk_dev() probes all file-systems until it finds one that matches
>> the volume. We do not expect any console output for non-matching
>> file-systems.
>>
>> Convert error messages in erofs_read_superblock() to debug output.
>>
>> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
>> ---
>>   fs/erofs/super.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
>>
>> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
>> index 4cca322b9e..095754dc28 100644
>> --- a/fs/erofs/super.c
>> +++ b/fs/erofs/super.c
>> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>>
>>          ret = erofs_blk_read(data, 0, 1);
>>          if (ret < 0) {
>> -               erofs_err("cannot read erofs superblock: %d", ret);
>> +               erofs_dbg("cannot read erofs superblock: %d", ret);
>>                  return -EIO;
>>          }
>>          dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>>
>>          ret = -EINVAL;
>>          if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
>> -               erofs_err("cannot find valid erofs superblock");
>> +               erofs_dbg("cannot find valid erofs superblock");
>>                  return ret;
>>          }
> 
>> @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
>>          blkszbits = dsb->blkszbits;
>>          /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
>>          if (blkszbits != LOG_BLOCK_SIZE) {
>> -               erofs_err("blksize %u isn't supported on this platform",
>> +               erofs_dbg("blksize %u isn't supported on this platform",
>>                            1 << blkszbits);
> 
> Does this message appear in normal scanning, or is it a genuine error?

The erofs driver on Linux only supports LOG_BLOCK_SIZE == 12. So if we 
see this message we don't have a valid erofs file system.

@linux-erofs:

The Linux driver requires EROFS_BLKSIZ == PAGE_SIZE == 4096.
The page size on arm64 can be 4 KiB, 16 KiB, or 64 KiB.
The page size on amd64 can be 4 KiB, 2 MiB or 4 MiB.
Requiring EROFS_BLKSIZ == PAGE_SIZE is obviously a restriction that 
should be lifted.

Best regards

Heinrich

> 
>>                  return ret;
>>          }
> 
>> --
>> 2.36.1
>>

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
  2022-07-31 20:53     ` Heinrich Schuchardt
@ 2022-07-31 22:42       ` Gao Xiang
  -1 siblings, 0 replies; 14+ messages in thread
From: Gao Xiang @ 2022-07-31 22:42 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: U-Boot Mailing List, Simon Glass, linux-erofs

On Sun, Jul 31, 2022 at 10:53:52PM +0200, Heinrich Schuchardt wrote:
> 
> 
> On 7/31/22 20:41, Simon Glass wrote:
> > On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> > > 
> > > fs_set_blk_dev() probes all file-systems until it finds one that matches
> > > the volume. We do not expect any console output for non-matching
> > > file-systems.
> > > 
> > > Convert error messages in erofs_read_superblock() to debug output.
> > > 
> > > Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > ---
> > >   fs/erofs/super.c | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > 
> > > 
> > > diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> > > index 4cca322b9e..095754dc28 100644
> > > --- a/fs/erofs/super.c
> > > +++ b/fs/erofs/super.c
> > > @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
> > > 
> > >          ret = erofs_blk_read(data, 0, 1);
> > >          if (ret < 0) {
> > > -               erofs_err("cannot read erofs superblock: %d", ret);
> > > +               erofs_dbg("cannot read erofs superblock: %d", ret);
> > >                  return -EIO;
> > >          }
> > >          dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
> > > 
> > >          ret = -EINVAL;
> > >          if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> > > -               erofs_err("cannot find valid erofs superblock");
> > > +               erofs_dbg("cannot find valid erofs superblock");
> > >                  return ret;
> > >          }
> > 
> > > @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
> > >          blkszbits = dsb->blkszbits;
> > >          /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
> > >          if (blkszbits != LOG_BLOCK_SIZE) {
> > > -               erofs_err("blksize %u isn't supported on this platform",
> > > +               erofs_dbg("blksize %u isn't supported on this platform",
> > >                            1 << blkszbits);
> > 
> > Does this message appear in normal scanning, or is it a genuine error?
> 
> The erofs driver on Linux only supports LOG_BLOCK_SIZE == 12. So if we see
> this message we don't have a valid erofs file system.
> 
> @linux-erofs:
> 
> The Linux driver requires EROFS_BLKSIZ == PAGE_SIZE == 4096.
> The page size on arm64 can be 4 KiB, 16 KiB, or 64 KiB.
> The page size on amd64 can be 4 KiB, 2 MiB or 4 MiB.
> Requiring EROFS_BLKSIZ == PAGE_SIZE is obviously a restriction that should
> be lifted.

Yeah, EROFS doesn't support EROFS_BLKSIZ != PAGE_SIZE explicitly for now,
please help error out this message. Thanks!

Thanks,
Gao Xiang

> 
> Best regards
> 
> Heinrich

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-07-31 22:42       ` Gao Xiang
  0 siblings, 0 replies; 14+ messages in thread
From: Gao Xiang @ 2022-07-31 22:42 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: Simon Glass, U-Boot Mailing List, linux-erofs

On Sun, Jul 31, 2022 at 10:53:52PM +0200, Heinrich Schuchardt wrote:
> 
> 
> On 7/31/22 20:41, Simon Glass wrote:
> > On Sun, 31 Jul 2022 at 03:10, Heinrich Schuchardt
> > <heinrich.schuchardt@canonical.com> wrote:
> > > 
> > > fs_set_blk_dev() probes all file-systems until it finds one that matches
> > > the volume. We do not expect any console output for non-matching
> > > file-systems.
> > > 
> > > Convert error messages in erofs_read_superblock() to debug output.
> > > 
> > > Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> > > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > > ---
> > >   fs/erofs/super.c | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > 
> > > 
> > > diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> > > index 4cca322b9e..095754dc28 100644
> > > --- a/fs/erofs/super.c
> > > +++ b/fs/erofs/super.c
> > > @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
> > > 
> > >          ret = erofs_blk_read(data, 0, 1);
> > >          if (ret < 0) {
> > > -               erofs_err("cannot read erofs superblock: %d", ret);
> > > +               erofs_dbg("cannot read erofs superblock: %d", ret);
> > >                  return -EIO;
> > >          }
> > >          dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
> > > 
> > >          ret = -EINVAL;
> > >          if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> > > -               erofs_err("cannot find valid erofs superblock");
> > > +               erofs_dbg("cannot find valid erofs superblock");
> > >                  return ret;
> > >          }
> > 
> > > @@ -81,7 +81,7 @@ int erofs_read_superblock(void)
> > >          blkszbits = dsb->blkszbits;
> > >          /* 9(512 bytes) + LOG_SECTORS_PER_BLOCK == LOG_BLOCK_SIZE */
> > >          if (blkszbits != LOG_BLOCK_SIZE) {
> > > -               erofs_err("blksize %u isn't supported on this platform",
> > > +               erofs_dbg("blksize %u isn't supported on this platform",
> > >                            1 << blkszbits);
> > 
> > Does this message appear in normal scanning, or is it a genuine error?
> 
> The erofs driver on Linux only supports LOG_BLOCK_SIZE == 12. So if we see
> this message we don't have a valid erofs file system.
> 
> @linux-erofs:
> 
> The Linux driver requires EROFS_BLKSIZ == PAGE_SIZE == 4096.
> The page size on arm64 can be 4 KiB, 16 KiB, or 64 KiB.
> The page size on amd64 can be 4 KiB, 2 MiB or 4 MiB.
> Requiring EROFS_BLKSIZ == PAGE_SIZE is obviously a restriction that should
> be lifted.

Yeah, EROFS doesn't support EROFS_BLKSIZ != PAGE_SIZE explicitly for now,
please help error out this message. Thanks!

Thanks,
Gao Xiang

> 
> Best regards
> 
> Heinrich

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
  2022-08-01 13:27 ` Heinrich Schuchardt
@ 2022-08-01 14:42   ` Huang Jianan
  -1 siblings, 0 replies; 14+ messages in thread
From: Huang Jianan @ 2022-08-01 14:42 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: linux-erofs, u-boot, Simon Glass

在 2022年8月1日星期一,Heinrich Schuchardt <heinrich.schuchardt@canonical.com> 写道:

> fs_set_blk_dev() probes all file-systems until it finds one that matches
> the volume. We do not expect any console output for non-matching
> file-systems.
>
> Convert error messages in erofs_read_superblock() to debug output.
>
> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> v2:
>         keep erofs_err() for block size mismatch
> ---
>  fs/erofs/super.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)


Looks good to me.
Reviewed-by: Huang Jianan <jnhuang95@gmail.com>

Thanks,
Jianan

>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 4cca322b9e..8277d9b53f 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>
>         ret = erofs_blk_read(data, 0, 1);
>         if (ret < 0) {
> -               erofs_err("cannot read erofs superblock: %d", ret);
> +               erofs_dbg("cannot read erofs superblock: %d", ret);
>                 return -EIO;
>         }
>         dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>
>         ret = -EINVAL;
>         if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> -               erofs_err("cannot find valid erofs superblock");
> +               erofs_dbg("cannot find valid erofs superblock");
>                 return ret;
>         }
>
> --
> 2.36.1
>
>

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

* Re: [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-08-01 14:42   ` Huang Jianan
  0 siblings, 0 replies; 14+ messages in thread
From: Huang Jianan @ 2022-08-01 14:42 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot, Simon Glass, linux-erofs

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

在 2022年8月1日星期一,Heinrich Schuchardt <heinrich.schuchardt@canonical.com> 写道:

> fs_set_blk_dev() probes all file-systems until it finds one that matches
> the volume. We do not expect any console output for non-matching
> file-systems.
>
> Convert error messages in erofs_read_superblock() to debug output.
>
> Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> v2:
>         keep erofs_err() for block size mismatch
> ---
>  fs/erofs/super.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)


Looks good to me.
Reviewed-by: Huang Jianan <jnhuang95@gmail.com>

Thanks,
Jianan

>
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 4cca322b9e..8277d9b53f 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -65,14 +65,14 @@ int erofs_read_superblock(void)
>
>         ret = erofs_blk_read(data, 0, 1);
>         if (ret < 0) {
> -               erofs_err("cannot read erofs superblock: %d", ret);
> +               erofs_dbg("cannot read erofs superblock: %d", ret);
>                 return -EIO;
>         }
>         dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>
>         ret = -EINVAL;
>         if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
> -               erofs_err("cannot find valid erofs superblock");
> +               erofs_dbg("cannot find valid erofs superblock");
>                 return ret;
>         }
>
> --
> 2.36.1
>
>

[-- Attachment #2: Type: text/html, Size: 2351 bytes --]

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

* [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-08-01 13:27 ` Heinrich Schuchardt
  0 siblings, 0 replies; 14+ messages in thread
From: Heinrich Schuchardt @ 2022-08-01 13:27 UTC (permalink / raw)
  To: Huang Jianan; +Cc: u-boot, Simon Glass, linux-erofs, Heinrich Schuchardt

fs_set_blk_dev() probes all file-systems until it finds one that matches
the volume. We do not expect any console output for non-matching
file-systems.

Convert error messages in erofs_read_superblock() to debug output.

Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v2:
	keep erofs_err() for block size mismatch
---
 fs/erofs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 4cca322b9e..8277d9b53f 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -65,14 +65,14 @@ int erofs_read_superblock(void)
 
 	ret = erofs_blk_read(data, 0, 1);
 	if (ret < 0) {
-		erofs_err("cannot read erofs superblock: %d", ret);
+		erofs_dbg("cannot read erofs superblock: %d", ret);
 		return -EIO;
 	}
 	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
 
 	ret = -EINVAL;
 	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
-		erofs_err("cannot find valid erofs superblock");
+		erofs_dbg("cannot find valid erofs superblock");
 		return ret;
 	}
 
-- 
2.36.1


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

* [PATCH 1/1] fs/erofs: silence erofs_probe()
@ 2022-08-01 13:27 ` Heinrich Schuchardt
  0 siblings, 0 replies; 14+ messages in thread
From: Heinrich Schuchardt @ 2022-08-01 13:27 UTC (permalink / raw)
  To: Huang Jianan; +Cc: linux-erofs, u-boot, Simon Glass, Heinrich Schuchardt

fs_set_blk_dev() probes all file-systems until it finds one that matches
the volume. We do not expect any console output for non-matching
file-systems.

Convert error messages in erofs_read_superblock() to debug output.

Fixes: 830613f8f5bb ("fs/erofs: add erofs filesystem support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v2:
	keep erofs_err() for block size mismatch
---
 fs/erofs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 4cca322b9e..8277d9b53f 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -65,14 +65,14 @@ int erofs_read_superblock(void)
 
 	ret = erofs_blk_read(data, 0, 1);
 	if (ret < 0) {
-		erofs_err("cannot read erofs superblock: %d", ret);
+		erofs_dbg("cannot read erofs superblock: %d", ret);
 		return -EIO;
 	}
 	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
 
 	ret = -EINVAL;
 	if (le32_to_cpu(dsb->magic) != EROFS_SUPER_MAGIC_V1) {
-		erofs_err("cannot find valid erofs superblock");
+		erofs_dbg("cannot find valid erofs superblock");
 		return ret;
 	}
 
-- 
2.36.1


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

end of thread, other threads:[~2022-08-01 14:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-31  9:10 [PATCH 1/1] fs/erofs: silence erofs_probe() Heinrich Schuchardt
2022-07-31  9:10 ` Heinrich Schuchardt
2022-07-31 13:49 ` Huang Jianan
2022-07-31 13:49   ` Huang Jianan
2022-07-31 18:41 ` Simon Glass
2022-07-31 18:41   ` Simon Glass
2022-07-31 20:53   ` Heinrich Schuchardt
2022-07-31 20:53     ` Heinrich Schuchardt
2022-07-31 22:42     ` Gao Xiang
2022-07-31 22:42       ` Gao Xiang
2022-08-01 13:27 Heinrich Schuchardt
2022-08-01 13:27 ` Heinrich Schuchardt
2022-08-01 14:42 ` Huang Jianan
2022-08-01 14:42   ` Huang Jianan

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.