From nobody Sun Feb 8 21:47:06 2026 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 49C62393DC1 for ; Wed, 4 Feb 2026 08:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770194003; cv=none; b=qHXGb7GRvkfuS4NoM5UcKa0b7f0nXSGO6bWSUEeGTNi9u8i+4Xg50EdiQqS85ESSzIIMhj1ZWboBWA3GzNfFb8UdzQJ/a9XxkypWIgKVM6OHou9ylg8lDGT3FMN+9BQijzSp40OqpZNMQBT6bxaG2DjWQRMXbwiIXLy33BPMKIQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770194003; c=relaxed/simple; bh=kbcOV/6QcQXosOVb/kYnmczZIIbazol1Xw4so2doLDM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LjfsY4MPHHVt5+8Oc1gwwFd6ya2XbBC2XhiwUWmhRfkAivAbnv4B+pkXIacAR8sA5xLWXZ9Kmi1kK4bc7OFGvmvquPMkLkRA4lF6QSZG1G9L69rJXNInH2/LOyASQHjpGNKXzAknHItIhJ1OIUYmWfAFRVueOFBkjJSyKPjN0SY= 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.215.180 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-pg1-f180.google.com with SMTP id 41be03b00d2f7-c5513f598c0so245185a12.0 for ; Wed, 04 Feb 2026 00:33:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770194002; x=1770798802; 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=Z0Akbc9Txa5+g8lHY2JIYzXyOdlMniqpy0WlpgRwvWnNe2mhr7qFTlFBpzLPnxn+VF L3BqjN+JkvJvDRy6WJCXJ7RW/PcZ+WTkozsv3hwbzGOgTUu6IxEDGrTzPxINNmd4Fl+1 Ixydtq1KrXFM/rdVQ1MKDPJiV7ZLqxR9HPI7JDI/hvxI6l/wWuEVMvdfnzk2gFM4PINb DjNSKuM2e9b8w8llGi89wRSFWsE5o8/WQMBsf9puaeM2TSsISf8rnUFOEP+KPLi3Ae4F qK5i8jIo+3Yd8yV7b03UxhjuoP64k6RR1+eDdyv2Cp2PnrxRy8dqesXGOUws5OXCytMY ENJQ== X-Forwarded-Encrypted: i=1; AJvYcCWhya+nCqKzoZQ4DBkqSSgn0Jw6N30eV/cWxPK3sHLEWpcBrKxXPHYqn8fch2097CPQCLAEh4X06KU4kvY=@vger.kernel.org X-Gm-Message-State: AOJu0YyKGaSQT9DsElxV4fJ/rOWXQsKzyJqYOlIQIlM/dSWbzptu3wE1 d73aB3u6crfdoCEA1K5WxHjoi7rloWE5NreNw7BHMYu+Wo2MsduOWypD X-Gm-Gg: AZuq6aK4YgyGLtYra7AhdquwJnOC40Ym13DiAkLoFEE3U89/YArVEmNTJgjUY+9JtRE PcP1/EucsATiaAfHwskKZ1ptlS3K7584CBszXVlqN/aJYRV9Jos8OStK9rG4aUt1hUyllES26k1 4L/l7itZ7Wvrt2z8j5rcru4ddpQyojCw/vAT93ntmt9zNetXD3dxFmNa6yp2xR70bCxhLth72cd mHTaqUy3/GeCCtmiIZJlNFaePic1Ih3sOle5nqgHmnB8oSlHpG2BWSXH2w/61x3WmX4K2I2WUhJ GmynISxl3MmQAGc60uGvVstxvSC/AFmOc3ieSoe28ZDbr164H1pOpgP0kcZdn7YfJtx4aQ0VJa3 iMxP+yhcl4xeK0u5W+ovbxBjJwk2ZBhTyvQaPCoRNVeeAMzJqTzPVgv3w6kKiZN3fA5yxSJuI+p nptsIFJa7mpgqFcookK1g7uhKzevWGbHy35slo X-Received: by 2002:a17:902:e54b:b0:271:479d:3dcb with SMTP id d9443c01a7336-2a933b9cd21mr22398535ad.6.1770194002634; Wed, 04 Feb 2026 00:33:22 -0800 (PST) Received: from localhost.localdomain ([1.227.206.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a933851270sm16847735ad.2.2026.02.04.00.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 00:33:21 -0800 (PST) From: Namjae Jeon To: viro@zeniv.linux.org.uk, brauner@kernel.org, hch@lst.de Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Namjae Jeon , "Darrick J. Wong" , Jan Kara Subject: [PATCH RESEND v7 02/17] fs: add generic FS_IOC_SHUTDOWN definitions Date: Wed, 4 Feb 2026 17:29:16 +0900 Message-Id: <20260204082931.13915-3-linkinjeon@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260204082931.13915-1-linkinjeon@kernel.org> References: <20260204082931.13915-1-linkinjeon@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 */ }; =20 +/* + * 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 */ --=20 2.25.1