fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] common/rc: set maximum label length for ext4
@ 2021-11-23 10:11 Lukas Czerner
  2021-11-28 14:33 ` Eryu Guan
  2022-01-31 17:07 ` Darrick J. Wong
  0 siblings, 2 replies; 6+ messages in thread
From: Lukas Czerner @ 2021-11-23 10:11 UTC (permalink / raw)
  To: fstests, linux-ext4

Set maximum label length for ext4 in _label_get_max() to be able to test
online file system label set/get ioctls.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/rc b/common/rc
index 8e351f17..50d6d0bd 100644
--- a/common/rc
+++ b/common/rc
@@ -4545,6 +4545,9 @@ _label_get_max()
 	f2fs)
 		echo 255
 		;;
+	ext2|ext3|ext4)
+		echo 16
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
-- 
2.31.1


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

* Re: [PATCH] common/rc: set maximum label length for ext4
  2021-11-23 10:11 [PATCH] common/rc: set maximum label length for ext4 Lukas Czerner
@ 2021-11-28 14:33 ` Eryu Guan
  2021-11-29  9:55   ` Lukas Czerner
  2022-01-31  9:42   ` Lukas Czerner
  2022-01-31 17:07 ` Darrick J. Wong
  1 sibling, 2 replies; 6+ messages in thread
From: Eryu Guan @ 2021-11-28 14:33 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: fstests, linux-ext4

On Tue, Nov 23, 2021 at 11:11:19AM +0100, Lukas Czerner wrote:
> Set maximum label length for ext4 in _label_get_max() to be able to test
> online file system label set/get ioctls.

Some background info included in commit log would be good, e.g. ext4
didn't support get/set label ioctl but we're going to add that support
in both kernel and e2fsprogs.

And I noticed the kernel patch is still in review, and has no comments
so far. So I'd like to wait and make sure the new ioctl will be accepted
first.

Thanks,
Eryu

> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
>  common/rc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 8e351f17..50d6d0bd 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4545,6 +4545,9 @@ _label_get_max()
>  	f2fs)
>  		echo 255
>  		;;
> +	ext2|ext3|ext4)
> +		echo 16
> +		;;
>  	*)
>  		_notrun "$FSTYP does not define maximum label length"
>  		;;
> -- 
> 2.31.1

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

* Re: [PATCH] common/rc: set maximum label length for ext4
  2021-11-28 14:33 ` Eryu Guan
@ 2021-11-29  9:55   ` Lukas Czerner
  2022-01-31  9:42   ` Lukas Czerner
  1 sibling, 0 replies; 6+ messages in thread
From: Lukas Czerner @ 2021-11-29  9:55 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, linux-ext4

On Sun, Nov 28, 2021 at 10:33:41PM +0800, Eryu Guan wrote:
> On Tue, Nov 23, 2021 at 11:11:19AM +0100, Lukas Czerner wrote:
> > Set maximum label length for ext4 in _label_get_max() to be able to test
> > online file system label set/get ioctls.
> 
> Some background info included in commit log would be good, e.g. ext4
> didn't support get/set label ioctl but we're going to add that support
> in both kernel and e2fsprogs.
> 
> And I noticed the kernel patch is still in review, and has no comments
> so far. So I'd like to wait and make sure the new ioctl will be accepted
> first.

Sure, just note that the maximum label length for ext4 will be 16 with, or
without the ioctls. This patch just fixes what was missing in the first
place.

Thanks!
-Lukas

> 
> Thanks,
> Eryu
> 
> > 
> > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> >  common/rc | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/common/rc b/common/rc
> > index 8e351f17..50d6d0bd 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -4545,6 +4545,9 @@ _label_get_max()
> >  	f2fs)
> >  		echo 255
> >  		;;
> > +	ext2|ext3|ext4)
> > +		echo 16
> > +		;;
> >  	*)
> >  		_notrun "$FSTYP does not define maximum label length"
> >  		;;
> > -- 
> > 2.31.1
> 


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

* Re: [PATCH] common/rc: set maximum label length for ext4
  2021-11-28 14:33 ` Eryu Guan
  2021-11-29  9:55   ` Lukas Czerner
@ 2022-01-31  9:42   ` Lukas Czerner
  1 sibling, 0 replies; 6+ messages in thread
From: Lukas Czerner @ 2022-01-31  9:42 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests, linux-ext4

