linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aleksa Sarai <cyphar@cyphar.com>
To: fstests@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>,
	Amir Goldstein <amir73il@gmail.com>,
	Alexander Aring <alex.aring@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Liang, Kan" <kan.liang@linux.intel.com>
Cc: Aleksa Sarai <cyphar@cyphar.com>,
	Christoph Hellwig <hch@infradead.org>,
	Josef Bacik <josef@toxicpanda.com>,
	linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	linux-perf-users@vger.kernel.org
Subject: [PATCH xfstests v1 1/2] statx: update headers to include newer statx fields
Date: Wed, 28 Aug 2024 20:37:05 +1000	[thread overview]
Message-ID: <20240828103706.2393267-1-cyphar@cyphar.com> (raw)
In-Reply-To: <20240828-exportfs-u64-mount-id-v3-0-10c2c4c16708@cyphar.com>

These come from Linux v6.11-rc5.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
 src/open_by_handle.c |  4 +++-
 src/statx.h          | 22 ++++++++++++++++++++--
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/src/open_by_handle.c b/src/open_by_handle.c
index 0f74ed08b1f0..d9c802ca9bd1 100644
--- a/src/open_by_handle.c
+++ b/src/open_by_handle.c
@@ -82,12 +82,14 @@ Examples:
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <sys/stat.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <linux/limits.h>
 #include <libgen.h>
 
+#include <sys/stat.h>
+#include "statx.h"
+
 #define MAXFILES 1024
 
 struct handle {
diff --git a/src/statx.h b/src/statx.h
index 3f239d791dfe..935cb2ed415e 100644
--- a/src/statx.h
+++ b/src/statx.h
@@ -102,7 +102,7 @@ struct statx {
 	__u64	stx_ino;	/* Inode number */
 	__u64	stx_size;	/* File size */
 	__u64	stx_blocks;	/* Number of 512-byte blocks allocated */
-	__u64	__spare1[1];
+	__u64	stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
 	/* 0x40 */
 	struct statx_timestamp	stx_atime;	/* Last access time */
 	struct statx_timestamp	stx_btime;	/* File creation time */
@@ -114,7 +114,18 @@ struct statx {
 	__u32	stx_dev_major;	/* ID of device containing file [uncond] */
 	__u32	stx_dev_minor;
 	/* 0x90 */
-	__u64	__spare2[14];	/* Spare space for future expansion */
+	__u64	stx_mnt_id;
+	__u32	stx_dio_mem_align;	/* Memory buffer alignment for direct I/O */
+	__u32	stx_dio_offset_align;	/* File offset alignment for direct I/O */
+	/* 0xa0 */
+	__u64	stx_subvol;	/* Subvolume identifier */
+	__u32	stx_atomic_write_unit_min;	/* Min atomic write unit in bytes */
+	__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];
+	/* 0xb8 */
+	__u64	__spare3[9];	/* Spare space for future expansion */
 	/* 0x100 */
 };
 
@@ -139,6 +150,13 @@ struct statx {
 #define STATX_BLOCKS		0x00000400U	/* Want/got stx_blocks */
 #define STATX_BASIC_STATS	0x000007ffU	/* The stuff in the normal stat struct */
 #define STATX_BTIME		0x00000800U	/* Want/got stx_btime */
+#define STATX_MNT_ID		0x00001000U	/* Got stx_mnt_id */
+#define STATX_DIOALIGN		0x00002000U	/* Want/got direct I/O alignment info */
+#define STATX_MNT_ID_UNIQUE	0x00004000U	/* Want/got extended stx_mount_id */
+#define STATX_SUBVOL		0x00008000U	/* Want/got stx_subvol */
+#define STATX_WRITE_ATOMIC	0x00010000U	/* Want/got atomic_write_* fields */
+
+#define STATX__RESERVED		0x80000000U	/* Reserved for future struct statx expansion */
 #define STATX_ALL		0x00000fffU	/* All currently supported flags */
 
 /*
-- 
2.46.0


  parent reply	other threads:[~2024-08-28 10:37 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 10:19 [PATCH RESEND v3 0/2] fhandle: expose u64 mount id to name_to_handle_at(2) Aleksa Sarai
2024-08-28 10:19 ` [PATCH RESEND v3 1/2] uapi: explain how per-syscall AT_* flags should be allocated Aleksa Sarai
2024-09-02 12:46   ` Jan Kara
2024-08-28 10:19 ` [PATCH RESEND v3 2/2] fhandle: expose u64 mount id to name_to_handle_at(2) Aleksa Sarai
2024-09-02 12:54   ` Jan Kara
2024-08-28 10:37 ` Aleksa Sarai [this message]
2024-08-28 10:37   ` [PATCH xfstests v1 2/2] open_by_handle: add tests for u64 mount ID Aleksa Sarai
2024-08-30 17:10     ` Amir Goldstein
2024-09-01 12:57       ` Aleksa Sarai
2024-09-02 14:16 ` [PATCH RESEND v3 0/2] fhandle: expose u64 mount id to name_to_handle_at(2) Christian Brauner
2024-09-02 16:45 ` [PATCH xfstests v2 1/2] statx: update headers to include newer statx fields Aleksa Sarai
2024-09-02 16:45   ` [PATCH xfstests v2 2/2] open_by_handle: add tests for u64 mount ID Aleksa Sarai
2024-09-02 17:21     ` Amir Goldstein
2024-09-03  6:41       ` Aleksa Sarai
2024-09-03  9:08         ` Amir Goldstein
2024-09-04 16:30           ` Aleksa Sarai
2024-09-04 16:44             ` Amir Goldstein
2024-09-04 17:53               ` Aleksa Sarai
2024-09-03  7:54     ` Amir Goldstein
2024-09-03  9:11       ` Aleksa Sarai
2024-09-03  6:49   ` [PATCH xfstests v2 1/2] statx: update headers to include newer statx fields Amir Goldstein
2024-09-04 17:56 ` [PATCH xfstests v3 1/2] open_by_handle: verify u32 and u64 mount IDs Aleksa Sarai
2024-09-04 17:56   ` [PATCH xfstests v3 2/2] generic/756: test name_to_handle_at(AT_HANDLE_MNT_ID_UNIQUE) explicitly Aleksa Sarai
2024-09-04 18:49     ` Amir Goldstein
2024-09-04 19:00       ` Aleksa Sarai
2024-09-04 18:29   ` [PATCH xfstests v3 1/2] open_by_handle: verify u32 and u64 mount IDs Amir Goldstein
2024-09-04 19:48 ` [PATCH xfstests v4 " Aleksa Sarai
2024-09-04 19:48   ` [PATCH xfstests v4 2/2] generic/756: test name_to_handle_at(AT_HANDLE_MNT_ID_UNIQUE) explicitly Aleksa Sarai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240828103706.2393267-1-cyphar@cyphar.com \
    --to=cyphar@cyphar.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alex.aring@gmail.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=irogers@google.com \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).