From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63E5B31AF2C for ; Fri, 13 Feb 2026 08:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770970856; cv=none; b=StNoM/p7UQ5/ErowfqY5rDhD/JTIWSs8xRUO7yXpcz/YDCrBTUPYTP5RZ+7DBcM+TNvfFDPLCTxQ9rzzxoZh8Q5sDPFg6qzgImMs4130GmDSsmlAxUfvnDTVao2C99XmPUievKcEvVx5mtKiFkM+lNmyFGBDGg5RoWo1ARzH00k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770970856; c=relaxed/simple; bh=kbcOV/6QcQXosOVb/kYnmczZIIbazol1Xw4so2doLDM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OiF1vzsuqYWYfs/7B2T4HkCOW2lVBCLIAsHQlM+5rzZTcpmDdi0mFBrNiDVoEbc/42rJrAm9zPU/rd3pqukLlQta0ouKFLLoy4IkT3DDuDJ8rwKkPNFwA8UgemBfAOEoMGTGwh1eMea8M1MKbP6Si3XjbPxah1GQ+VAbROolmlM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2a7b47a5460so15759305ad.1 for ; Fri, 13 Feb 2026 00:20:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770970855; x=1771575655; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EgV//1wifMQx8DWc1kqJsH8XCVKk4uWaLyVeoKmarPQ=; b=AcQGhNea7DSQBeMhmKAWBOnga+ZJhyN/MX+6YhjR+1ASDNbymNVJRvn0RYXldCUMfz OAnFCEqBdkYy2GRYvvb1bdwkTdD74WU8nSUFu2CnBxOLzN2pXCfZfBghs41w18I0mVka pzk5cv8wsghcOHOe5EQgUYd1xvdx8rcmtntwNsHz4djXSdQ4rrHB+iB1YkRNlG7BfcgB W8vTe5b8yvEWoBSpmTO6edvHmW5l9C3NrRzfGmIyC9VHiJiqGjBGwQkIpumRp8NKVVtu G4rzrJEZl2Uyr08m0v3i1Eq43VpUdbxfFy8E++aF7XMEBSrWKd2ULzwLIlp4cCc8BPsz HkQQ== X-Gm-Message-State: AOJu0YwoyxL/pgtFlrIwmKRJW76C5PrlBKlC+g2oirnbkC/nlopO6wBm XmDrVjf0EW6NM/26/Obv5dvd5RI6be083jb+g+DhrHXqXO0I2OeCTCIlMDNB1A== X-Gm-Gg: AZuq6aLAyGGk2sfqwjBMo/Wezvp9O2OCORJ+u84JwBu0CXm9DgSJ85tGeO+lTNyUZuu 0gwhbRWosO9ZRbecIC+ho4/UVLH/ixGTZv3z8oUBzFR9/AromIhmx9ZoUHCu/0JO61x3m3WD+6d prG29aAQ4Qtkebt1/h6AxUL5nOBjtCjZi5I/Xq6iEI4liXjcFDMJujD/mfTWUdai6m2sIUGPIOt 3axPNIPNBO878HBb7CF4hNCMp0JxPhg0//swU5grUGVgRKOQIIrv1NKsDzU2y7ZvH4uWeVB9yZK L7I4LHlMpY+7EhT79BBRWijYcYpci+QjkYVDa/lHmWcqXmrD67YJEy26VOqMxy8jZ2H4LC5rwkD a8mtkmyASJ2sf5hBMxdj69TBzhvo13DSXLhLSLgKKxkY+65Rcyk18jX2SK3DZqDrpi7gAb3azRV lKy4o5ezpDA2Fb+1VWcAJs0FM4W5zP5mhthbqeqg== X-Received: by 2002:a17:903:2a8c:b0:2a0:d454:5372 with SMTP id d9443c01a7336-2ab4ffd1741mr10187905ad.22.1770970854719; Fri, 13 Feb 2026 00:20:54 -0800 (PST) Received: from localhost.localdomain ([1.227.206.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ab2984ad4asm75236495ad.6.2026.02.13.00.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 00:20:53 -0800 (PST) From: Namjae Jeon 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 Subject: [PATCH v9 02/17] fs: add generic FS_IOC_SHUTDOWN definitions Date: Fri, 13 Feb 2026 17:17:49 +0900 Message-Id: <20260213081804.13351-3-linkinjeon@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260213081804.13351-1-linkinjeon@kernel.org> References: <20260213081804.13351-1-linkinjeon@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Namjae Jeon --- 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