* [PATCH 1/2] xfs_io: catch statx fields up to 6.15
@ 2025-04-16 5:21 Darrick J. Wong
2025-04-16 5:22 ` [PATCH 2/2] xfs_io: make statx mask parsing more generally useful Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Darrick J. Wong @ 2025-04-16 5:21 UTC (permalink / raw)
To: Andrey Albershteyn; +Cc: xfs, Christoph Hellwig
From: Darrick J. Wong <djwong@kernel.org>
Add all the new statx fields that have accumulated for the past couple
of years.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
io/statx.h | 25 ++++++++++++++++++++++++-
io/stat.c | 5 +++++
m4/package_libcdev.m4 | 2 +-
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/io/statx.h b/io/statx.h
index 347f6d08210f83..273644f53cf1c4 100644
--- a/io/statx.h
+++ b/io/statx.h
@@ -138,7 +138,10 @@ struct statx {
__u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */
/* 0xb0 */
__u32 stx_atomic_write_segments_max; /* Max atomic write segment count */
- __u32 __spare1[1];
+
+ /* File offset alignment for direct I/O reads */
+ __u32 stx_dio_read_offset_align;
+
/* 0xb8 */
__u64 __spare3[9]; /* Spare space for future expansion */
/* 0x100 */
@@ -191,8 +194,28 @@ struct statx {
#endif /* STATX_TYPE */
+#ifndef STATX_MNT_ID
+#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
+#endif
+
+#ifndef STATX_DIOALIGN
+#define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
+#endif
+
+#ifndef STATX_MNT_ID_UNIQUE
+#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
+#endif
+
+#ifndef STATX_SUBVOL
+#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
+#endif
+
#ifndef STATX_WRITE_ATOMIC
#define STATX_WRITE_ATOMIC 0x00010000U /* Want/got atomic_write_* fields */
#endif
+#ifndef STATX_DIO_READ_ALIGN
+#define STATX_DIO_READ_ALIGN 0x00020000U /* Want/got dio read alignment info */
+#endif
+
#endif /* XFS_IO_STATX_H */
diff --git a/io/stat.c b/io/stat.c
index d27f916800c00a..b37b1a12b8b2fd 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -365,9 +365,14 @@ dump_raw_statx(struct statx *stx)
printf("stat.rdev_minor = %u\n", stx->stx_rdev_minor);
printf("stat.dev_major = %u\n", stx->stx_dev_major);
printf("stat.dev_minor = %u\n", stx->stx_dev_minor);
+ printf("stat.mnt_id = 0x%llu\n", (unsigned long long)stx->stx_mnt_id);
+ printf("stat.dio_mem_align = %u\n", stx->stx_dio_mem_align);
+ printf("stat.dio_offset_align = %u\n", stx->stx_dio_offset_align);
+ printf("stat.subvol = 0x%llu\n", (unsigned long long)stx->stx_subvol);
printf("stat.atomic_write_unit_min = %u\n", stx->stx_atomic_write_unit_min);
printf("stat.atomic_write_unit_max = %u\n", stx->stx_atomic_write_unit_max);
printf("stat.atomic_write_segments_max = %u\n", stx->stx_atomic_write_segments_max);
+ printf("stat.dio_read_offset_align = %u\n", stx->stx_dio_read_offset_align);
return 0;
}
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index af9da8124dbdc8..61353d0aa9d536 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -126,7 +126,7 @@ AC_DEFUN([AC_NEED_INTERNAL_FSCRYPT_POLICY_V2],
AC_DEFUN([AC_NEED_INTERNAL_STATX],
[ AC_CHECK_TYPE(struct statx,
[
- AC_CHECK_MEMBER(struct statx.stx_atomic_write_unit_min,
+ AC_CHECK_MEMBER(struct statx.stx_dio_read_offset_align,
,
need_internal_statx=yes,
[#include <linux/stat.h>]
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] xfs_io: make statx mask parsing more generally useful
2025-04-16 5:21 [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Darrick J. Wong
@ 2025-04-16 5:22 ` Darrick J. Wong
2025-04-16 9:50 ` Andrey Albershteyn
2025-04-22 6:21 ` Christoph Hellwig
2025-04-16 9:15 ` [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Andrey Albershteyn
2025-04-22 6:15 ` Christoph Hellwig
2 siblings, 2 replies; 10+ messages in thread
From: Darrick J. Wong @ 2025-04-16 5:22 UTC (permalink / raw)
To: Andrey Albershteyn; +Cc: xfs, Christoph Hellwig
From: Darrick J. Wong <djwong@kernel.org>
Enhance the statx -m parsing to be more useful:
Add words for all the new STATX_* field flags added in the previous
patch.
Allow "+" and "-" prefixes to add or remove flags from the mask.
Allow multiple arguments to be specified as a comma separated list.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
io/stat.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++-------
man/man8/xfs_io.8 | 11 +++++
2 files changed, 116 insertions(+), 15 deletions(-)
diff --git a/io/stat.c b/io/stat.c
index b37b1a12b8b2fd..ebc085845972c4 100644
--- a/io/stat.c
+++ b/io/stat.c
@@ -321,10 +321,41 @@ _statx(
#endif
}
+struct statx_masks {
+ const char *name;
+ unsigned int mask;
+};
+
+static const struct statx_masks statx_masks[] = {
+ {"basic", STATX_BASIC_STATS},
+ {"all", STATX_ALL},
+
+ {"type", STATX_TYPE},
+ {"mode", STATX_MODE},
+ {"nlink", STATX_NLINK},
+ {"uid", STATX_UID},
+ {"gid", STATX_GID},
+ {"atime", STATX_ATIME},
+ {"mtime", STATX_MTIME},
+ {"ctime", STATX_CTIME},
+ {"ino", STATX_INO},
+ {"size", STATX_SIZE},
+ {"blocks", STATX_BLOCKS},
+ {"btime", STATX_BTIME},
+ {"mnt_id", STATX_MNT_ID},
+ {"dioalign", STATX_DIOALIGN},
+ {"mnt_id_unique", STATX_MNT_ID_UNIQUE},
+ {"subvol", STATX_SUBVOL},
+ {"write_atomic", STATX_WRITE_ATOMIC},
+ {"dio_read_align", STATX_DIO_READ_ALIGN},
+};
+
static void
statx_help(void)
{
- printf(_(
+ unsigned int i;
+
+ printf(_(
"\n"
" Display extended file status.\n"
"\n"
@@ -333,9 +364,16 @@ statx_help(void)
" -r -- Print raw statx structure fields\n"
" -m mask -- Specify the field mask for the statx call\n"
" (can also be 'basic' or 'all'; default STATX_ALL)\n"
+" -m +mask -- Add this to the field mask for the statx call\n"
+" -m -mask -- Remove this from the field mask for the statx call\n"
" -D -- Don't sync attributes with the server\n"
" -F -- Force the attributes to be sync'd with the server\n"
-"\n"));
+"\n"
+"statx mask values: "));
+
+ for (i = 0; i < ARRAY_SIZE(statx_masks); i++)
+ printf("%s%s", i == 0 ? "" : ", ", statx_masks[i].name);
+ printf("\n");
}
/* statx helper */
@@ -376,6 +414,68 @@ dump_raw_statx(struct statx *stx)
return 0;
}
+enum statx_mask_op {
+ SET,
+ REMOVE,
+ ADD,
+};
+
+static bool
+parse_statx_masks(
+ char *optarg,
+ unsigned int *caller_mask)
+{
+ char *arg = optarg;
+ char *word;
+ unsigned int i;
+
+ while ((word = strtok(arg, ",")) != NULL) {
+ enum statx_mask_op op;
+ unsigned int mask;
+ char *p;
+
+ arg = NULL;
+
+ if (*word == '+') {
+ op = ADD;
+ word++;
+ } else if (*word == '-') {
+ op = REMOVE;
+ word++;
+ } else {
+ op = SET;
+ }
+
+ for (i = 0; i < ARRAY_SIZE(statx_masks); i++) {
+ if (!strcmp(statx_masks[i].name, word)) {
+ mask = statx_masks[i].mask;
+ goto process_op;
+ }
+ }
+
+ mask = strtoul(word, &p, 0);
+ if (!p || p == word) {
+ printf( _("non-numeric mask -- %s\n"), word);
+ return false;
+ }
+
+process_op:
+ switch (op) {
+ case ADD:
+ *caller_mask |= mask;
+ continue;
+ case REMOVE:
+ *caller_mask &= ~mask;
+ continue;
+ case SET:
+ *caller_mask = mask;
+ continue;
+ }
+ }
+
+ return true;
+}
+
/*
* options:
* - input flags - query type
@@ -388,7 +488,6 @@ statx_f(
char **argv)
{
int c, verbose = 0, raw = 0;
- char *p;
struct statx stx;
int atflag = 0;
unsigned int mask = STATX_ALL;
@@ -396,18 +495,9 @@ statx_f(
while ((c = getopt(argc, argv, "m:rvFD")) != EOF) {
switch (c) {
case 'm':
- if (strcmp(optarg, "basic") == 0)
- mask = STATX_BASIC_STATS;
- else if (strcmp(optarg, "all") == 0)
- mask = STATX_ALL;
- else {
- mask = strtoul(optarg, &p, 0);
- if (!p || p == optarg) {
- printf(
- _("non-numeric mask -- %s\n"), optarg);
- exitcode = 1;
- return 0;
- }
+ if (!parse_statx_masks(optarg, &mask)) {
+ exitcode = 1;
+ return 0;
}
break;
case 'r':
diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
index 726e25af272242..0e8e69a1fe0c22 100644
--- a/man/man8/xfs_io.8
+++ b/man/man8/xfs_io.8
@@ -999,6 +999,17 @@ .SH FILE I/O COMMANDS
.B \-m <mask>
Specify a numeric field mask for the statx call.
.TP
+.BI "\-m +" value
+Add this value to the statx field value.
+Values can be numeric, or they can be words describing the desired fields.
+See the help command output for a list of recognized words.
+.TP
+.BI "\-m -" value
+Remove this value from the statx field value.
+.TP
+.BI "\-m +" value ",-" value
+Add and remove multiple values from the statx field value.
+.TP
.B \-F
Force the attributes to be synced with the server.
.TP
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfs_io: catch statx fields up to 6.15
2025-04-16 5:21 [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Darrick J. Wong
2025-04-16 5:22 ` [PATCH 2/2] xfs_io: make statx mask parsing more generally useful Darrick J. Wong
@ 2025-04-16 9:15 ` Andrey Albershteyn
2025-04-22 6:15 ` Christoph Hellwig
2 siblings, 0 replies; 10+ messages in thread
From: Andrey Albershteyn @ 2025-04-16 9:15 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: xfs, Christoph Hellwig
On 2025-04-15 22:21:34, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Add all the new statx fields that have accumulated for the past couple
> of years.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> io/statx.h | 25 ++++++++++++++++++++++++-
> io/stat.c | 5 +++++
> m4/package_libcdev.m4 | 2 +-
> 3 files changed, 30 insertions(+), 2 deletions(-)
>
> diff --git a/io/statx.h b/io/statx.h
> index 347f6d08210f83..273644f53cf1c4 100644
> --- a/io/statx.h
> +++ b/io/statx.h
> @@ -138,7 +138,10 @@ struct statx {
> __u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */
> /* 0xb0 */
> __u32 stx_atomic_write_segments_max; /* Max atomic write segment count */
> - __u32 __spare1[1];
> +
> + /* File offset alignment for direct I/O reads */
> + __u32 stx_dio_read_offset_align;
> +
> /* 0xb8 */
> __u64 __spare3[9]; /* Spare space for future expansion */
> /* 0x100 */
> @@ -191,8 +194,28 @@ struct statx {
>
> #endif /* STATX_TYPE */
>
> +#ifndef STATX_MNT_ID
> +#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
> +#endif
> +
> +#ifndef STATX_DIOALIGN
> +#define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
> +#endif
> +
> +#ifndef STATX_MNT_ID_UNIQUE
> +#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
> +#endif
> +
> +#ifndef STATX_SUBVOL
> +#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
> +#endif
> +
> #ifndef STATX_WRITE_ATOMIC
> #define STATX_WRITE_ATOMIC 0x00010000U /* Want/got atomic_write_* fields */
> #endif
>
> +#ifndef STATX_DIO_READ_ALIGN
> +#define STATX_DIO_READ_ALIGN 0x00020000U /* Want/got dio read alignment info */
> +#endif
> +
> #endif /* XFS_IO_STATX_H */
> diff --git a/io/stat.c b/io/stat.c
> index d27f916800c00a..b37b1a12b8b2fd 100644
> --- a/io/stat.c
> +++ b/io/stat.c
> @@ -365,9 +365,14 @@ dump_raw_statx(struct statx *stx)
> printf("stat.rdev_minor = %u\n", stx->stx_rdev_minor);
> printf("stat.dev_major = %u\n", stx->stx_dev_major);
> printf("stat.dev_minor = %u\n", stx->stx_dev_minor);
> + printf("stat.mnt_id = 0x%llu\n", (unsigned long long)stx->stx_mnt_id);
> + printf("stat.dio_mem_align = %u\n", stx->stx_dio_mem_align);
> + printf("stat.dio_offset_align = %u\n", stx->stx_dio_offset_align);
> + printf("stat.subvol = 0x%llu\n", (unsigned long long)stx->stx_subvol);
> printf("stat.atomic_write_unit_min = %u\n", stx->stx_atomic_write_unit_min);
> printf("stat.atomic_write_unit_max = %u\n", stx->stx_atomic_write_unit_max);
> printf("stat.atomic_write_segments_max = %u\n", stx->stx_atomic_write_segments_max);
> + printf("stat.dio_read_offset_align = %u\n", stx->stx_dio_read_offset_align);
> return 0;
> }
>
> diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
> index af9da8124dbdc8..61353d0aa9d536 100644
> --- a/m4/package_libcdev.m4
> +++ b/m4/package_libcdev.m4
> @@ -126,7 +126,7 @@ AC_DEFUN([AC_NEED_INTERNAL_FSCRYPT_POLICY_V2],
> AC_DEFUN([AC_NEED_INTERNAL_STATX],
> [ AC_CHECK_TYPE(struct statx,
> [
> - AC_CHECK_MEMBER(struct statx.stx_atomic_write_unit_min,
> + AC_CHECK_MEMBER(struct statx.stx_dio_read_offset_align,
> ,
> need_internal_statx=yes,
> [#include <linux/stat.h>]
>
Looks good to me
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
--
- Andrey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] xfs_io: make statx mask parsing more generally useful
2025-04-16 5:22 ` [PATCH 2/2] xfs_io: make statx mask parsing more generally useful Darrick J. Wong
@ 2025-04-16 9:50 ` Andrey Albershteyn
2025-04-22 6:21 ` Christoph Hellwig
1 sibling, 0 replies; 10+ messages in thread
From: Andrey Albershteyn @ 2025-04-16 9:50 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: xfs, Christoph Hellwig
On 2025-04-15 22:22:51, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Enhance the statx -m parsing to be more useful:
>
> Add words for all the new STATX_* field flags added in the previous
> patch.
>
> Allow "+" and "-" prefixes to add or remove flags from the mask.
>
> Allow multiple arguments to be specified as a comma separated list.
>
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> io/stat.c | 120 ++++++++++++++++++++++++++++++++++++++++++++++-------
> man/man8/xfs_io.8 | 11 +++++
> 2 files changed, 116 insertions(+), 15 deletions(-)
>
> diff --git a/io/stat.c b/io/stat.c
> index b37b1a12b8b2fd..ebc085845972c4 100644
> --- a/io/stat.c
> +++ b/io/stat.c
> @@ -321,10 +321,41 @@ _statx(
> #endif
> }
>
> +struct statx_masks {
> + const char *name;
> + unsigned int mask;
> +};
> +
> +static const struct statx_masks statx_masks[] = {
> + {"basic", STATX_BASIC_STATS},
> + {"all", STATX_ALL},
> +
> + {"type", STATX_TYPE},
> + {"mode", STATX_MODE},
> + {"nlink", STATX_NLINK},
> + {"uid", STATX_UID},
> + {"gid", STATX_GID},
> + {"atime", STATX_ATIME},
> + {"mtime", STATX_MTIME},
> + {"ctime", STATX_CTIME},
> + {"ino", STATX_INO},
> + {"size", STATX_SIZE},
> + {"blocks", STATX_BLOCKS},
> + {"btime", STATX_BTIME},
> + {"mnt_id", STATX_MNT_ID},
> + {"dioalign", STATX_DIOALIGN},
> + {"mnt_id_unique", STATX_MNT_ID_UNIQUE},
> + {"subvol", STATX_SUBVOL},
> + {"write_atomic", STATX_WRITE_ATOMIC},
> + {"dio_read_align", STATX_DIO_READ_ALIGN},
> +};
> +
> static void
> statx_help(void)
> {
> - printf(_(
> + unsigned int i;
> +
> + printf(_(
> "\n"
> " Display extended file status.\n"
> "\n"
> @@ -333,9 +364,16 @@ statx_help(void)
> " -r -- Print raw statx structure fields\n"
> " -m mask -- Specify the field mask for the statx call\n"
> " (can also be 'basic' or 'all'; default STATX_ALL)\n"
this comment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
then probably can go away, as it can be any of the above now
Otherwise, looks good to me
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
> +" -m +mask -- Add this to the field mask for the statx call\n"
> +" -m -mask -- Remove this from the field mask for the statx call\n"
> " -D -- Don't sync attributes with the server\n"
> " -F -- Force the attributes to be sync'd with the server\n"
> -"\n"));
> +"\n"
> +"statx mask values: "));
> +
> + for (i = 0; i < ARRAY_SIZE(statx_masks); i++)
> + printf("%s%s", i == 0 ? "" : ", ", statx_masks[i].name);
> + printf("\n");
> }
>
> /* statx helper */
> @@ -376,6 +414,68 @@ dump_raw_statx(struct statx *stx)
> return 0;
> }
>
> +enum statx_mask_op {
> + SET,
> + REMOVE,
> + ADD,
> +};
> +
> +static bool
> +parse_statx_masks(
> + char *optarg,
> + unsigned int *caller_mask)
> +{
> + char *arg = optarg;
> + char *word;
> + unsigned int i;
> +
> + while ((word = strtok(arg, ",")) != NULL) {
> + enum statx_mask_op op;
> + unsigned int mask;
> + char *p;
> +
> + arg = NULL;
> +
> + if (*word == '+') {
> + op = ADD;
> + word++;
> + } else if (*word == '-') {
> + op = REMOVE;
> + word++;
> + } else {
> + op = SET;
> + }
> +
> + for (i = 0; i < ARRAY_SIZE(statx_masks); i++) {
> + if (!strcmp(statx_masks[i].name, word)) {
> + mask = statx_masks[i].mask;
> + goto process_op;
> + }
> + }
> +
> + mask = strtoul(word, &p, 0);
> + if (!p || p == word) {
> + printf( _("non-numeric mask -- %s\n"), word);
> + return false;
> + }
> +
> +process_op:
> + switch (op) {
> + case ADD:
> + *caller_mask |= mask;
> + continue;
> + case REMOVE:
> + *caller_mask &= ~mask;
> + continue;
> + case SET:
> + *caller_mask = mask;
> + continue;
> + }
> + }
> +
> + return true;
> +}
> +
> /*
> * options:
> * - input flags - query type
> @@ -388,7 +488,6 @@ statx_f(
> char **argv)
> {
> int c, verbose = 0, raw = 0;
> - char *p;
> struct statx stx;
> int atflag = 0;
> unsigned int mask = STATX_ALL;
> @@ -396,18 +495,9 @@ statx_f(
> while ((c = getopt(argc, argv, "m:rvFD")) != EOF) {
> switch (c) {
> case 'm':
> - if (strcmp(optarg, "basic") == 0)
> - mask = STATX_BASIC_STATS;
> - else if (strcmp(optarg, "all") == 0)
> - mask = STATX_ALL;
> - else {
> - mask = strtoul(optarg, &p, 0);
> - if (!p || p == optarg) {
> - printf(
> - _("non-numeric mask -- %s\n"), optarg);
> - exitcode = 1;
> - return 0;
> - }
> + if (!parse_statx_masks(optarg, &mask)) {
> + exitcode = 1;
> + return 0;
> }
> break;
> case 'r':
> diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
> index 726e25af272242..0e8e69a1fe0c22 100644
> --- a/man/man8/xfs_io.8
> +++ b/man/man8/xfs_io.8
> @@ -999,6 +999,17 @@ .SH FILE I/O COMMANDS
> .B \-m <mask>
> Specify a numeric field mask for the statx call.
> .TP
> +.BI "\-m +" value
> +Add this value to the statx field value.
> +Values can be numeric, or they can be words describing the desired fields.
> +See the help command output for a list of recognized words.
> +.TP
> +.BI "\-m -" value
> +Remove this value from the statx field value.
> +.TP
> +.BI "\-m +" value ",-" value
> +Add and remove multiple values from the statx field value.
> +.TP
> .B \-F
> Force the attributes to be synced with the server.
> .TP
>
--
- Andrey
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfs_io: catch statx fields up to 6.15
2025-04-16 5:21 [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Darrick J. Wong
2025-04-16 5:22 ` [PATCH 2/2] xfs_io: make statx mask parsing more generally useful Darrick J. Wong
2025-04-16 9:15 ` [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Andrey Albershteyn
@ 2025-04-22 6:15 ` Christoph Hellwig
2025-04-23 15:31 ` Darrick J. Wong
2 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2025-04-22 6:15 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Andrey Albershteyn, xfs, Christoph Hellwig
On Tue, Apr 15, 2025 at 10:21:34PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Add all the new statx fields that have accumulated for the past couple
> of years.
I only see a single new field, although I can spot a few flags and
missing printing of a few fields.
Maybe update the commit log a little?
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] xfs_io: make statx mask parsing more generally useful
2025-04-16 5:22 ` [PATCH 2/2] xfs_io: make statx mask parsing more generally useful Darrick J. Wong
2025-04-16 9:50 ` Andrey Albershteyn
@ 2025-04-22 6:21 ` Christoph Hellwig
2025-04-23 15:33 ` Darrick J. Wong
1 sibling, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2025-04-22 6:21 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Andrey Albershteyn, xfs, Christoph Hellwig
On Tue, Apr 15, 2025 at 10:22:51PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Enhance the statx -m parsing to be more useful:
Btw, -m claims to set STATX_ALL, which the kernel deprecated soon after
adding it:
* This is deprecated, and shall remain the same value in the future. To avoid
* confusion please use the equivalent (STATX_BASIC_STATS | STATX_BTIME)
* instead.
do we need to do something about the -m definition in xfs_io because
all fields aren't included in STATX_ALL?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfs_io: catch statx fields up to 6.15
2025-04-22 6:15 ` Christoph Hellwig
@ 2025-04-23 15:31 ` Darrick J. Wong
2025-04-23 15:44 ` Christoph Hellwig
0 siblings, 1 reply; 10+ messages in thread
From: Darrick J. Wong @ 2025-04-23 15:31 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andrey Albershteyn, xfs
On Mon, Apr 21, 2025 at 11:15:04PM -0700, Christoph Hellwig wrote:
> On Tue, Apr 15, 2025 at 10:21:34PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Add all the new statx fields that have accumulated for the past couple
> > of years.
>
> I only see a single new field, although I can spot a few flags and
> missing printing of a few fields.
>
> Maybe update the commit log a little?
"Add all the new statx fields and flags that have accumulated for the
past couple of years so they all print now." ?
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks!
--D
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] xfs_io: make statx mask parsing more generally useful
2025-04-22 6:21 ` Christoph Hellwig
@ 2025-04-23 15:33 ` Darrick J. Wong
2025-04-23 15:44 ` Christoph Hellwig
0 siblings, 1 reply; 10+ messages in thread
From: Darrick J. Wong @ 2025-04-23 15:33 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Andrey Albershteyn, xfs
On Mon, Apr 21, 2025 at 11:21:06PM -0700, Christoph Hellwig wrote:
> On Tue, Apr 15, 2025 at 10:22:51PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Enhance the statx -m parsing to be more useful:
>
> Btw, -m claims to set STATX_ALL, which the kernel deprecated soon after
> adding it:
>
> * This is deprecated, and shall remain the same value in the future. To avoid
> * confusion please use the equivalent (STATX_BASIC_STATS | STATX_BTIME)
> * instead.
>
> do we need to do something about the -m definition in xfs_io because
> all fields aren't included in STATX_ALL?
Hrm. Nothing in fstests uses it AFAICT so maybe we could just get rid
of the -m option. Or we could redefine "all" to map to ~1U so it
actually does what that word means?
--D
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] xfs_io: catch statx fields up to 6.15
2025-04-23 15:31 ` Darrick J. Wong
@ 2025-04-23 15:44 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2025-04-23 15:44 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, Andrey Albershteyn, xfs
On Wed, Apr 23, 2025 at 08:31:23AM -0700, Darrick J. Wong wrote:
> "Add all the new statx fields and flags that have accumulated for the
> past couple of years so they all print now." ?
Sounds good.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] xfs_io: make statx mask parsing more generally useful
2025-04-23 15:33 ` Darrick J. Wong
@ 2025-04-23 15:44 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2025-04-23 15:44 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, Andrey Albershteyn, xfs
On Wed, Apr 23, 2025 at 08:33:52AM -0700, Darrick J. Wong wrote:
> Hrm. Nothing in fstests uses it AFAICT so maybe we could just get rid
> of the -m option. Or we could redefine "all" to map to ~1U so it
> actually does what that word means?
The latter sounds reasonable to me.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-04-23 15:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16 5:21 [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Darrick J. Wong
2025-04-16 5:22 ` [PATCH 2/2] xfs_io: make statx mask parsing more generally useful Darrick J. Wong
2025-04-16 9:50 ` Andrey Albershteyn
2025-04-22 6:21 ` Christoph Hellwig
2025-04-23 15:33 ` Darrick J. Wong
2025-04-23 15:44 ` Christoph Hellwig
2025-04-16 9:15 ` [PATCH 1/2] xfs_io: catch statx fields up to 6.15 Andrey Albershteyn
2025-04-22 6:15 ` Christoph Hellwig
2025-04-23 15:31 ` Darrick J. Wong
2025-04-23 15:44 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox