All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add support bcachefs filesystem
@ 2023-12-07 19:40 ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Petr Vorel, Cyril Hrubis, Li Wang, Richard Palethorpe,
	Jan Stancek, Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara

Hi all,

@Amir @Jan, could you please have look on fanotify failures on Bcachefs?
fanotify13.c, fanotify15.c and fanotify16.c produce many errors.

To test, just apply this patchset and then run with LTP_SINGLE_FS_TYPE:

# LTP_SINGLE_FS_TYPE=bcachefs ./fanotify15

changes v1->v2:
Two new commits:
* lib: Add Bcachefs magic
* statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs

Petr Vorel (3):
  lib: Add Bcachefs magic
  lib: Add support bcachefs filesystem to .all_filesystems
  statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs

 include/tst_fs.h                          | 3 +++
 lib/tst_fs_type.c                         | 2 ++
 lib/tst_supported_fs_types.c              | 2 ++
 testcases/kernel/syscalls/statx/statx04.c | 5 +++--
 4 files changed, 10 insertions(+), 2 deletions(-)

-- 
2.43.0


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

* [LTP] [PATCH v2 0/3] Add support bcachefs filesystem
@ 2023-12-07 19:40 ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Kent Overstreet, linux-bcachefs, Brian Foster, fstests, Jan Kara,
	Richard Palethorpe

Hi all,

@Amir @Jan, could you please have look on fanotify failures on Bcachefs?
fanotify13.c, fanotify15.c and fanotify16.c produce many errors.

To test, just apply this patchset and then run with LTP_SINGLE_FS_TYPE:

# LTP_SINGLE_FS_TYPE=bcachefs ./fanotify15

changes v1->v2:
Two new commits:
* lib: Add Bcachefs magic
* statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs

Petr Vorel (3):
  lib: Add Bcachefs magic
  lib: Add support bcachefs filesystem to .all_filesystems
  statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs

 include/tst_fs.h                          | 3 +++
 lib/tst_fs_type.c                         | 2 ++
 lib/tst_supported_fs_types.c              | 2 ++
 testcases/kernel/syscalls/statx/statx04.c | 5 +++--
 4 files changed, 10 insertions(+), 2 deletions(-)

-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [PATCH v2 1/3] lib: Add Bcachefs magic
  2023-12-07 19:40 ` [LTP] " Petr Vorel
@ 2023-12-07 19:40   ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Petr Vorel, Cyril Hrubis, Li Wang, Richard Palethorpe,
	Jan Stancek, Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2

 include/tst_fs.h  | 3 +++
 lib/tst_fs_type.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/include/tst_fs.h b/include/tst_fs.h
index eb9841165..06f5be896 100644
--- a/include/tst_fs.h
+++ b/include/tst_fs.h
@@ -34,6 +34,9 @@
 #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
 #define TST_EXFAT_MAGIC    0x2011BAB0UL
 
+/* fs/bcachefs/bcachefs_format.h */
+#define TST_BCACHE_MAGIC		0xca451a4e
+
 enum tst_fill_access_pattern {
 	TST_FILL_BLOCKS,
 	TST_FILL_RANDOM
diff --git a/lib/tst_fs_type.c b/lib/tst_fs_type.c
index d9c9c0817..7f0d61a8e 100644
--- a/lib/tst_fs_type.c
+++ b/lib/tst_fs_type.c
@@ -36,6 +36,8 @@ const char *tst_fs_type_name(long f_type)
 		return "9p";
 	case TST_RAMFS_MAGIC:
 		return "ramfs";
+	case TST_BCACHE_MAGIC:
+		return "bcachefs";
 	case TST_BTRFS_MAGIC:
 		return "btrfs";
 	case TST_XFS_MAGIC:
-- 
2.43.0


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

* [LTP] [PATCH v2 1/3] lib: Add Bcachefs magic
@ 2023-12-07 19:40   ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Kent Overstreet, linux-bcachefs, Brian Foster, fstests, Jan Kara,
	Richard Palethorpe

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2

 include/tst_fs.h  | 3 +++
 lib/tst_fs_type.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/include/tst_fs.h b/include/tst_fs.h
index eb9841165..06f5be896 100644
--- a/include/tst_fs.h
+++ b/include/tst_fs.h
@@ -34,6 +34,9 @@
 #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
 #define TST_EXFAT_MAGIC    0x2011BAB0UL
 
+/* fs/bcachefs/bcachefs_format.h */
+#define TST_BCACHE_MAGIC		0xca451a4e
+
 enum tst_fill_access_pattern {
 	TST_FILL_BLOCKS,
 	TST_FILL_RANDOM
diff --git a/lib/tst_fs_type.c b/lib/tst_fs_type.c
index d9c9c0817..7f0d61a8e 100644
--- a/lib/tst_fs_type.c
+++ b/lib/tst_fs_type.c
@@ -36,6 +36,8 @@ const char *tst_fs_type_name(long f_type)
 		return "9p";
 	case TST_RAMFS_MAGIC:
 		return "ramfs";
+	case TST_BCACHE_MAGIC:
+		return "bcachefs";
 	case TST_BTRFS_MAGIC:
 		return "btrfs";
 	case TST_XFS_MAGIC:
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [PATCH v2 2/3] lib: Add support bcachefs filesystem to .all_filesystems
  2023-12-07 19:40 ` [LTP] " Petr Vorel
@ 2023-12-07 19:40   ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Petr Vorel, Cyril Hrubis, Li Wang, Richard Palethorpe,
	Jan Stancek, Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara

bcachefs has been merged into v6.7-rc1 [1]. Let's add it's support to
LTP .all_filesystems = 1 and TST_ALL_FILESYSTEMS=1.

[1] https://lwn.net/Articles/934692/

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v1

 lib/tst_supported_fs_types.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index d4911fa3b..369836717 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz>
+ * Copyright (c) Linux Test Project, 2018-2023
  */
 
 #include <stdio.h>
@@ -24,6 +25,7 @@ static const char *const fs_type_whitelist[] = {
 	"ext4",
 	"xfs",
 	"btrfs",
+	"bcachefs",
 	"vfat",
 	"exfat",
 	"ntfs",
-- 
2.43.0


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

* [LTP] [PATCH v2 2/3] lib: Add support bcachefs filesystem to .all_filesystems
@ 2023-12-07 19:40   ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Kent Overstreet, linux-bcachefs, Brian Foster, fstests, Jan Kara,
	Richard Palethorpe

bcachefs has been merged into v6.7-rc1 [1]. Let's add it's support to
LTP .all_filesystems = 1 and TST_ALL_FILESYSTEMS=1.

[1] https://lwn.net/Articles/934692/

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
The same as in v1

 lib/tst_supported_fs_types.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index d4911fa3b..369836717 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (c) 2017 Cyril Hrubis <chrubis@suse.cz>
+ * Copyright (c) Linux Test Project, 2018-2023
  */
 
 #include <stdio.h>
@@ -24,6 +25,7 @@ static const char *const fs_type_whitelist[] = {
 	"ext4",
 	"xfs",
 	"btrfs",
+	"bcachefs",
 	"vfat",
 	"exfat",
 	"ntfs",
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2023-12-07 19:40 ` [LTP] " Petr Vorel
@ 2023-12-07 19:40   ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Petr Vorel, Cyril Hrubis, Li Wang, Richard Palethorpe,
	Jan Stancek, Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara

STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
(it's already skipped on tmpfs and XFS).

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2

 testcases/kernel/syscalls/statx/statx04.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
index 58296bd24..c2ed52deb 100644
--- a/testcases/kernel/syscalls/statx/statx04.c
+++ b/testcases/kernel/syscalls/statx/statx04.c
@@ -96,8 +96,9 @@ static void setup(void)
 	for (i = 0, expected_mask = 0; i < ARRAY_SIZE(attr_list); i++)
 		expected_mask |= attr_list[i].attr;
 
-	/* STATX_ATTR_COMPRESSED not supported on XFS, TMPFS */
-	if (!strcmp(tst_device->fs_type, "xfs") || !strcmp(tst_device->fs_type, "tmpfs"))
+	/* STATX_ATTR_COMPRESSED not supported on Bcachefs, TMPFS, XFS */
+	if (!strcmp(tst_device->fs_type, "bcachefs") || !strcmp(tst_device->fs_type, "tmpfs") ||
+	    !strcmp(tst_device->fs_type, "xfs"))
 		expected_mask &= ~STATX_ATTR_COMPRESSED;
 
 	/* Attribute support was added to Btrfs statx() in kernel v4.13 */
-- 
2.43.0


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

* [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2023-12-07 19:40   ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2023-12-07 19:40 UTC (permalink / raw)
  To: ltp
  Cc: Kent Overstreet, linux-bcachefs, Brian Foster, fstests, Jan Kara,
	Richard Palethorpe

STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
(it's already skipped on tmpfs and XFS).

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
New in v2

 testcases/kernel/syscalls/statx/statx04.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
index 58296bd24..c2ed52deb 100644
--- a/testcases/kernel/syscalls/statx/statx04.c
+++ b/testcases/kernel/syscalls/statx/statx04.c
@@ -96,8 +96,9 @@ static void setup(void)
 	for (i = 0, expected_mask = 0; i < ARRAY_SIZE(attr_list); i++)
 		expected_mask |= attr_list[i].attr;
 
-	/* STATX_ATTR_COMPRESSED not supported on XFS, TMPFS */
-	if (!strcmp(tst_device->fs_type, "xfs") || !strcmp(tst_device->fs_type, "tmpfs"))
+	/* STATX_ATTR_COMPRESSED not supported on Bcachefs, TMPFS, XFS */
+	if (!strcmp(tst_device->fs_type, "bcachefs") || !strcmp(tst_device->fs_type, "tmpfs") ||
+	    !strcmp(tst_device->fs_type, "xfs"))
 		expected_mask &= ~STATX_ATTR_COMPRESSED;
 
 	/* Attribute support was added to Btrfs statx() in kernel v4.13 */
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 0/3] Add support bcachefs filesystem
  2023-12-07 19:40 ` [LTP] " Petr Vorel
@ 2023-12-12 14:48   ` Jan Kara
  -1 siblings, 0 replies; 38+ messages in thread
From: Jan Kara @ 2023-12-12 14:48 UTC (permalink / raw)
  To: Petr Vorel
  Cc: ltp, Cyril Hrubis, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara

On Thu 07-12-23 20:40:08, Petr Vorel wrote:
> Hi all,
> 
> @Amir @Jan, could you please have look on fanotify failures on Bcachefs?
> fanotify13.c, fanotify15.c and fanotify16.c produce many errors.
> 
> To test, just apply this patchset and then run with LTP_SINGLE_FS_TYPE:
> 
> # LTP_SINGLE_FS_TYPE=bcachefs ./fanotify15

I suspect some catch with fsids but we'll see... I hopefully get to this
tomorrow.

								Honza

> changes v1->v2:
> Two new commits:
> * lib: Add Bcachefs magic
> * statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
> 
> Petr Vorel (3):
>   lib: Add Bcachefs magic
>   lib: Add support bcachefs filesystem to .all_filesystems
>   statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
> 
>  include/tst_fs.h                          | 3 +++
>  lib/tst_fs_type.c                         | 2 ++
>  lib/tst_supported_fs_types.c              | 2 ++
>  testcases/kernel/syscalls/statx/statx04.c | 5 +++--
>  4 files changed, 10 insertions(+), 2 deletions(-)
> 
> -- 
> 2.43.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [LTP] [PATCH v2 0/3] Add support bcachefs filesystem
@ 2023-12-12 14:48   ` Jan Kara
  0 siblings, 0 replies; 38+ messages in thread
From: Jan Kara @ 2023-12-12 14:48 UTC (permalink / raw)
  To: Petr Vorel
  Cc: Kent Overstreet, Brian Foster, fstests, Richard Palethorpe,
	linux-bcachefs, Jan Kara, ltp

On Thu 07-12-23 20:40:08, Petr Vorel wrote:
> Hi all,
> 
> @Amir @Jan, could you please have look on fanotify failures on Bcachefs?
> fanotify13.c, fanotify15.c and fanotify16.c produce many errors.
> 
> To test, just apply this patchset and then run with LTP_SINGLE_FS_TYPE:
> 
> # LTP_SINGLE_FS_TYPE=bcachefs ./fanotify15

I suspect some catch with fsids but we'll see... I hopefully get to this
tomorrow.

								Honza

> changes v1->v2:
> Two new commits:
> * lib: Add Bcachefs magic
> * statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
> 
> Petr Vorel (3):
>   lib: Add Bcachefs magic
>   lib: Add support bcachefs filesystem to .all_filesystems
>   statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
> 
>  include/tst_fs.h                          | 3 +++
>  lib/tst_fs_type.c                         | 2 ++
>  lib/tst_supported_fs_types.c              | 2 ++
>  testcases/kernel/syscalls/statx/statx04.c | 5 +++--
>  4 files changed, 10 insertions(+), 2 deletions(-)
> 
> -- 
> 2.43.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2023-12-07 19:40   ` [LTP] " Petr Vorel
  (?)
@ 2023-12-13  2:46   ` Kent Overstreet
  2024-01-04  3:32     ` [LTP] " Li Wang
  2024-01-08 10:01       ` [LTP] " Cyril Hrubis
  -1 siblings, 2 replies; 38+ messages in thread
From: Kent Overstreet @ 2023-12-13  2:46 UTC (permalink / raw)
  To: Petr Vorel
  Cc: ltp, Cyril Hrubis, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Brian Foster, linux-bcachefs, fstests,
	Amir Goldstein, Jan Kara

On Thu, Dec 07, 2023 at 08:40:11PM +0100, Petr Vorel wrote:
> STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
> (it's already skipped on tmpfs and XFS).

Hang on, bcachefs most definitely does hae compression. This would be
just because statx isn't plumbed through?

> 
> Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> New in v2
> 
>  testcases/kernel/syscalls/statx/statx04.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/statx/statx04.c b/testcases/kernel/syscalls/statx/statx04.c
> index 58296bd24..c2ed52deb 100644
> --- a/testcases/kernel/syscalls/statx/statx04.c
> +++ b/testcases/kernel/syscalls/statx/statx04.c
> @@ -96,8 +96,9 @@ static void setup(void)
>  	for (i = 0, expected_mask = 0; i < ARRAY_SIZE(attr_list); i++)
>  		expected_mask |= attr_list[i].attr;
>  
> -	/* STATX_ATTR_COMPRESSED not supported on XFS, TMPFS */
> -	if (!strcmp(tst_device->fs_type, "xfs") || !strcmp(tst_device->fs_type, "tmpfs"))
> +	/* STATX_ATTR_COMPRESSED not supported on Bcachefs, TMPFS, XFS */
> +	if (!strcmp(tst_device->fs_type, "bcachefs") || !strcmp(tst_device->fs_type, "tmpfs") ||
> +	    !strcmp(tst_device->fs_type, "xfs"))
>  		expected_mask &= ~STATX_ATTR_COMPRESSED;
>  
>  	/* Attribute support was added to Btrfs statx() in kernel v4.13 */
> -- 
> 2.43.0
> 

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

* Re: [PATCH v2 0/3] Add support bcachefs filesystem
  2023-12-12 14:48   ` [LTP] " Jan Kara
@ 2023-12-13 16:51     ` Jan Kara
  -1 siblings, 0 replies; 38+ messages in thread
From: Jan Kara @ 2023-12-13 16:51 UTC (permalink / raw)
  To: Petr Vorel
  Cc: ltp, Cyril Hrubis, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara

On Tue 12-12-23 15:48:21, Jan Kara wrote:
> On Thu 07-12-23 20:40:08, Petr Vorel wrote:
> > Hi all,
> > 
> > @Amir @Jan, could you please have look on fanotify failures on Bcachefs?
> > fanotify13.c, fanotify15.c and fanotify16.c produce many errors.
> > 
> > To test, just apply this patchset and then run with LTP_SINGLE_FS_TYPE:
> > 
> > # LTP_SINGLE_FS_TYPE=bcachefs ./fanotify15
> 
> I suspect some catch with fsids but we'll see... I hopefully get to this
> tomorrow.

Ok, this was a bug in bch_encode_fh(). Fix submitted.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [LTP] [PATCH v2 0/3] Add support bcachefs filesystem
@ 2023-12-13 16:51     ` Jan Kara
  0 siblings, 0 replies; 38+ messages in thread
From: Jan Kara @ 2023-12-13 16:51 UTC (permalink / raw)
  To: Petr Vorel
  Cc: Kent Overstreet, Brian Foster, fstests, Richard Palethorpe,
	linux-bcachefs, Jan Kara, ltp

On Tue 12-12-23 15:48:21, Jan Kara wrote:
> On Thu 07-12-23 20:40:08, Petr Vorel wrote:
> > Hi all,
> > 
> > @Amir @Jan, could you please have look on fanotify failures on Bcachefs?
> > fanotify13.c, fanotify15.c and fanotify16.c produce many errors.
> > 
> > To test, just apply this patchset and then run with LTP_SINGLE_FS_TYPE:
> > 
> > # LTP_SINGLE_FS_TYPE=bcachefs ./fanotify15
> 
> I suspect some catch with fsids but we'll see... I hopefully get to this
> tomorrow.

Ok, this was a bug in bch_encode_fh(). Fix submitted.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2023-12-13  2:46   ` Kent Overstreet
@ 2024-01-04  3:32     ` Li Wang
  2024-01-08 10:01       ` [LTP] " Cyril Hrubis
  1 sibling, 0 replies; 38+ messages in thread
From: Li Wang @ 2024-01-04  3:32 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: linux-bcachefs, Brian Foster, fstests, Richard Palethorpe, Jan Kara, ltp

Hi Kent,

On Wed, Dec 13, 2023 at 10:55 AM Kent Overstreet <kent.overstreet@linux.dev>
wrote:

> On Thu, Dec 07, 2023 at 08:40:11PM +0100, Petr Vorel wrote:
> > STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
> > (it's already skipped on tmpfs and XFS).
>
> Hang on, bcachefs most definitely does hae compression. This would be
> just because statx isn't plumbed through?
>

Seems not, I guess that is only because bcachefs doesn't support the flag
in bch2_getattr()?

see: https://elixir.bootlin.com/linux/v6.7-rc8/source/fs/bcachefs/fs.c#L741


-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2023-12-13  2:46   ` Kent Overstreet
@ 2024-01-08 10:01       ` Cyril Hrubis
  2024-01-08 10:01       ` [LTP] " Cyril Hrubis
  1 sibling, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-01-08 10:01 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Petr Vorel, ltp, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Brian Foster, linux-bcachefs, fstests,
	Amir Goldstein, Jan Kara

Hi!
> On Thu, Dec 07, 2023 at 08:40:11PM +0100, Petr Vorel wrote:
> > STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
> > (it's already skipped on tmpfs and XFS).
> 
> Hang on, bcachefs most definitely does hae compression. This would be
> just because statx isn't plumbed through?

Quite likely, other filesystems does have an inode flag that is set when
file has been compressed and simply report that in the foo_getattr()
callback. Looking at bcachefs I supose that we need to figure out if the
inode is v3 and then unpack the v3 info to get to the compressed flag,
you probably know best how to do that.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-01-08 10:01       ` Cyril Hrubis
  0 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-01-08 10:01 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: linux-bcachefs, Brian Foster, fstests, Jan Kara, Richard Palethorpe, ltp

Hi!
> On Thu, Dec 07, 2023 at 08:40:11PM +0100, Petr Vorel wrote:
> > STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
> > (it's already skipped on tmpfs and XFS).
> 
> Hang on, bcachefs most definitely does hae compression. This would be
> just because statx isn't plumbed through?

Quite likely, other filesystems does have an inode flag that is set when
file has been compressed and simply report that in the foo_getattr()
callback. Looking at bcachefs I supose that we need to figure out if the
inode is v3 and then unpack the v3 info to get to the compressed flag,
you probably know best how to do that.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 0/3] Add support bcachefs filesystem
  2023-12-07 19:40 ` [LTP] " Petr Vorel
@ 2024-01-08 10:14   ` Cyril Hrubis
  -1 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-01-08 10:14 UTC (permalink / raw)
  To: Petr Vorel
  Cc: ltp, Li Wang, Richard Palethorpe, Jan Stancek, Xiao Yang,
	Yang Xu, Kent Overstreet, Brian Foster, linux-bcachefs, fstests,
	Amir Goldstein, Jan Kara

Hi!
I suppose that it's fine to merge the first two patches to enable
bcachefs in LTP before there release.

For the first two patches:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>


For the last patch that disables check for STATX_ATTR_COMPRESSED it
looks like this is missing plumbing in bcachefs so I would avoid adding
workarounds into LTP for now.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* Re: [LTP] [PATCH v2 0/3] Add support bcachefs filesystem
@ 2024-01-08 10:14   ` Cyril Hrubis
  0 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-01-08 10:14 UTC (permalink / raw)
  To: Petr Vorel
  Cc: Kent Overstreet, Brian Foster, fstests, linux-bcachefs, Jan Kara,
	Richard Palethorpe, ltp

Hi!
I suppose that it's fine to merge the first two patches to enable
bcachefs in LTP before there release.

For the first two patches:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>


For the last patch that disables check for STATX_ATTR_COMPRESSED it
looks like this is missing plumbing in bcachefs so I would avoid adding
workarounds into LTP for now.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 0/3] Add support bcachefs filesystem
  2024-01-08 10:14   ` [LTP] " Cyril Hrubis
@ 2024-01-08 20:04     ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-01-08 20:04 UTC (permalink / raw)
  To: Cyril Hrubis
  Cc: ltp, Li Wang, Jan Stancek, Xiao Yang, Yang Xu, Kent Overstreet,
	Brian Foster, linux-bcachefs, fstests, Amir Goldstein, Jan Kara

Hi Cyril,

> Hi!
> I suppose that it's fine to merge the first two patches to enable
> bcachefs in LTP before there release.

> For the first two patches:

> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Thanks a lot, merged these two. We now have bcachefs support in LTP :).


> For the last patch that disables check for STATX_ATTR_COMPRESSED it
> looks like this is missing plumbing in bcachefs so I would avoid adding
> workarounds into LTP for now.

Sure, it makes sense. Hopefully Kent finds time to fix it soon.

Kind regards,
Petr

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

* Re: [LTP] [PATCH v2 0/3] Add support bcachefs filesystem
@ 2024-01-08 20:04     ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-01-08 20:04 UTC (permalink / raw)
  To: Cyril Hrubis
  Cc: Kent Overstreet, Brian Foster, fstests, linux-bcachefs, Jan Kara, ltp

Hi Cyril,

> Hi!
> I suppose that it's fine to merge the first two patches to enable
> bcachefs in LTP before there release.

> For the first two patches:

> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Thanks a lot, merged these two. We now have bcachefs support in LTP :).


> For the last patch that disables check for STATX_ATTR_COMPRESSED it
> looks like this is missing plumbing in bcachefs so I would avoid adding
> workarounds into LTP for now.

Sure, it makes sense. Hopefully Kent finds time to fix it soon.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2024-01-08 10:01       ` [LTP] " Cyril Hrubis
@ 2024-01-08 20:54         ` Kent Overstreet
  -1 siblings, 0 replies; 38+ messages in thread
From: Kent Overstreet @ 2024-01-08 20:54 UTC (permalink / raw)
  To: Cyril Hrubis
  Cc: Petr Vorel, ltp, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Brian Foster, linux-bcachefs, fstests,
	Amir Goldstein, Jan Kara

On Mon, Jan 08, 2024 at 11:01:40AM +0100, Cyril Hrubis wrote:
> Hi!
> > On Thu, Dec 07, 2023 at 08:40:11PM +0100, Petr Vorel wrote:
> > > STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
> > > (it's already skipped on tmpfs and XFS).
> > 
> > Hang on, bcachefs most definitely does hae compression. This would be
> > just because statx isn't plumbed through?
> 
> Quite likely, other filesystems does have an inode flag that is set when
> file has been compressed and simply report that in the foo_getattr()
> callback. Looking at bcachefs I supose that we need to figure out if the
> inode is v3 and then unpack the v3 info to get to the compressed flag,
> you probably know best how to do that.

I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
extents that are compressed, not entire files - and just reporting the
compression option is probably not what we want since it can be flipped
off, and existing data will still be compressed.

Do you know anything about the intended use case?

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-01-08 20:54         ` Kent Overstreet
  0 siblings, 0 replies; 38+ messages in thread
From: Kent Overstreet @ 2024-01-08 20:54 UTC (permalink / raw)
  To: Cyril Hrubis
  Cc: linux-bcachefs, Brian Foster, fstests, Jan Kara, Richard Palethorpe, ltp

On Mon, Jan 08, 2024 at 11:01:40AM +0100, Cyril Hrubis wrote:
> Hi!
> > On Thu, Dec 07, 2023 at 08:40:11PM +0100, Petr Vorel wrote:
> > > STATX_ATTR_COMPRESSED is not supported on Bcachefs, thus skip it
> > > (it's already skipped on tmpfs and XFS).
> > 
> > Hang on, bcachefs most definitely does hae compression. This would be
> > just because statx isn't plumbed through?
> 
> Quite likely, other filesystems does have an inode flag that is set when
> file has been compressed and simply report that in the foo_getattr()
> callback. Looking at bcachefs I supose that we need to figure out if the
> inode is v3 and then unpack the v3 info to get to the compressed flag,
> you probably know best how to do that.

I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
extents that are compressed, not entire files - and just reporting the
compression option is probably not what we want since it can be flipped
off, and existing data will still be compressed.

Do you know anything about the intended use case?

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2024-01-08 20:54         ` [LTP] " Kent Overstreet
@ 2024-01-09 10:32           ` Cyril Hrubis
  -1 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-01-09 10:32 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Petr Vorel, ltp, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Brian Foster, linux-bcachefs, fstests,
	Amir Goldstein, Jan Kara

Hi!
> > Quite likely, other filesystems does have an inode flag that is set when
> > file has been compressed and simply report that in the foo_getattr()
> > callback. Looking at bcachefs I supose that we need to figure out if the
> > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > you probably know best how to do that.
> 
> I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> extents that are compressed, not entire files - and just reporting the
> compression option is probably not what we want since it can be flipped
> off, and existing data will still be compressed.
> 
> Do you know anything about the intended use case?

As far as I understand the flag it's a hint that the file I/O may be
slower/need more memory because of the compression.

-- 
Cyril Hrubis
chrubis@suse.cz

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-01-09 10:32           ` Cyril Hrubis
  0 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-01-09 10:32 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: linux-bcachefs, Brian Foster, fstests, Jan Kara, Richard Palethorpe, ltp

Hi!
> > Quite likely, other filesystems does have an inode flag that is set when
> > file has been compressed and simply report that in the foo_getattr()
> > callback. Looking at bcachefs I supose that we need to figure out if the
> > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > you probably know best how to do that.
> 
> I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> extents that are compressed, not entire files - and just reporting the
> compression option is probably not what we want since it can be flipped
> off, and existing data will still be compressed.
> 
> Do you know anything about the intended use case?

As far as I understand the flag it's a hint that the file I/O may be
slower/need more memory because of the compression.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* [LTP] ENODEV on bcachefs on kernel < 6.7 [was: Re: [PATCH v2 0/3] Add support bcachefs filesystem]
  2024-01-08 10:14   ` [LTP] " Cyril Hrubis
@ 2024-01-11 14:05     ` pvorel
  -1 siblings, 0 replies; 38+ messages in thread
From: pvorel @ 2024-01-11 14:05 UTC (permalink / raw)
  To: Cyril Hrubis, Li Wang, Jan Stancek, Xiao Yang, Yang Xu
  Cc: Jan Kara, Brian Foster, Kent Overstreet, fstests, linux-bcachefs, ltp

Hi all,

I'm sorry I haven't tested LTP with bcachefs-tools and kernel < 6.7. 
Quite a lot of tests fails:

# LTP_SINGLE_FS_TYPE=bcachefs ./chdir01
tst_buffers.c:56: TINFO: Test is using guarded buffers
tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
tst_test.c:1709: TINFO: LTP version: 20230929-269-g958402a95
tst_test.c:1593: TINFO: Timeout per run is 0h 00m 30s
tst_supported_fs_types.c:151: TINFO: WARNING: testing only bcachefs
tst_supported_fs_types.c:122: TINFO: FUSE does support bcachefs
tst_supported_fs_types.c:57: TINFO: mkfs.bcachefs does exist
tst_test.c:1669: TINFO: === Testing on bcachefs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with bcachefs opts='' 
extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to 
/tmp/LTP_chdwqhGtZ/mntpoint fstyp=bcachefs flags=0
tst_test.c:1131: TBROK: mount(/dev/loop0, mntpoint, bcachefs, 0, (nil)) 
failed: ENODEV (19)

Library fails on safe_mount(). I wonder if we should check for kernel >= 
6.7 in case of bcachefs, or if we should return 0 in safe_mount() in 
case of bcachefs and errno == ENODEV (and possibly kernel < 6.7).

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* ENODEV on bcachefs on kernel < 6.7 [was: Re: [PATCH v2 0/3] Add support bcachefs filesystem]
@ 2024-01-11 14:05     ` pvorel
  0 siblings, 0 replies; 38+ messages in thread
From: pvorel @ 2024-01-11 14:05 UTC (permalink / raw)
  To: Cyril Hrubis, Li Wang, Jan Stancek, Xiao Yang, Yang Xu
  Cc: ltp, Kent Overstreet, Brian Foster, linux-bcachefs, fstests,
	Amir Goldstein, Jan Kara

Hi all,

I'm sorry I haven't tested LTP with bcachefs-tools and kernel < 6.7. 
Quite a lot of tests fails:

# LTP_SINGLE_FS_TYPE=bcachefs ./chdir01
tst_buffers.c:56: TINFO: Test is using guarded buffers
tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
tst_test.c:1709: TINFO: LTP version: 20230929-269-g958402a95
tst_test.c:1593: TINFO: Timeout per run is 0h 00m 30s
tst_supported_fs_types.c:151: TINFO: WARNING: testing only bcachefs
tst_supported_fs_types.c:122: TINFO: FUSE does support bcachefs
tst_supported_fs_types.c:57: TINFO: mkfs.bcachefs does exist
tst_test.c:1669: TINFO: === Testing on bcachefs ===
tst_test.c:1117: TINFO: Formatting /dev/loop0 with bcachefs opts='' 
extra opts=''
tst_test.c:1131: TINFO: Mounting /dev/loop0 to 
/tmp/LTP_chdwqhGtZ/mntpoint fstyp=bcachefs flags=0
tst_test.c:1131: TBROK: mount(/dev/loop0, mntpoint, bcachefs, 0, (nil)) 
failed: ENODEV (19)

Library fails on safe_mount(). I wonder if we should check for kernel >= 
6.7 in case of bcachefs, or if we should return 0 in safe_mount() in 
case of bcachefs and errno == ENODEV (and possibly kernel < 6.7).

Kind regards,
Petr

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

* Re: [PATCH v2 1/3] lib: Add Bcachefs magic
  2023-12-07 19:40   ` [LTP] " Petr Vorel
@ 2024-01-12 13:18     ` Su Yue
  -1 siblings, 0 replies; 38+ messages in thread
From: Su Yue @ 2024-01-12 13:18 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: ltp, Cyril Hrubis, Li Wang, Richard Palethorpe, Jan Stancek,
	Xiao Yang, Yang Xu, Kent Overstreet, Brian Foster,
	linux-bcachefs, fstests, Amir Goldstein, Jan Kara, Petr Vorel


On Thu 07 Dec 2023 at 20:40, Petr Vorel <pvorel@suse.cz> wrote:

> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> New in v2
>
>  include/tst_fs.h  | 3 +++
>  lib/tst_fs_type.c | 2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/include/tst_fs.h b/include/tst_fs.h
> index eb9841165..06f5be896 100644
> --- a/include/tst_fs.h
> +++ b/include/tst_fs.h
> @@ -34,6 +34,9 @@
>  #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
>  #define TST_EXFAT_MAGIC    0x2011BAB0UL
>
> +/* fs/bcachefs/bcachefs_format.h */
> +#define TST_BCACHE_MAGIC		0xca451a4e
> +
>
Not object to the patch. There are three MAGIC values in
bcachefs_format.h: BCACHE_MAGIC, BCHFS_MAGIC, 
BCACHEFS_STATFS_MAGIC.

IIUC, BCACHE_MAGIC is the older one in superblock, BCHFS_MAGIC is 
the
new one. BCACHEFS_STATFS_MAGIC is for statfs.
Kent,
Would you please export needed magic values to 
include/uapi/linux/magic.h?
Since you are the maintainer also I'm confused about variables to 
be named.

--
Su

>  enum tst_fill_access_pattern {
>  	TST_FILL_BLOCKS,
>  	TST_FILL_RANDOM
> diff --git a/lib/tst_fs_type.c b/lib/tst_fs_type.c
> index d9c9c0817..7f0d61a8e 100644
> --- a/lib/tst_fs_type.c
> +++ b/lib/tst_fs_type.c
> @@ -36,6 +36,8 @@ const char *tst_fs_type_name(long f_type)
>  		return "9p";
>  	case TST_RAMFS_MAGIC:
>  		return "ramfs";
> +	case TST_BCACHE_MAGIC:
> +		return "bcachefs";
>  	case TST_BTRFS_MAGIC:
>  		return "btrfs";
>  	case TST_XFS_MAGIC:

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

* Re: [LTP] [PATCH v2 1/3] lib: Add Bcachefs magic
@ 2024-01-12 13:18     ` Su Yue
  0 siblings, 0 replies; 38+ messages in thread
From: Su Yue @ 2024-01-12 13:18 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Kent Overstreet, Brian Foster, fstests, Richard Palethorpe,
	linux-bcachefs, Jan Kara, ltp


On Thu 07 Dec 2023 at 20:40, Petr Vorel <pvorel@suse.cz> wrote:

> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> New in v2
>
>  include/tst_fs.h  | 3 +++
>  lib/tst_fs_type.c | 2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/include/tst_fs.h b/include/tst_fs.h
> index eb9841165..06f5be896 100644
> --- a/include/tst_fs.h
> +++ b/include/tst_fs.h
> @@ -34,6 +34,9 @@
>  #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
>  #define TST_EXFAT_MAGIC    0x2011BAB0UL
>
> +/* fs/bcachefs/bcachefs_format.h */
> +#define TST_BCACHE_MAGIC		0xca451a4e
> +
>
Not object to the patch. There are three MAGIC values in
bcachefs_format.h: BCACHE_MAGIC, BCHFS_MAGIC, 
BCACHEFS_STATFS_MAGIC.

IIUC, BCACHE_MAGIC is the older one in superblock, BCHFS_MAGIC is 
the
new one. BCACHEFS_STATFS_MAGIC is for statfs.
Kent,
Would you please export needed magic values to 
include/uapi/linux/magic.h?
Since you are the maintainer also I'm confused about variables to 
be named.

--
Su

>  enum tst_fill_access_pattern {
>  	TST_FILL_BLOCKS,
>  	TST_FILL_RANDOM
> diff --git a/lib/tst_fs_type.c b/lib/tst_fs_type.c
> index d9c9c0817..7f0d61a8e 100644
> --- a/lib/tst_fs_type.c
> +++ b/lib/tst_fs_type.c
> @@ -36,6 +36,8 @@ const char *tst_fs_type_name(long f_type)
>  		return "9p";
>  	case TST_RAMFS_MAGIC:
>  		return "ramfs";
> +	case TST_BCACHE_MAGIC:
> +		return "bcachefs";
>  	case TST_BTRFS_MAGIC:
>  		return "btrfs";
>  	case TST_XFS_MAGIC:

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2 1/3] lib: Add Bcachefs magic
  2024-01-12 13:18     ` [LTP] " Su Yue
@ 2024-01-12 13:58       ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-01-12 13:58 UTC (permalink / raw)
  To: Su Yue
  Cc: Brian Foster, Kent Overstreet, fstests, Richard Palethorpe,
	linux-bcachefs, Jan Kara, ltp

Hi all,


> On Thu 07 Dec 2023 at 20:40, Petr Vorel <pvorel@suse.cz> wrote:

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > New in v2

> >  include/tst_fs.h  | 3 +++
> >  lib/tst_fs_type.c | 2 ++
> >  2 files changed, 5 insertions(+)

> > diff --git a/include/tst_fs.h b/include/tst_fs.h
> > index eb9841165..06f5be896 100644
> > --- a/include/tst_fs.h
> > +++ b/include/tst_fs.h
> > @@ -34,6 +34,9 @@
> >  #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
> >  #define TST_EXFAT_MAGIC    0x2011BAB0UL

> > +/* fs/bcachefs/bcachefs_format.h */
> > +#define TST_BCACHE_MAGIC		0xca451a4e
> > +

> Not object to the patch. There are three MAGIC values in
> bcachefs_format.h: BCACHE_MAGIC, BCHFS_MAGIC, BCACHEFS_STATFS_MAGIC.

> IIUC, BCACHE_MAGIC is the older one in superblock, BCHFS_MAGIC is the
> new one. BCACHEFS_STATFS_MAGIC is for statfs.
> Kent,
> Would you please export needed magic values to include/uapi/linux/magic.h?

+1, very good idea.

Kind regards,
Petr

> Since you are the maintainer also I'm confused about variables to be named.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [PATCH v2 1/3] lib: Add Bcachefs magic
@ 2024-01-12 13:58       ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-01-12 13:58 UTC (permalink / raw)
  To: Su Yue
  Cc: Kent Overstreet, ltp, Cyril Hrubis, Li Wang, Richard Palethorpe,
	Jan Stancek, Xiao Yang, Yang Xu, Brian Foster, linux-bcachefs,
	fstests, Amir Goldstein, Jan Kara

Hi all,


> On Thu 07 Dec 2023 at 20:40, Petr Vorel <pvorel@suse.cz> wrote:

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > New in v2

> >  include/tst_fs.h  | 3 +++
> >  lib/tst_fs_type.c | 2 ++
> >  2 files changed, 5 insertions(+)

> > diff --git a/include/tst_fs.h b/include/tst_fs.h
> > index eb9841165..06f5be896 100644
> > --- a/include/tst_fs.h
> > +++ b/include/tst_fs.h
> > @@ -34,6 +34,9 @@
> >  #define TST_VFAT_MAGIC     0x4d44 /* AKA MSDOS */
> >  #define TST_EXFAT_MAGIC    0x2011BAB0UL

> > +/* fs/bcachefs/bcachefs_format.h */
> > +#define TST_BCACHE_MAGIC		0xca451a4e
> > +

> Not object to the patch. There are three MAGIC values in
> bcachefs_format.h: BCACHE_MAGIC, BCHFS_MAGIC, BCACHEFS_STATFS_MAGIC.

> IIUC, BCACHE_MAGIC is the older one in superblock, BCHFS_MAGIC is the
> new one. BCACHEFS_STATFS_MAGIC is for statfs.
> Kent,
> Would you please export needed magic values to include/uapi/linux/magic.h?

+1, very good idea.

Kind regards,
Petr

> Since you are the maintainer also I'm confused about variables to be named.

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2024-01-09 10:32           ` [LTP] " Cyril Hrubis
@ 2024-04-19 13:11             ` Cyril Hrubis
  -1 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-04-19 13:11 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: linux-bcachefs, Brian Foster, fstests, Jan Kara, Richard Palethorpe, ltp

Hi!
> > > Quite likely, other filesystems does have an inode flag that is set when
> > > file has been compressed and simply report that in the foo_getattr()
> > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > you probably know best how to do that.
> > 
> > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > extents that are compressed, not entire files - and just reporting the
> > compression option is probably not what we want since it can be flipped
> > off, and existing data will still be compressed.
> > 
> > Do you know anything about the intended use case?
> 
> As far as I understand the flag it's a hint that the file I/O may be
> slower/need more memory because of the compression.

Ping.

Kent we are getting closer to a next LTP release, are you going to add
the compressed flag support into bcachefs or should we add bcachefs to
the test skiplist?

-- 
Cyril Hrubis
chrubis@suse.cz

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-04-19 13:11             ` Cyril Hrubis
  0 siblings, 0 replies; 38+ messages in thread
From: Cyril Hrubis @ 2024-04-19 13:11 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Jan Kara, Brian Foster, fstests, linux-bcachefs, Richard Palethorpe, ltp

Hi!
> > > Quite likely, other filesystems does have an inode flag that is set when
> > > file has been compressed and simply report that in the foo_getattr()
> > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > you probably know best how to do that.
> > 
> > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > extents that are compressed, not entire files - and just reporting the
> > compression option is probably not what we want since it can be flipped
> > off, and existing data will still be compressed.
> > 
> > Do you know anything about the intended use case?
> 
> As far as I understand the flag it's a hint that the file I/O may be
> slower/need more memory because of the compression.

Ping.

Kent we are getting closer to a next LTP release, are you going to add
the compressed flag support into bcachefs or should we add bcachefs to
the test skiplist?

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2024-04-19 13:11             ` Cyril Hrubis
@ 2024-05-07  8:18               ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-05-07  8:18 UTC (permalink / raw)
  To: Cyril Hrubis
  Cc: Kent Overstreet, Jan Kara, Brian Foster, fstests, linux-bcachefs,
	ltp, Coly Li

> Hi!
> > > > Quite likely, other filesystems does have an inode flag that is set when
> > > > file has been compressed and simply report that in the foo_getattr()
> > > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > > you probably know best how to do that.

> > > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > > extents that are compressed, not entire files - and just reporting the
> > > compression option is probably not what we want since it can be flipped
> > > off, and existing data will still be compressed.

> > > Do you know anything about the intended use case?

> > As far as I understand the flag it's a hint that the file I/O may be
> > slower/need more memory because of the compression.

> Ping.

> Kent we are getting closer to a next LTP release, are you going to add
> the compressed flag support into bcachefs or should we add bcachefs to
> the test skiplist?

Kent, gentle ping ^.

Kind regards,
Petr

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-05-07  8:18               ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-05-07  8:18 UTC (permalink / raw)
  To: Cyril Hrubis
  Cc: Jan Kara, Coly Li, Brian Foster, Kent Overstreet, fstests,
	linux-bcachefs, ltp

> Hi!
> > > > Quite likely, other filesystems does have an inode flag that is set when
> > > > file has been compressed and simply report that in the foo_getattr()
> > > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > > you probably know best how to do that.

> > > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > > extents that are compressed, not entire files - and just reporting the
> > > compression option is probably not what we want since it can be flipped
> > > off, and existing data will still be compressed.

> > > Do you know anything about the intended use case?

> > As far as I understand the flag it's a hint that the file I/O may be
> > slower/need more memory because of the compression.

> Ping.

> Kent we are getting closer to a next LTP release, are you going to add
> the compressed flag support into bcachefs or should we add bcachefs to
> the test skiplist?

Kent, gentle ping ^.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2024-05-07  8:18               ` Petr Vorel
@ 2024-05-07 14:16                 ` Kent Overstreet
  -1 siblings, 0 replies; 38+ messages in thread
From: Kent Overstreet @ 2024-05-07 14:16 UTC (permalink / raw)
  To: Petr Vorel
  Cc: Cyril Hrubis, Jan Kara, Brian Foster, fstests, linux-bcachefs,
	ltp, Coly Li

On Tue, May 07, 2024 at 10:18:46AM +0200, Petr Vorel wrote:
> > Hi!
> > > > > Quite likely, other filesystems does have an inode flag that is set when
> > > > > file has been compressed and simply report that in the foo_getattr()
> > > > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > > > you probably know best how to do that.
> 
> > > > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > > > extents that are compressed, not entire files - and just reporting the
> > > > compression option is probably not what we want since it can be flipped
> > > > off, and existing data will still be compressed.
> 
> > > > Do you know anything about the intended use case?
> 
> > > As far as I understand the flag it's a hint that the file I/O may be
> > > slower/need more memory because of the compression.
> 
> > Ping.
> 
> > Kent we are getting closer to a next LTP release, are you going to add
> > the compressed flag support into bcachefs or should we add bcachefs to
> > the test skiplist?
> 
> Kent, gentle ping ^.

Add it to the skiplist for now, thanks

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-05-07 14:16                 ` Kent Overstreet
  0 siblings, 0 replies; 38+ messages in thread
From: Kent Overstreet @ 2024-05-07 14:16 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Jan Kara, Coly Li, Brian Foster, fstests, linux-bcachefs, ltp

On Tue, May 07, 2024 at 10:18:46AM +0200, Petr Vorel wrote:
> > Hi!
> > > > > Quite likely, other filesystems does have an inode flag that is set when
> > > > > file has been compressed and simply report that in the foo_getattr()
> > > > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > > > you probably know best how to do that.
> 
> > > > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > > > extents that are compressed, not entire files - and just reporting the
> > > > compression option is probably not what we want since it can be flipped
> > > > off, and existing data will still be compressed.
> 
> > > > Do you know anything about the intended use case?
> 
> > > As far as I understand the flag it's a hint that the file I/O may be
> > > slower/need more memory because of the compression.
> 
> > Ping.
> 
> > Kent we are getting closer to a next LTP release, are you going to add
> > the compressed flag support into bcachefs or should we add bcachefs to
> > the test skiplist?
> 
> Kent, gentle ping ^.

Add it to the skiplist for now, thanks

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
  2024-05-07 14:16                 ` Kent Overstreet
@ 2024-05-07 17:03                   ` Petr Vorel
  -1 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-05-07 17:03 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Cyril Hrubis, Jan Kara, Brian Foster, fstests, linux-bcachefs,
	ltp, Coly Li

> On Tue, May 07, 2024 at 10:18:46AM +0200, Petr Vorel wrote:
> > > Hi!
> > > > > > Quite likely, other filesystems does have an inode flag that is set when
> > > > > > file has been compressed and simply report that in the foo_getattr()
> > > > > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > > > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > > > > you probably know best how to do that.

> > > > > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > > > > extents that are compressed, not entire files - and just reporting the
> > > > > compression option is probably not what we want since it can be flipped
> > > > > off, and existing data will still be compressed.

> > > > > Do you know anything about the intended use case?

> > > > As far as I understand the flag it's a hint that the file I/O may be
> > > > slower/need more memory because of the compression.

> > > Ping.

> > > Kent we are getting closer to a next LTP release, are you going to add
> > > the compressed flag support into bcachefs or should we add bcachefs to
> > > the test skiplist?

> > Kent, gentle ping ^.

> Add it to the skiplist for now, thanks

Thanks, whitelist merged with your ABT.

Kind regards,
Petr

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

* Re: [LTP] [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs
@ 2024-05-07 17:03                   ` Petr Vorel
  0 siblings, 0 replies; 38+ messages in thread
From: Petr Vorel @ 2024-05-07 17:03 UTC (permalink / raw)
  To: Kent Overstreet
  Cc: Jan Kara, Coly Li, Brian Foster, fstests, linux-bcachefs, ltp

> On Tue, May 07, 2024 at 10:18:46AM +0200, Petr Vorel wrote:
> > > Hi!
> > > > > > Quite likely, other filesystems does have an inode flag that is set when
> > > > > > file has been compressed and simply report that in the foo_getattr()
> > > > > > callback. Looking at bcachefs I supose that we need to figure out if the
> > > > > > inode is v3 and then unpack the v3 info to get to the compressed flag,
> > > > > > you probably know best how to do that.

> > > > > I'm still not clear how we want to map STATX_ATTR_COMPRESSED, since it's
> > > > > extents that are compressed, not entire files - and just reporting the
> > > > > compression option is probably not what we want since it can be flipped
> > > > > off, and existing data will still be compressed.

> > > > > Do you know anything about the intended use case?

> > > > As far as I understand the flag it's a hint that the file I/O may be
> > > > slower/need more memory because of the compression.

> > > Ping.

> > > Kent we are getting closer to a next LTP release, are you going to add
> > > the compressed flag support into bcachefs or should we add bcachefs to
> > > the test skiplist?

> > Kent, gentle ping ^.

> Add it to the skiplist for now, thanks

Thanks, whitelist merged with your ABT.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2024-05-07 17:03 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 19:40 [PATCH v2 0/3] Add support bcachefs filesystem Petr Vorel
2023-12-07 19:40 ` [LTP] " Petr Vorel
2023-12-07 19:40 ` [PATCH v2 1/3] lib: Add Bcachefs magic Petr Vorel
2023-12-07 19:40   ` [LTP] " Petr Vorel
2024-01-12 13:18   ` Su Yue
2024-01-12 13:18     ` [LTP] " Su Yue
2024-01-12 13:58     ` Petr Vorel
2024-01-12 13:58       ` Petr Vorel
2023-12-07 19:40 ` [PATCH v2 2/3] lib: Add support bcachefs filesystem to .all_filesystems Petr Vorel
2023-12-07 19:40   ` [LTP] " Petr Vorel
2023-12-07 19:40 ` [PATCH v2 3/3] statx04: Skip STATX_ATTR_COMPRESSED on Bcachefs Petr Vorel
2023-12-07 19:40   ` [LTP] " Petr Vorel
2023-12-13  2:46   ` Kent Overstreet
2024-01-04  3:32     ` [LTP] " Li Wang
2024-01-08 10:01     ` Cyril Hrubis
2024-01-08 10:01       ` [LTP] " Cyril Hrubis
2024-01-08 20:54       ` Kent Overstreet
2024-01-08 20:54         ` [LTP] " Kent Overstreet
2024-01-09 10:32         ` Cyril Hrubis
2024-01-09 10:32           ` [LTP] " Cyril Hrubis
2024-04-19 13:11           ` Cyril Hrubis
2024-04-19 13:11             ` Cyril Hrubis
2024-05-07  8:18             ` Petr Vorel
2024-05-07  8:18               ` Petr Vorel
2024-05-07 14:16               ` Kent Overstreet
2024-05-07 14:16                 ` Kent Overstreet
2024-05-07 17:03                 ` Petr Vorel
2024-05-07 17:03                   ` Petr Vorel
2023-12-12 14:48 ` [PATCH v2 0/3] Add support bcachefs filesystem Jan Kara
2023-12-12 14:48   ` [LTP] " Jan Kara
2023-12-13 16:51   ` Jan Kara
2023-12-13 16:51     ` [LTP] " Jan Kara
2024-01-08 10:14 ` Cyril Hrubis
2024-01-08 10:14   ` [LTP] " Cyril Hrubis
2024-01-08 20:04   ` Petr Vorel
2024-01-08 20:04     ` [LTP] " Petr Vorel
2024-01-11 14:05   ` [LTP] ENODEV on bcachefs on kernel < 6.7 [was: Re: [PATCH v2 0/3] Add support bcachefs filesystem] pvorel
2024-01-11 14:05     ` pvorel

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.