On Sun, Nov 28, 2021 at 10:33:41PM +0800, Eryu Guan wrote:
> On Tue, Nov 23, 2021 at 11:11:19AM +0100, Lukas Czerner wrote:
> > Set maximum label length for ext4 in _label_get_max() to be able to test
> > online file system label set/get ioctls.
> 
> Some background info included in commit log would be good, e.g. ext4
> didn't support get/set label ioctl but we're going to add that support
> in both kernel and e2fsprogs.
> 
> And I noticed the kernel patch is still in review, and has no comments
> so far. So I'd like to wait and make sure the new ioctl will be accepted
> first.
> 
> Thanks,
> Eryu

It's upstream now, can we have this change in so that it can be tested?

Thanks!
-Lukas

> 
> > 
> > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> >  common/rc | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/common/rc b/common/rc
> > index 8e351f17..50d6d0bd 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -4545,6 +4545,9 @@ _label_get_max()
> >  	f2fs)
> >  		echo 255
> >  		;;
> > +	ext2|ext3|ext4)
> > +		echo 16
> > +		;;
> >  	*)
> >  		_notrun "$FSTYP does not define maximum label length"
> >  		;;
> > -- 
> > 2.31.1
> 


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

* Re: [PATCH] common/rc: set maximum label length for ext4
  2021-11-23 10:11 [PATCH] common/rc: set maximum label length for ext4 Lukas Czerner
  2021-11-28 14:33 ` Eryu Guan
@ 2022-01-31 17:07 ` Darrick J. Wong
  2022-01-31 20:46   ` Lukas Czerner
  1 sibling, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2022-01-31 17:07 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: fstests, linux-ext4

On Tue, Nov 23, 2021 at 11:11:19AM +0100, Lukas Czerner wrote:
> Set maximum label length for ext4 in _label_get_max() to be able to test
> online file system label set/get ioctls.
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
>  common/rc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 8e351f17..50d6d0bd 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4545,6 +4545,9 @@ _label_get_max()
>  	f2fs)
>  		echo 255
>  		;;
> +	ext2|ext3|ext4)
> +		echo 16

After reviewing the ext4 ondisk format, 16 is the correct value.

Though I wonder, what actually prevents generic/492 from running on old
kernels without GETLABEL support?

Either way this patch is ok, so...
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> +		;;
>  	*)
>  		_notrun "$FSTYP does not define maximum label length"
>  		;;
> -- 
> 2.31.1
> 

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

* Re: [PATCH] common/rc: set maximum label length for ext4
  2022-01-31 17:07 ` Darrick J. Wong
@ 2022-01-31 20:46   ` Lukas Czerner
  0 siblings, 0 replies; 6+ messages in thread
From: Lukas Czerner @ 2022-01-31 20:46 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: fstests, linux-ext4

On Mon, Jan 31, 2022 at 09:07:00AM -0800, Darrick J. Wong wrote:
> On Tue, Nov 23, 2021 at 11:11:19AM +0100, Lukas Czerner wrote:
> > Set maximum label length for ext4 in _label_get_max() to be able to test
> > online file system label set/get ioctls.
> > 
> > Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> > ---
> >  common/rc | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/common/rc b/common/rc
> > index 8e351f17..50d6d0bd 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -4545,6 +4545,9 @@ _label_get_max()
> >  	f2fs)
> >  		echo 255
> >  		;;
> > +	ext2|ext3|ext4)
> > +		echo 16
> 
> After reviewing the ext4 ondisk format, 16 is the correct value.
> 
> Though I wonder, what actually prevents generic/492 from running on old
> kernels without GETLABEL support?

_require_xfs_io_command "label"

should take care of that. This is why I though it was no problem to get
this change in early.

-Lukas

> 
> Either way this patch is ok, so...
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> 
> --D
> 
> > +		;;
> >  	*)
> >  		_notrun "$FSTYP does not define maximum label length"
> >  		;;
> > -- 
> > 2.31.1
> > 
> 


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

end of thread, other threads:[~2022-01-31 20:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 10:11 [PATCH] common/rc: set maximum label length for ext4 Lukas Czerner
2021-11-28 14:33 ` Eryu Guan
2021-11-29  9:55   ` Lukas Czerner
2022-01-31  9:42   ` Lukas Czerner
2022-01-31 17:07 ` Darrick J. Wong
2022-01-31 20:46   ` Lukas Czerner

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).