Commit 8877d3bf authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman

staging: lustre: move ioctls to lustre_ioctl.h

Move ioctl definitions and related functions from lustre_dlm.h,
lustre_lib.h, obd.h, to lustre_ioctl.h. Replace the definitions of
retired ioctls with comment.
Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4961
Reviewed-on: http://review.whamcloud.com/10139Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarRobert Read <robert.read@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c68c3fa4
This diff is collapsed.
...@@ -188,26 +188,20 @@ struct ost_id { ...@@ -188,26 +188,20 @@ struct ost_id {
* *STRIPE* - set/get lov_user_md * *STRIPE* - set/get lov_user_md
* *INFO - set/get lov_user_mds_data * *INFO - set/get lov_user_mds_data
*/ */
/* see <lustre_lib.h> for ioctl numberss 101-150 */ /* lustre_ioctl.h 101-150 */
#define LL_IOC_GETFLAGS _IOR('f', 151, long) #define LL_IOC_GETFLAGS _IOR('f', 151, long)
#define LL_IOC_SETFLAGS _IOW('f', 152, long) #define LL_IOC_SETFLAGS _IOW('f', 152, long)
#define LL_IOC_CLRFLAGS _IOW('f', 153, long) #define LL_IOC_CLRFLAGS _IOW('f', 153, long)
/* LL_IOC_LOV_SETSTRIPE: See also OBD_IOC_LOV_SETSTRIPE */
#define LL_IOC_LOV_SETSTRIPE _IOW('f', 154, long) #define LL_IOC_LOV_SETSTRIPE _IOW('f', 154, long)
/* LL_IOC_LOV_GETSTRIPE: See also OBD_IOC_LOV_GETSTRIPE */
#define LL_IOC_LOV_GETSTRIPE _IOW('f', 155, long) #define LL_IOC_LOV_GETSTRIPE _IOW('f', 155, long)
/* LL_IOC_LOV_SETEA: See also OBD_IOC_LOV_SETEA */
#define LL_IOC_LOV_SETEA _IOW('f', 156, long) #define LL_IOC_LOV_SETEA _IOW('f', 156, long)
#define LL_IOC_RECREATE_OBJ _IOW('f', 157, long) #define LL_IOC_RECREATE_OBJ _IOW('f', 157, long)
#define LL_IOC_RECREATE_FID _IOW('f', 157, struct lu_fid) #define LL_IOC_RECREATE_FID _IOW('f', 157, struct lu_fid)
#define LL_IOC_GROUP_LOCK _IOW('f', 158, long) #define LL_IOC_GROUP_LOCK _IOW('f', 158, long)
#define LL_IOC_GROUP_UNLOCK _IOW('f', 159, long) #define LL_IOC_GROUP_UNLOCK _IOW('f', 159, long)
/* LL_IOC_QUOTACHECK: See also OBD_IOC_QUOTACHECK */ /* #define LL_IOC_QUOTACHECK 160 OBD_IOC_QUOTACHECK */
#define LL_IOC_QUOTACHECK _IOW('f', 160, int) /* #define LL_IOC_POLL_QUOTACHECK 161 OBD_IOC_POLL_QUOTACHECK */
/* LL_IOC_POLL_QUOTACHECK: See also OBD_IOC_POLL_QUOTACHECK */ /* #define LL_IOC_QUOTACTL 162 OBD_IOC_QUOTACTL */
#define LL_IOC_POLL_QUOTACHECK _IOR('f', 161, struct if_quotacheck *)
/* LL_IOC_QUOTACTL: See also OBD_IOC_QUOTACTL */
#define LL_IOC_QUOTACTL _IOWR('f', 162, struct if_quotactl)
#define IOC_OBD_STATFS _IOWR('f', 164, struct obd_statfs *) #define IOC_OBD_STATFS _IOWR('f', 164, struct obd_statfs *)
#define IOC_LOV_GETINFO _IOWR('f', 165, struct lov_user_mds_data *) #define IOC_LOV_GETINFO _IOWR('f', 165, struct lov_user_mds_data *)
#define LL_IOC_FLUSHCTX _IOW('f', 166, long) #define LL_IOC_FLUSHCTX _IOW('f', 166, long)
...@@ -221,8 +215,7 @@ struct ost_id { ...@@ -221,8 +215,7 @@ struct ost_id {
#define LL_IOC_GET_CONNECT_FLAGS _IOWR('f', 174, __u64 *) #define LL_IOC_GET_CONNECT_FLAGS _IOWR('f', 174, __u64 *)
#define LL_IOC_GET_MDTIDX _IOR('f', 175, int) #define LL_IOC_GET_MDTIDX _IOR('f', 175, int)
/* see <lustre_lib.h> for ioctl numbers 177-210 */ /* lustre_ioctl.h 177-210 */
#define LL_IOC_HSM_STATE_GET _IOR('f', 211, struct hsm_user_state) #define LL_IOC_HSM_STATE_GET _IOR('f', 211, struct hsm_user_state)
#define LL_IOC_HSM_STATE_SET _IOW('f', 212, struct hsm_state_set) #define LL_IOC_HSM_STATE_SET _IOW('f', 212, struct hsm_state_set)
#define LL_IOC_HSM_CT_START _IOW('f', 213, struct lustre_kernelcomm) #define LL_IOC_HSM_CT_START _IOW('f', 213, struct lustre_kernelcomm)
...@@ -255,10 +248,6 @@ struct ost_id { ...@@ -255,10 +248,6 @@ struct ost_id {
#define IOC_MDC_GETFILEINFO _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data *) #define IOC_MDC_GETFILEINFO _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data *)
#define LL_IOC_MDC_GETINFO _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data *) #define LL_IOC_MDC_GETINFO _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data *)
/* Keep these for backward compartability. */
#define LL_IOC_OBD_STATFS IOC_OBD_STATFS
#define IOC_MDC_GETSTRIPE IOC_MDC_GETFILESTRIPE
#define MAX_OBD_NAME 128 /* If this changes, a NEW ioctl must be added */ #define MAX_OBD_NAME 128 /* If this changes, a NEW ioctl must be added */
/* Define O_LOV_DELAY_CREATE to be a mask that is not useful for regular /* Define O_LOV_DELAY_CREATE to be a mask that is not useful for regular
......
...@@ -1282,16 +1282,6 @@ int ldlm_cli_cancel_list(struct list_head *head, int count, ...@@ -1282,16 +1282,6 @@ int ldlm_cli_cancel_list(struct list_head *head, int count,
int intent_disposition(struct ldlm_reply *rep, int flag); int intent_disposition(struct ldlm_reply *rep, int flag);
void intent_set_disposition(struct ldlm_reply *rep, int flag); void intent_set_disposition(struct ldlm_reply *rep, int flag);
/* ioctls for trying requests */
#define IOC_LDLM_TYPE 'f'
#define IOC_LDLM_MIN_NR 40
#define IOC_LDLM_TEST _IOWR('f', 40, long)
#define IOC_LDLM_DUMP _IOWR('f', 41, long)
#define IOC_LDLM_REGRESS_START _IOWR('f', 42, long)
#define IOC_LDLM_REGRESS_STOP _IOWR('f', 43, long)
#define IOC_LDLM_MAX_NR 43
/** /**
* "Modes" of acquiring lock_res, necessary to tell lockdep that taking more * "Modes" of acquiring lock_res, necessary to tell lockdep that taking more
* than one lock_res is dead-lock safe. * than one lock_res is dead-lock safe.
......
...@@ -35,15 +35,6 @@ ...@@ -35,15 +35,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#define IOC_OSC_TYPE 'h'
#define IOC_OSC_MIN_NR 20
#define IOC_OSC_SET_ACTIVE _IOWR(IOC_OSC_TYPE, 21, struct obd_device *)
#define IOC_OSC_MAX_NR 50
#define IOC_MDC_TYPE 'i'
#define IOC_MDC_MIN_NR 20
#define IOC_MDC_MAX_NR 50
#include "lustre/lustre_idl.h" #include "lustre/lustre_idl.h"
#include "lustre_lib.h" #include "lustre_lib.h"
#include "lu_ref.h" #include "lu_ref.h"
...@@ -623,7 +614,6 @@ struct obd_llog_group { ...@@ -623,7 +614,6 @@ struct obd_llog_group {
/* corresponds to one of the obd's */ /* corresponds to one of the obd's */
#define OBD_DEVICE_MAGIC 0XAB5CD6EF #define OBD_DEVICE_MAGIC 0XAB5CD6EF
#define OBD_DEV_BY_DEVNAME 0xffffd0de
struct lvfs_run_ctxt { struct lvfs_run_ctxt {
struct dt_device *dt; struct dt_device *dt;
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
#include "../include/obd_support.h" #include "../include/obd_support.h"
#include "../include/obd_class.h" #include "../include/obd_class.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_lib.h" #include "../include/lustre_lib.h"
#include "../include/lustre/lustre_idl.h"
#include "../include/lustre_lite.h" #include "../include/lustre_lite.h"
#include "../include/lustre_dlm.h" #include "../include/lustre_dlm.h"
#include "../include/lustre_fid.h" #include "../include/lustre_fid.h"
...@@ -1543,7 +1543,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1543,7 +1543,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case LL_IOC_LOV_SWAP_LAYOUTS: case LL_IOC_LOV_SWAP_LAYOUTS:
return -EPERM; return -EPERM;
case LL_IOC_OBD_STATFS: case IOC_OBD_STATFS:
return ll_obd_statfs(inode, (void __user *)arg); return ll_obd_statfs(inode, (void __user *)arg);
case LL_IOC_LOV_GETSTRIPE: case LL_IOC_LOV_GETSTRIPE:
case LL_IOC_MDC_GETINFO: case LL_IOC_MDC_GETINFO:
...@@ -1708,9 +1708,6 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1708,9 +1708,6 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
kvfree(lmm); kvfree(lmm);
return rc; return rc;
} }
case OBD_IOC_LLOG_CATINFO: {
return -EOPNOTSUPP;
}
case OBD_IOC_QUOTACHECK: { case OBD_IOC_QUOTACHECK: {
struct obd_quotactl *oqctl; struct obd_quotactl *oqctl;
int error = 0; int error = 0;
...@@ -1768,7 +1765,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -1768,7 +1765,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
kfree(check); kfree(check);
return rc; return rc;
} }
case LL_IOC_QUOTACTL: { case OBD_IOC_QUOTACTL: {
struct if_quotactl *qctl; struct if_quotactl *qctl;
qctl = kzalloc(sizeof(*qctl), GFP_NOFS); qctl = kzalloc(sizeof(*qctl), GFP_NOFS);
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <linux/mount.h> #include <linux/mount.h>
#include "llite_internal.h" #include "llite_internal.h"
#include "../include/lustre/ll_fiemap.h" #include "../include/lustre/ll_fiemap.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/cl_object.h" #include "../include/cl_object.h"
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/mm.h> #include <linux/mm.h>
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_lite.h" #include "../include/lustre_lite.h"
#include "../include/lustre_ha.h" #include "../include/lustre_ha.h"
#include "../include/lustre_dlm.h" #include "../include/lustre_dlm.h"
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "../include/cl_object.h" #include "../include/cl_object.h"
#include "../include/lustre_lite.h" #include "../include/lustre_lite.h"
#include "../include/lustre_fid.h" #include "../include/lustre_fid.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_kernelcomm.h" #include "../include/lustre_kernelcomm.h"
#include "lmv_internal.h" #include "lmv_internal.h"
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "../../include/linux/libcfs/libcfs.h" #include "../../include/linux/libcfs/libcfs.h"
#include "../include/obd_support.h" #include "../include/obd_support.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_lib.h" #include "../include/lustre_lib.h"
#include "../include/lustre_net.h" #include "../include/lustre_net.h"
#include "../include/lustre/lustre_idl.h" #include "../include/lustre/lustre_idl.h"
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
# include <linux/utsname.h> # include <linux/utsname.h>
#include "../include/lustre_acl.h" #include "../include/lustre_acl.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/obd_class.h" #include "../include/obd_class.h"
#include "../include/lustre_lmv.h" #include "../include/lustre_lmv.h"
#include "../include/lustre_fid.h" #include "../include/lustre_fid.h"
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "../include/lprocfs_status.h" #include "../include/lprocfs_status.h"
#include <linux/list.h> #include <linux/list.h>
#include "../include/cl_object.h" #include "../include/cl_object.h"
#include "../include/lustre/lustre_ioctl.h"
#include "llog_internal.h" #include "llog_internal.h"
struct obd_device *obd_devs[MAX_OBD_DEVICES]; struct obd_device *obd_devs[MAX_OBD_DEVICES];
...@@ -287,13 +288,6 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg) ...@@ -287,13 +288,6 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
goto out; goto out;
} }
case OBD_IOC_CLOSE_UUID: {
CDEBUG(D_IOCTL, "closing all connections to uuid %s (NOOP)\n",
data->ioc_inlbuf1);
err = 0;
goto out;
}
case OBD_IOC_GETDEVICE: { case OBD_IOC_GETDEVICE: {
int index = data->ioc_count; int index = data->ioc_count;
char *status, *str; char *status, *str;
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
#include "../../include/obd_support.h" #include "../../include/obd_support.h"
#include "../../include/obd_class.h" #include "../../include/obd_class.h"
#include "../../include/lprocfs_status.h" #include "../../include/lprocfs_status.h"
#include "../../include/lustre/lustre_ioctl.h"
#include "../../include/lustre_ver.h" #include "../../include/lustre_ver.h"
/* buffer MUST be at least the size of obd_ioctl_hdr */ /* buffer MUST be at least the size of obd_ioctl_hdr */
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#define DEBUG_SUBSYSTEM S_CLASS #define DEBUG_SUBSYSTEM S_CLASS
#include "../include/obd_class.h" #include "../include/obd_class.h"
#include <linux/string.h> #include <linux/string.h>
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_log.h" #include "../include/lustre_log.h"
#include "../include/lprocfs_status.h" #include "../include/lprocfs_status.h"
#include "../include/lustre_param.h" #include "../include/lustre_param.h"
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "../include/cl_object.h" #include "../include/cl_object.h"
#include "../include/lustre_fid.h" #include "../include/lustre_fid.h"
#include "../include/lustre_acl.h" #include "../include/lustre_acl.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_net.h" #include "../include/lustre_net.h"
#include "echo_internal.h" #include "echo_internal.h"
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "../include/lustre_ha.h" #include "../include/lustre_ha.h"
#include "../include/lprocfs_status.h" #include "../include/lprocfs_status.h"
#include "../include/lustre/lustre_ioctl.h"
#include "../include/lustre_debug.h" #include "../include/lustre_debug.h"
#include "../include/lustre_param.h" #include "../include/lustre_param.h"
#include "../include/lustre_fid.h" #include "../include/lustre_fid.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment