Skip to contentSkip to conversation

common/rc: set maximum label length for ext4

PATCH In review Lukas Czerner 3 participants 6 messages Nov 23, 2021 – Jan 31, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/rc: set maximum label length for ext4

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

---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)
common/rc +3 -0
index 8e351f17..50d6d0bd 100644
@@ -4545,6 +4545,9 @@ _label_get_max()
 	f2fs)
 		echo 255
 		;;
+	ext2|ext3|ext4)
+		echo 16
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
Signature · 1 line
2.31.1
#1 lore raw
Quoted 2 lines · Lukas Czerner

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

Quoted 22 lines
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)
common/rc +3 -0
index 8e351f17..50d6d0bd 100644
@@ -4545,6 +4545,9 @@ _label_get_max()
 	f2fs)
 		echo 255
 		;;
+	ext2|ext3|ext4)
+		echo 16
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
Signature · 1 line
2.31.1
#2 lore raw
Quoted 11 lines · Eryu Guan
Quoted 2 lines · Lukas Czerner

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

Quoted 27 lines

Thanks,
Eryu

Quoted 22 lines
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)
common/rc +3 -0
index 8e351f17..50d6d0bd 100644
@@ -4545,6 +4545,9 @@ _label_get_max()
 	f2fs)
 		echo 255
 		;;
+	ext2|ext3|ext4)
+		echo 16
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
Signature · 1 line
2.31.1
#3 lore raw
In reply to Eryu Guan
Quoted 8 lines · Eryu Guan
Quoted 2 lines · Lukas Czerner

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.

Quoted 6 lines

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

Quoted 24 lines
Quoted 23 lines
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)
common/rc +3 -0
index 8e351f17..50d6d0bd 100644
@@ -4545,6 +4545,9 @@ _label_get_max()
 	f2fs)
 		echo 255
 		;;
+	ext2|ext3|ext4)
+		echo 16
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#4 lore raw
In reply to Lukas Czerner
Quoted 13 lines · Lukas Czerner

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

---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)
common/rc +0 -0
index 8e351f17..50d6d0bd 100644

common/rc _label_get_max() · line 4549

Quoted 5 lines
common/rc +2 -0
@@ -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...

--D

Quoted 7 lines
common/rc +1 -0
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
Signature · 1 line
2.31.1
#5 lore raw
Quoted 22 lines · Darrick J. Wong
Quoted 13 lines · Lukas Czerner

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

---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)
common/rc +0 -0
index 8e351f17..50d6d0bd 100644

common/rc _label_get_max() · line 4549

Quoted 5 lines
common/rc +2 -0
@@ -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.

Quoted 2 lines

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

Quoted 14 lines

Either way this patch is ok, so...

--D

Quoted 7 lines
common/rc +1 -0
+		;;
 	*)
 		_notrun "$FSTYP does not define maximum label length"
 		;;
Signature · 1 line
2.31.1