Skip to contentSkip to conversation

Fix mkfs.xfs 300MB min size requirement (v5.19.0)

PATCH In review Petr Vorel 4 participants 10 messages Aug 18, 2022 – Sep 19, 2022 Library code

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

v2 cover Fix mkfs.xfs 300MB min size requirement (v5.19.0)

Changes v1->v2:
* bump min size to 300 MB instead using workaround (export TEST_DIR=1 TEST_DEV=1 QA_CHECK_FS=1)
* increase test for .dev_min_size (so that we don't test for the default value)

Kind regards,
Petr

Petr Vorel (2):
tst_device: Increase DEV_MIN_SIZE to 300 MB
lib/tests: Increase .dev_min_size

 lib/newlib_tests/tst_device.c | 2 +-
 lib/tst_device.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 5 lines
2.37.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#1 lore raw

PATCH v2 1/2 tst_device: Increase DEV_MIN_SIZE to 300 MB

Previous default 256 MB was not enough for mkfs.xfs since v5.19.0-rc1
[1] which refuses to create filesystems < 300 MB. Although the limitation can be workarounded by setting three environment variables, it's better to increase the variable.

[1]: https://lore.kernel.org/all/164738662491.3191861.15611882856331908607.stgit@magnolia/

---
 lib/tst_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_device.c +1 -1
index c34cbe6d1..8419b80c3 100644
@@ -44,7 +44,7 @@
 #define LOOP_CONTROL_FILE "/dev/loop-control"
 
 #define DEV_FILE "test_dev.img"
-#define DEV_SIZE_MB 256u
+#define DEV_SIZE_MB 300u
 
 static char dev_path[1024];
 static int device_acquired;
Signature · 5 lines
2.37.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Re: [LTP] [PATCH v2 1/2] tst_device: Increase DEV_MIN_SIZE to 300 MB

Quoted 19 lines · Petr Vorel

Previous default 256 MB was not enough for mkfs.xfs since v5.19.0-rc1
[1] which refuses to create filesystems < 300 MB. Although the limitation can be workarounded by setting three environment variables, it's better to increase the variable.

[1]: https://lore.kernel.org/all/164738662491.3191861.15611882856331908607.stgit@magnolia/

---
 lib/tst_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_device.c +0 -0
index c34cbe6d1..8419b80c3 100644

lib/tst_device.c line 47

Quoted 5 lines
lib/tst_device.c +1 -1
@@ -44,7 +44,7 @@
 #define LOOP_CONTROL_FILE "/dev/loop-control"
 
 #define DEV_FILE "test_dev.img"
-#define DEV_SIZE_MB 256u
+#define DEV_SIZE_MB 300u

Subject is wrong - it is saying DEV_MIN_SIZE

It really looks weird that DEV_SIZE_MB < DEV_MIN_SIZE What am I missing?

Thanks,
Amir.

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Re: [LTP] [PATCH v2 1/2] tst_device: Increase DEV_MIN_SIZE to 300 MB

Hi!

Quoted 20 lines
Quoted 20 lines

Previous default 256 MB was not enough for mkfs.xfs since v5.19.0-rc1
[1] which refuses to create filesystems < 300 MB. Although the limitation can be workarounded by setting three environment variables, it's better to increase the variable.

[1]: https://lore.kernel.org/all/164738662491.3191861.15611882856331908607.stgit@magnolia/

---
 lib/tst_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_device.c +0 -0
index c34cbe6d1..8419b80c3 100644
@@ -44,7 +44,7 @@
 #define LOOP_CONTROL_FILE "/dev/loop-control"
 
Quoted 8 lines

lib/tst_device.c line 47

Quoted 3 lines
lib/tst_device.c +1 -1
 #define DEV_FILE "test_dev.img"
-#define DEV_SIZE_MB 256u
+#define DEV_SIZE_MB 300u

Subject is wrong - it is saying DEV_MIN_SIZE

It really looks weird that DEV_SIZE_MB < DEV_MIN_SIZE What am I missing?

The DEV_MIN_SIZE macro is used in a LTP test library API test that checks that test can override minial device size so it has to be greater than DEV_SIZE_MB which is the size used by the test library when loopback devices are created.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#4 lore raw

Re: [LTP] [PATCH v2 1/2] tst_device: Increase DEV_MIN_SIZE to 300 MB

Quoted 27 lines

Hi!

Quoted 25 lines
Quoted 18 lines

Previous default 256 MB was not enough for mkfs.xfs since v5.19.0-rc1
[1] which refuses to create filesystems < 300 MB. Although the limitation can be workarounded by setting three environment variables, it's better to increase the variable.

[1]: https://lore.kernel.org/all/164738662491.3191861.15611882856331908607.stgit@magnolia/

---
 lib/tst_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_device.c +0 -0
index c34cbe6d1..8419b80c3 100644

lib/tst_device.c line 47

Quoted 5 lines
lib/tst_device.c +1 -1
@@ -44,7 +44,7 @@
 #define LOOP_CONTROL_FILE "/dev/loop-control"
 
 #define DEV_FILE "test_dev.img"
-#define DEV_SIZE_MB 256u
+#define DEV_SIZE_MB 300u

Subject is wrong - it is saying DEV_MIN_SIZE

Quoted 7 lines
Quoted 2 lines

It really looks weird that DEV_SIZE_MB < DEV_MIN_SIZE What am I missing?

The DEV_MIN_SIZE macro is used in a LTP test library API test that checks that test can override minial device size so it has to be greater than DEV_SIZE_MB which is the size used by the test library when loopback devices are created.

Tests in lib/newlib_tests/ are tests which test the LTP itself, maybe use some prefix for these constants would make obvious that it's not part of the library (i.e. not visible in normal LTP tests).

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#5 lore raw

PATCH v2 2/2 lib/tests: Increase .dev_min_size

In reply to Petr Vorel

New LTP default for device size was increased to 300MB in previous commit, which is the same as for test of .dev_min_size. Therefore increase test of .dev_min_size to 310MB.

---
 lib/newlib_tests/tst_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/newlib_tests/tst_device.c +1 -1
index 8ac1d14cc..87cec3961 100644
@@ -15,7 +15,7 @@
 #include "tst_test.h"
 
 #define DEVBLOCKSIZE 2048
-#define DEV_MIN_SIZE 300
+#define DEV_MIN_SIZE 310
 
 static char *mntpoint;
 static uint64_t ltp_dev_size;
Signature · 5 lines
2.37.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#6 lore raw
In reply to Petr Vorel

Hi all,

Quoted 5 lines

Changes v1->v2:
* bump min size to 300 MB instead using workaround (export TEST_DIR=1 TEST_DEV=1 QA_CHECK_FS=1)
* increase test for .dev_min_size (so that we don't test for the default value)

Do we want to merge this patchset to get XFS fix before the release? I'll finish tracking minimal filesystem size after the release.

Kind regards,
Petr

Quoted 10 lines

Kind regards,
Petr

Petr Vorel (2):
tst_device: Increase DEV_MIN_SIZE to 300 MB
lib/tests: Increase .dev_min_size

 lib/newlib_tests/tst_device.c | 2 +-
 lib/tst_device.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#7 lore raw

Hi Petr,

Do we want to merge this patchset to get XFS fix before the release?

Quoted 1 line

Sure, I'm fine going with this temporary fix for releasing.

Signature · 2 lines
Regards,
Li Wang
Signature · 2 lines
-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by
#8 lore raw

Hi!

Quoted 4 lines

Do we want to merge this patchset to get XFS fix before the release?

Quoted 1 line

Sure, I'm fine going with this temporary fix for releasing.

Same here.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#9 lore raw
Quoted 9 lines

Hi!

Quoted 4 lines

Do we want to merge this patchset to get XFS fix before the release?

Sure, I'm fine going with this temporary fix for releasing.

Same here.

Thanks a lot both, patchset merged!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp