From nobody Thu Apr 2 06:10:18 2026 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 747FF31B131 for ; Fri, 13 Feb 2026 08:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770970856; cv=none; b=EaDyRotl/wTSkuIXtMJTRs/y1RtIxX8rj+zKLfFzzqJxAHx3LGQMsMxhrRHn1hUz47yAlRxuqcKHCcC67igFgQm4DUpvUUr0XT1cm6OQll18Iqhj/bU/qIFOLYGV/Zsupf5tKBarAue/zKxZuzFpeBH2HYy2wUqRIAPcwTCnl/I= 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.177 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-f177.google.com with SMTP id d9443c01a7336-2ab46931cf1so7364365ad.0 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=GW0Vz57yXKsX7mrt3KHgoGUBovDXP+YszMAMUJxq7rM7xpV5Qk1IlBUGd1tm2VhGlg MPNAjU8sVU+nDVOHs23FGXMSqEHaXajLRK2Q/2adWUVRs+U8tEB/sGhnB4P0HI1TKckP fzzT4f05vzTnFin2QZIuTdhFx9RBydN7fV68tFPYNA4khZeSgmtQMHav6pkevY27Fh1s HTaY9ZxnLDnJiU7loHFq9lOLUU1YUUL+t7DX9jEDHpX/r2yesv3jbFalsVmT2gPj5qUl kC5Xkil0EcIaPZFHy8Eo+m/xCfhTpKyUXR9HPD9wywJ/mhOAuOycHHrWNJHKi9bk4vDv HYOw== X-Forwarded-Encrypted: i=1; AJvYcCU+x712gkiqOKM/1eKGXITfD4zLiQCfgMRrBcKQ4C2OHVERFQCKjD+sXlaJlHQosmH8q9K+cLi+nL5MZmo=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/4jR1HGSdC9SXergns8C9c59F2AQdBEmUB61u6+EQvrgrd44I XLYdG8hgf88qswAhFlAoVjIsl91HJsMBSS1RBDzEoBzeOlkAba9DIMkw X-Gm-Gg: AZuq6aJhYFuT1lukrRZHcHwpFMUXzDgwHLg/KKDlcP/HVjk1gpI5acllC4FULNdCvVU MS9jcPsqSWRAODLFUMOVzirKLMM64lU3vHKEZbtPwt+u1+fJe+NLzSVy0JOCOIvTsbvWb7EYYi+ rt4UKrw4sOgQX3PbvmS3IlkY+qo2Y5jJ4BUxV5cGvbfa+b+4lnEyw+DKyUuLSlGvF0mnQv+S9DW MsIY9zdTCCWwypZ3ExQ8hdQrTes1UEsimhRKvReIJy0m0x3jIdX0trFR5gMlN1WfQmTSnoDhUJ8 hZ40kRDziZ+i5jzABhsGPcYRUfheaddivZF2y1dWX8tNmIdwybFbwCUSxcNVliENF2qyVmw/JCV vzH1CnEN+gp0FfGB2TNPZuGUntgC14uE6HCkVvhh0aIB2NK07o7GXMWe6qQFO21Aw4Wpc/Y/aXX QEIcg8gH0pyYZwsmt3FcrGvjyoUcwsvL34I357cg== 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-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