fs: introduce a generic shutdown ioctl

This patch introduces a generic ioctl for fs shutdown.

Change-Id: I452ee16b0078a2704b8026962e5bd07b67710c06
diff --git a/include/linux/fs.h b/include/linux/fs.h
index beedf27..3b44026 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -332,6 +332,7 @@
 #define FIFREEZE	_IOWR('X', 119, int)	/* Freeze */
 #define FITHAW		_IOWR('X', 120, int)	/* Thaw */
 #define FITRIM		_IOWR('X', 121, struct fstrim_range)	/* Trim */
+#define FS_IOC_SHUTDOWN	_IOR('X', 125, __u32)	/* Shutdown */
 
 #define	FS_IOC_GETFLAGS			_IOR('f', 1, long)
 #define	FS_IOC_SETFLAGS			_IOW('f', 2, long)
@@ -380,6 +381,13 @@
 #define SYNC_FILE_RANGE_WRITE		2
 #define SYNC_FILE_RANGE_WAIT_AFTER	4
 
+/*
+ * Flags for going down operation used by FS_IOC_GOINGDOWN
+ */
+#define FS_GOING_DOWN_FULLSYNC	0x0	/* going down with full sync */
+#define FS_GOING_DOWN_METASYNC	0x1	/* going down with metadata */
+#define FS_GOING_DOWN_NOSYNC	0x2	/* going down */
+
 #ifdef __KERNEL__
 
 #include <linux/linkage.h>