From: Namjae Jeon <linkinjeon@kernel.org>
To: viro@zeniv.linux.org.uk, brauner@kernel.org, hch@lst.de,
tytso@mit.edu, willy@infradead.org, jack@suse.cz,
djwong@kernel.org, dsterba@suse.com, pali@kernel.org,
amir73il@gmail.com, xiang@kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Namjae Jeon <linkinjeon@kernel.org>
Subject: [PATCH v8 02/17] fs: add generic FS_IOC_SHUTDOWN definitions
Date: Fri, 6 Feb 2026 16:18:45 +0900 [thread overview]
Message-ID: <20260206071900.6800-3-linkinjeon@kernel.org> (raw)
In-Reply-To: <20260206071900.6800-1-linkinjeon@kernel.org>
Currently, several filesystems (e.g., xfs, ext4, btrfs) implement
a "shutdown" or "going down" ioctl to simulate filesystem force a shutdown.
While they often use the same underlying numeric value, the definition is
duplicated across filesystem headers or private definitions.
Add generic definitions for FS_IOC_SHUTDOWN in uapi/linux/fs.h.
This allows new filesystems (like ntfs) to implement this feature using
a standard VFS definition and paves the way for existing filesystems
to unify their definitions later.
The flag names are standardized as FS_SHUTDOWN_* to be consistent with
the ioctl name, replacing the historical GOING_DOWN naming convention.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
---
include/uapi/linux/fs.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index 66ca526cf786..32e24778c9e5 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -656,4 +656,16 @@ struct procmap_query {
__u64 build_id_addr; /* in */
};
+/*
+ * Shutdown the filesystem.
+ */
+#define FS_IOC_SHUTDOWN _IOR('X', 125, __u32)
+
+/*
+ * Flags for FS_IOC_SHUTDOWN
+ */
+#define FS_SHUTDOWN_FLAGS_DEFAULT 0x0
+#define FS_SHUTDOWN_FLAGS_LOGFLUSH 0x1 /* flush log but not data*/
+#define FS_SHUTDOWN_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */
+
#endif /* _UAPI_LINUX_FS_H */
--
2.25.1
next prev parent reply other threads:[~2026-02-06 7:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 7:18 [PATCH v8 00/17] ntfs filesystem remake Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 01/17] Revert "fs: Remove NTFS classic" Namjae Jeon
2026-02-06 7:18 ` Namjae Jeon [this message]
2026-02-06 7:18 ` [PATCH v8 03/17] ntfs: update in-memory, on-disk structures and headers Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 04/17] ntfs: update super block operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 05/17] ntfs: update inode operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 06/17] ntfs: update mft operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 07/17] ntfs: update directory operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 08/17] ntfs: update file operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 09/17] ntfs: update iomap and address space operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 10/17] ntfs: update attrib operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 11/17] ntfs: update runlist handling and cluster allocator Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 12/17] ntfs: add reparse and ea operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 13/17] ntfs: update misc operations Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 14/17] ntfs3: remove legacy ntfs driver support Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 15/17] ntfs: add Kconfig and Makefile Namjae Jeon
2026-02-06 7:18 ` [PATCH v8 16/17] Documentation: filesystems: update NTFS driver documentation Namjae Jeon
2026-02-06 7:19 ` [PATCH v8 17/17] MAINTAINERS: update ntfs filesystem entry Namjae Jeon
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=20260206071900.6800-3-linkinjeon@kernel.org \
--to=linkinjeon@kernel.org \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=dsterba@suse.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali@kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=xiang@kernel.org \
/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