All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/9p: reduce xattr size to 1k
@ 2026-07-03 15:26 Christian Schoenebeck
  2026-07-06 21:15 ` Pierrick Bouvier
  2026-07-07 17:18 ` Christian Schoenebeck
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Schoenebeck @ 2026-07-03 15:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Greg Kurz, Pierrick Bouvier

On host systems with ext4 and ea_inode capability not enabled, the max. size
for xattr values is slightly below 4k, which caused the new xattr tests to
fail on such host systems.

Reduce the xattr size for our tests to 1k to prevent them to fail on such
host systems.

Reported-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Fixes: 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs driver)")
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
---
 tests/qtest/virtio-9p-test.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c
index cfd3c02da4..938b5a4717 100644
--- a/tests/qtest/virtio-9p-test.c
+++ b/tests/qtest/virtio-9p-test.c
@@ -38,11 +38,17 @@
 /*
  * xattr size to be used for xattr tests
  *
- * 64k is the max. xattr size supported by the Linux kernel, However btrfs
- * for instance supports only 16219 bytes. So let's be conservative and
- * just use 8k for the xattr tests.
+ * 64k is the max. xattr size supported by the Linux kernel on high-level VFS
+ * layer. However filesystems impose their own limits:
+ *
+ * - btrfs: 16219 bytes
+ *
+ * - ext4: blocksize - 56 bytes (~4KB) if no ea_inode capability enabled,
+ *         64k if ea_inode enabled
+ *
+ * So let's be conservative and just use 1k for the xattr tests.
  */
-#define TEST_XATTR_SIZE (8 * 1024)
+#define TEST_XATTR_SIZE (1 * 1024)
 
 static void pci_config(void *obj, void *data, QGuestAllocator *t_alloc)
 {
-- 
2.47.3



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

* Re: [PATCH] tests/9p: reduce xattr size to 1k
  2026-07-03 15:26 [PATCH] tests/9p: reduce xattr size to 1k Christian Schoenebeck
@ 2026-07-06 21:15 ` Pierrick Bouvier
  2026-07-07 16:34   ` Christian Schoenebeck
  2026-07-07 17:18 ` Christian Schoenebeck
  1 sibling, 1 reply; 4+ messages in thread
From: Pierrick Bouvier @ 2026-07-06 21:15 UTC (permalink / raw)
  To: Christian Schoenebeck, qemu-devel; +Cc: qemu-stable, Greg Kurz

On 7/3/2026 8:26 AM, Christian Schoenebeck wrote:
> On host systems with ext4 and ea_inode capability not enabled, the max. size
> for xattr values is slightly below 4k, which caused the new xattr tests to
> fail on such host systems.
> 
> Reduce the xattr size for our tests to 1k to prevent them to fail on such
> host systems.
> 
> Reported-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Fixes: 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs driver)")
> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---
>  tests/qtest/virtio-9p-test.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Looks good for me, and fix the failure observed.
In case you want the test to be more complete, you may try to detect
ea_node presence, and adapt the size to it.

Regards,
Pierrick


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

* Re: [PATCH] tests/9p: reduce xattr size to 1k
  2026-07-06 21:15 ` Pierrick Bouvier
@ 2026-07-07 16:34   ` Christian Schoenebeck
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Schoenebeck @ 2026-07-07 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Greg Kurz, Pierrick Bouvier

On Monday, 6 July 2026 23:15:38 CEST Pierrick Bouvier wrote:
> On 7/3/2026 8:26 AM, Christian Schoenebeck wrote:
> > On host systems with ext4 and ea_inode capability not enabled, the max.
> > size for xattr values is slightly below 4k, which caused the new xattr
> > tests to fail on such host systems.
> > 
> > Reduce the xattr size for our tests to 1k to prevent them to fail on such
> > host systems.
> > 
> > Reported-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> > Fixes: 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs
> > driver)") Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> > ---
> > 
> >  tests/qtest/virtio-9p-test.c | 14 ++++++++++----
> >  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> 
> Looks good for me, and fix the failure observed.

Good, thanks!

> In case you want the test to be more complete, you may try to detect
> ea_node presence, and adapt the size to it.

No need ATM. These tests actually don't require large xattr values right now.

/Christian





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

* Re: [PATCH] tests/9p: reduce xattr size to 1k
  2026-07-03 15:26 [PATCH] tests/9p: reduce xattr size to 1k Christian Schoenebeck
  2026-07-06 21:15 ` Pierrick Bouvier
@ 2026-07-07 17:18 ` Christian Schoenebeck
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Schoenebeck @ 2026-07-07 17:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable, Greg Kurz, Pierrick Bouvier

On Friday, 3 July 2026 17:26:08 CEST Christian Schoenebeck wrote:
> On host systems with ext4 and ea_inode capability not enabled, the max. size
> for xattr values is slightly below 4k, which caused the new xattr tests to
> fail on such host systems.
> 
> Reduce the xattr size for our tests to 1k to prevent them to fail on such
> host systems.
> 
> Reported-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Fixes: 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs
> driver)") Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
> ---
>  tests/qtest/virtio-9p-test.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)

Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next

Thanks!

/Christian




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

end of thread, other threads:[~2026-07-07 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 15:26 [PATCH] tests/9p: reduce xattr size to 1k Christian Schoenebeck
2026-07-06 21:15 ` Pierrick Bouvier
2026-07-07 16:34   ` Christian Schoenebeck
2026-07-07 17:18 ` Christian Schoenebeck

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.