Whamcloud - gitweb
LU-8179 libcfs: Do not include libcfs/util/ioctl.h in kernel code
[fs/lustre-release.git] / lustre / include / lustre_ioctl.h
index 0b2cc82..c004eb8 100644 (file)
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2013, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
  */
 #ifndef LUSTRE_IOCTL_H_
 #define LUSTRE_IOCTL_H_
 
+#include <linux/types.h>
 #include <libcfs/libcfs.h>
 #include <lustre/lustre_idl.h>
 
@@ -38,6 +39,7 @@
 #else /* __KERNEL__ */
 # include <malloc.h>
 # include <string.h>
+#include <libcfs/util/ioctl.h>
 #endif /* !__KERNEL__ */
 
 #if !defined(__KERNEL__) && !defined(LUSTRE_UTILS)
@@ -55,6 +57,12 @@ enum md_echo_cmd {
        ECHO_MD_ALLOC_FID       = 8, /* Get FIDs from MDT */
 };
 
+#define OBD_DEV_ID 1
+#define OBD_DEV_NAME "obd"
+#define OBD_DEV_PATH "/dev/" OBD_DEV_NAME
+#define OBD_DEV_MAJOR 10
+#define OBD_DEV_MINOR 241
+
 #define OBD_IOCTL_VERSION      0x00010004
 #define OBD_DEV_BY_DEVNAME     0xffffd0de
 #define OBD_MAX_IOCTL_BUFFER   CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER
@@ -357,8 +365,8 @@ obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf, int max_len)
 /*     OBD_IOC_LOV_GETSTRIPE   155 LL_IOC_LOV_GETSTRIPE */
 /*     OBD_IOC_LOV_SETEA       156 LL_IOC_LOV_SETEA */
 /*     lustre/lustre_user.h    157-159 */
-#define OBD_IOC_QUOTACHECK     _IOW ('f', 160, int)
-#define OBD_IOC_POLL_QUOTACHECK        _IOR ('f', 161, struct if_quotacheck *)
+/*     OBD_IOC_QUOTACHECK      _IOW ('f', 160, int) */
+/*     OBD_IOC_POLL_QUOTACHECK _IOR ('f', 161, struct if_quotacheck *) */
 #define OBD_IOC_QUOTACTL       _IOWR('f', 162, struct if_quotactl)
 /*     lustre/lustre_user.h    163-176 */
 #define OBD_IOC_CHANGELOG_REG  _IOW ('f', 177, struct obd_ioctl_data)
@@ -369,7 +377,7 @@ obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf, int max_len)
 /*     OBD_IOC_PARSE           _IOWR('f', 182, OBD_IOC_DATA_TYPE) */
 /*     OBD_IOC_DORECORD        _IOWR('f', 183, OBD_IOC_DATA_TYPE) */
 #define OBD_IOC_PROCESS_CFG    _IOWR('f', 184, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_DUMP_LOG       _IOWR('f', 185, OBD_IOC_DATA_TYPE)
+/*     OBD_IOC_DUMP_LOG        _IOWR('f', 185, OBD_IOC_DATA_TYPE) */
 /*     OBD_IOC_CLEAR_LOG       _IOWR('f', 186, OBD_IOC_DATA_TYPE) */
 #define OBD_IOC_PARAM          _IOW ('f', 187, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_POOL           _IOWR('f', 188, OBD_IOC_DATA_TYPE)
@@ -397,7 +405,8 @@ obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf, int max_len)
 #define OBD_IOC_ECHO_ALLOC_SEQ _IOWR('f', 222, struct obd_ioctl_data)
 #define OBD_IOC_START_LFSCK    _IOWR('f', 230, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_STOP_LFSCK     _IOW ('f', 231, OBD_IOC_DATA_TYPE)
-/*     lustre/lustre_user.h    240-246 */
+#define OBD_IOC_QUERY_LFSCK    _IOR('f', 232, struct obd_ioctl_data)
+/*     lustre/lustre_user.h    240-249 */
 /*     LIBCFS_IOC_DEBUG_MASK   250 */
 
 #define IOC_OSC_SET_ACTIVE     _IOWR('h', 21, void *)