From nobody Sun Feb 8 12:36:58 2026 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 144BE302773 for ; Fri, 6 Feb 2026 07:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770362532; cv=none; b=V82J9z1QJQ/+vpgbfVTBAGkG2J91FeWVk+pVxrp/X1WTKq9FyMA+DI47fQTR7/Hp9yBYZv/8amlkyJwkH48SCbzi/YKyWjnr0NpTzQ5cH9JHHx2SjzGaJo5TSkceyvuEgLBn5qk5bJPfQIHSbUR92pm/nIvmSh9mTK1xkYV1ir4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770362532; c=relaxed/simple; bh=kbcOV/6QcQXosOVb/kYnmczZIIbazol1Xw4so2doLDM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=U2YEO8gk+tFmpvohJ36zjUvmOCkX33y6HK9ciQ1StG2hLQ2pYFvJECbILWGLFOhgxCjzF7qzqbGfFWB7wLPVSkUyibIJIGqSq3bAcU35K7JPQpkF72+2SavhxD+NvYycGut36oRzVgfx0lm0F/aHeJptvWgk/ZJ8Br5Tayp+BZs= 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.172 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-f172.google.com with SMTP id d9443c01a7336-2a947d01939so9350855ad.0 for ; Thu, 05 Feb 2026 23:22:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770362531; x=1770967331; 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=p7uCeHL4m/Bl5zJMGf/TC3t50RI44mum8vOsddIRAS/pTJ3CJvKCtKQT7EoNknNchP nXiSqUR21HZuEHRgJO6szTCPMIyKPEqTC+yQ71OYvraBz/s+pmrZ0a3zQGrVAHrBN1Us B7/4TmcRB5/eoN6T8g9mMI6/GBH3ZhyouCYwR00tsO85sL0FOYFpL4OEDvPAJbM9b3FS jxoHTSO3TXC1ax4bW6vhXLkjp0uq0xf/D/WMxiIz4IGieFkafio9WvjshvkMBLxW5B3E WM+p0sDwcLV0ZbipXqFY/jW0Ho0Mtkd7SCelNxEojAcmrBaxSp+AxXVpMwFBR95ZGell Re3Q== X-Forwarded-Encrypted: i=1; AJvYcCXtzkasQghbRNhqms1umd33Q6qdWXdbQb3kpk16txTMDHlW4a2gziGG3MIPDZ7QeFF3FLXtlJg/40Ex6ho=@vger.kernel.org X-Gm-Message-State: AOJu0YxhXvI66ZS6iaimt4onm0lovt4XBHaSDVjfwD084b95M3KBSZnF rpfZZFsPkws7F3grkkdGFe+LW7dhcUiMI5v3bO201q00noggmkSI9L0b X-Gm-Gg: AZuq6aKIi1uF1qYZ6ePpvV9402XJEzE8Q4VYpy4oft9awILqZm0qCJqZ/45j4U1hzgM MeWMpGLVLimPamq/9UeD0bdmg7r5loWdF7Xzcg4N/WEaNYbU/qoCZd+2uMaxDkAoo2rkWb3OAqE YOyOmubs/yInQNcj81+dw3WNUWyiWYbdL5W9Uhblsq1xMZ+83ejGSppxWHxABuudFkf3ZQM8NvX m9OmC4cjhD8X+HNUPM4V9h5i9sa56NHrz/BvPTydTLcBRgdzCCkp3S8gOftI1oH8Ou8M1Bulkno K6kn24iknUs3EKFjG+5rp9rEQmCR+eC2tw6JakW0qzVs2ums5TZfSIiMACVq2VJL7kA++iBo9x3 gsVHKx+BN3phQhplcewhy2ZsFWoV1E8tHNzlFvVD2ZY2ln+N6RfwLsi1HsRh2m4vIhBPHoP/9do EGySq1tanjqityvGm6JDNMznJfHQ== X-Received: by 2002:a17:903:2f8d:b0:2a1:14dd:573 with SMTP id d9443c01a7336-2a9516ceacemr19084045ad.23.1770362531441; Thu, 05 Feb 2026 23:22:11 -0800 (PST) Received: from localhost.localdomain ([1.227.206.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a951c7a047sm13575125ad.27.2026.02.05.23.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 23:22:10 -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 v8 02/17] fs: add generic FS_IOC_SHUTDOWN definitions Date: Fri, 6 Feb 2026 16:18:45 +0900 Message-Id: <20260206071900.6800-3-linkinjeon@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260206071900.6800-1-linkinjeon@kernel.org> References: <20260206071900.6800-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