Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-4423 lnet: use 64-bit time for selftest
[fs/lustre-release.git]
/
lnet
/
selftest
/
conctl.c
diff --git
a/lnet/selftest/conctl.c
b/lnet/selftest/conctl.c
index
ea67cc3
..
f9e4c0d
100644
(file)
--- a/
lnet/selftest/conctl.c
+++ b/
lnet/selftest/conctl.c
@@
-15,11
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
*
* GPL HEADER END
*/
@@
-46,7
+42,7
@@
#include "console.h"
static int
#include "console.h"
static int
-lst_session_new_ioctl(
lstio_session_new_args_t
*args)
+lst_session_new_ioctl(
struct lstio_session_new_args
*args)
{
char *name;
int rc;
{
char *name;
int rc;
@@
-82,7
+78,7
@@
lst_session_new_ioctl(lstio_session_new_args_t *args)
}
static int
}
static int
-lst_session_end_ioctl(
lstio_session_end_args_t
*args)
+lst_session_end_ioctl(
struct lstio_session_end_args
*args)
{
if (args->lstio_ses_key != console_session.ses_key)
return -EACCES;
{
if (args->lstio_ses_key != console_session.ses_key)
return -EACCES;
@@
-91,7
+87,7
@@
lst_session_end_ioctl(lstio_session_end_args_t *args)
}
static int
}
static int
-lst_session_info_ioctl(
lstio_session_info_args_t
*args)
+lst_session_info_ioctl(
struct lstio_session_info_args
*args)
{
/* no checking of key */
{
/* no checking of key */
@@
-113,7
+109,7
@@
lst_session_info_ioctl(lstio_session_info_args_t *args)
}
static int
}
static int
-lst_debug_ioctl(
lstio_debug_args_t
*args)
+lst_debug_ioctl(
struct lstio_debug_args
*args)
{
char *name = NULL;
int client = 1;
{
char *name = NULL;
int client = 1;
@@
-194,7
+190,7
@@
out:
}
static int
}
static int
-lst_group_add_ioctl(
lstio_group_add_args_t
*args)
+lst_group_add_ioctl(
struct lstio_group_add_args
*args)
{
char *name;
int rc;
{
char *name;
int rc;
@@
-227,7
+223,7
@@
lst_group_add_ioctl(lstio_group_add_args_t *args)
}
static int
}
static int
-lst_group_del_ioctl(
lstio_group_del_args_t
*args)
+lst_group_del_ioctl(
struct lstio_group_del_args
*args)
{
int rc;
char *name;
{
int rc;
char *name;
@@
-260,7
+256,7
@@
lst_group_del_ioctl(lstio_group_del_args_t *args)
}
static int
}
static int
-lst_group_update_ioctl(
lstio_group_update_args_t
*args)
+lst_group_update_ioctl(
struct lstio_group_update_args
*args)
{
int rc;
char *name;
{
int rc;
char *name;
@@
-317,7
+313,7
@@
lst_group_update_ioctl(lstio_group_update_args_t *args)
}
static int
}
static int
-lst_nodes_add_ioctl(
lstio_group_nodes_args_t
*args)
+lst_nodes_add_ioctl(
struct lstio_group_nodes_args
*args)
{
unsigned feats;
int rc;
{
unsigned feats;
int rc;
@@
-362,7
+358,7
@@
lst_nodes_add_ioctl(lstio_group_nodes_args_t *args)
}
static int
}
static int
-lst_group_list_ioctl(
lstio_group_list_args_t
*args)
+lst_group_list_ioctl(
struct lstio_group_list_args
*args)
{
if (args->lstio_grp_key != console_session.ses_key)
return -EACCES;
{
if (args->lstio_grp_key != console_session.ses_key)
return -EACCES;
@@
-379,7
+375,7
@@
lst_group_list_ioctl(lstio_group_list_args_t *args)
}
static int
}
static int
-lst_group_info_ioctl(
lstio_group_info_args_t
*args)
+lst_group_info_ioctl(
struct lstio_group_info_args
*args)
{
char *name;
int ndent;
{
char *name;
int ndent;
@@
-436,13
+432,13
@@
lst_group_info_ioctl(lstio_group_info_args_t *args)
if (args->lstio_grp_dentsp != NULL &&
(copy_to_user(args->lstio_grp_idxp, &index, sizeof(index)) ||
copy_to_user(args->lstio_grp_ndentp, &ndent, sizeof(ndent))))
if (args->lstio_grp_dentsp != NULL &&
(copy_to_user(args->lstio_grp_idxp, &index, sizeof(index)) ||
copy_to_user(args->lstio_grp_ndentp, &ndent, sizeof(ndent))))
- r
c =
-EFAULT;
+ r
eturn
-EFAULT;
return 0;
}
static int
return 0;
}
static int
-lst_batch_add_ioctl(
lstio_batch_add_args_t
*args)
+lst_batch_add_ioctl(
struct lstio_batch_add_args
*args)
{
int rc;
char *name;
{
int rc;
char *name;
@@
-475,7
+471,7
@@
lst_batch_add_ioctl(lstio_batch_add_args_t *args)
}
static int
}
static int
-lst_batch_run_ioctl(
lstio_batch_run_args_t
*args)
+lst_batch_run_ioctl(
struct lstio_batch_run_args
*args)
{
int rc;
char *name;
{
int rc;
char *name;
@@
-509,7
+505,7
@@
lst_batch_run_ioctl(lstio_batch_run_args_t *args)
}
static int
}
static int
-lst_batch_stop_ioctl(
lstio_batch_stop_args_t
*args)
+lst_batch_stop_ioctl(
struct lstio_batch_stop_args
*args)
{
int rc;
char *name;
{
int rc;
char *name;
@@
-544,7
+540,7
@@
lst_batch_stop_ioctl(lstio_batch_stop_args_t *args)
}
static int
}
static int
-lst_batch_query_ioctl(
lstio_batch_query_args_t
*args)
+lst_batch_query_ioctl(
struct lstio_batch_query_args
*args)
{
char *name;
int rc;
{
char *name;
int rc;
@@
-585,7
+581,7
@@
lst_batch_query_ioctl(lstio_batch_query_args_t *args)
}
static int
}
static int
-lst_batch_list_ioctl(
lstio_batch_list_args_t
*args)
+lst_batch_list_ioctl(
struct lstio_batch_list_args
*args)
{
if (args->lstio_bat_key != console_session.ses_key)
return -EACCES;
{
if (args->lstio_bat_key != console_session.ses_key)
return -EACCES;
@@
-602,7
+598,7
@@
lst_batch_list_ioctl(lstio_batch_list_args_t *args)
}
static int
}
static int
-lst_batch_info_ioctl(
lstio_batch_info_args_t
*args)
+lst_batch_info_ioctl(
struct lstio_batch_info_args
*args)
{
char *name;
int rc;
{
char *name;
int rc;
@@
-667,7
+663,7
@@
lst_batch_info_ioctl(lstio_batch_info_args_t *args)
}
static int
}
static int
-lst_stat_query_ioctl(
lstio_stat_args_t
*args)
+lst_stat_query_ioctl(
struct lstio_stat_args
*args)
{
int rc;
char *name = NULL;
{
int rc;
char *name = NULL;
@@
-713,7
+709,7
@@
lst_stat_query_ioctl(lstio_stat_args_t *args)
return rc;
}
return rc;
}
-static int lst_test_add_ioctl(
lstio_test_args_t
*args)
+static int lst_test_add_ioctl(
struct lstio_test_args
*args)
{
char *batch_name;
char *src_name = NULL;
{
char *batch_name;
char *src_name = NULL;
@@
-745,7
+741,7
@@
static int lst_test_add_ioctl(lstio_test_args_t *args)
if (args->lstio_tes_param != NULL &&
(args->lstio_tes_param_len <= 0 ||
args->lstio_tes_param_len >
if (args->lstio_tes_param != NULL &&
(args->lstio_tes_param_len <= 0 ||
args->lstio_tes_param_len >
- PAGE_
CACHE_
SIZE - sizeof(lstcon_test_t)))
+ PAGE_SIZE - sizeof(lstcon_test_t)))
return -EINVAL;
LIBCFS_ALLOC(batch_name, args->lstio_tes_bat_nmlen + 1);
return -EINVAL;
LIBCFS_ALLOC(batch_name, args->lstio_tes_bat_nmlen + 1);
@@
-823,7
+819,7
@@
lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr)
opc = data->ioc_u32[0];
opc = data->ioc_u32[0];
- if (data->ioc_plen1 > PAGE_
CACHE_
SIZE)
+ if (data->ioc_plen1 > PAGE_SIZE)
return -EINVAL;
LIBCFS_ALLOC(buf, data->ioc_plen1);
return -EINVAL;
LIBCFS_ALLOC(buf, data->ioc_plen1);
@@
-838,7
+834,7
@@
lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr)
mutex_lock(&console_session.ses_mutex);
mutex_lock(&console_session.ses_mutex);
- console_session.ses_laststamp =
cfs_time_current_sec
();
+ console_session.ses_laststamp =
ktime_get_real_seconds
();
if (console_session.ses_shutdown) {
rc = -ESHUTDOWN;
if (console_session.ses_shutdown) {
rc = -ESHUTDOWN;
@@
-855,69
+851,69
@@
lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr)
goto out;
}
goto out;
}
- memset(&console_session.ses_trans_stat, 0, sizeof(
lstcon_trans_stat_
t));
+ memset(&console_session.ses_trans_stat, 0, sizeof(
struct lstcon_trans_sta
t));
switch (opc) {
case LSTIO_SESSION_NEW:
switch (opc) {
case LSTIO_SESSION_NEW:
- rc = lst_session_new_ioctl((
lstio_session_new_args_t
*)buf);
+ rc = lst_session_new_ioctl((
struct lstio_session_new_args
*)buf);
break;
case LSTIO_SESSION_END:
break;
case LSTIO_SESSION_END:
- rc = lst_session_end_ioctl((
lstio_session_end_args_t
*)buf);
+ rc = lst_session_end_ioctl((
struct lstio_session_end_args
*)buf);
break;
case LSTIO_SESSION_INFO:
break;
case LSTIO_SESSION_INFO:
- rc = lst_session_info_ioctl((
lstio_session_info_args_t
*)buf);
+ rc = lst_session_info_ioctl((
struct lstio_session_info_args
*)buf);
break;
case LSTIO_DEBUG:
break;
case LSTIO_DEBUG:
- rc = lst_debug_ioctl((
lstio_debug_args_t
*)buf);
+ rc = lst_debug_ioctl((
struct lstio_debug_args
*)buf);
break;
case LSTIO_GROUP_ADD:
break;
case LSTIO_GROUP_ADD:
- rc = lst_group_add_ioctl((
lstio_group_add_args_t
*)buf);
+ rc = lst_group_add_ioctl((
struct lstio_group_add_args
*)buf);
break;
case LSTIO_GROUP_DEL:
break;
case LSTIO_GROUP_DEL:
- rc = lst_group_del_ioctl((
lstio_group_del_args_t
*)buf);
+ rc = lst_group_del_ioctl((
struct lstio_group_del_args
*)buf);
break;
case LSTIO_GROUP_UPDATE:
break;
case LSTIO_GROUP_UPDATE:
- rc = lst_group_update_ioctl((
lstio_group_update_args_t
*)buf);
+ rc = lst_group_update_ioctl((
struct lstio_group_update_args
*)buf);
break;
case LSTIO_NODES_ADD:
break;
case LSTIO_NODES_ADD:
- rc = lst_nodes_add_ioctl((
lstio_group_nodes_args_t
*)buf);
+ rc = lst_nodes_add_ioctl((
struct lstio_group_nodes_args
*)buf);
break;
case LSTIO_GROUP_LIST:
break;
case LSTIO_GROUP_LIST:
- rc = lst_group_list_ioctl((
lstio_group_list_args_t
*)buf);
+ rc = lst_group_list_ioctl((
struct lstio_group_list_args
*)buf);
break;
case LSTIO_GROUP_INFO:
break;
case LSTIO_GROUP_INFO:
- rc = lst_group_info_ioctl((
lstio_group_info_args_t
*)buf);
+ rc = lst_group_info_ioctl((
struct lstio_group_info_args
*)buf);
break;
case LSTIO_BATCH_ADD:
break;
case LSTIO_BATCH_ADD:
- rc = lst_batch_add_ioctl((
lstio_batch_add_args_t
*)buf);
+ rc = lst_batch_add_ioctl((
struct lstio_batch_add_args
*)buf);
break;
case LSTIO_BATCH_START:
break;
case LSTIO_BATCH_START:
- rc = lst_batch_run_ioctl((
lstio_batch_run_args_t
*)buf);
+ rc = lst_batch_run_ioctl((
struct lstio_batch_run_args
*)buf);
break;
case LSTIO_BATCH_STOP:
break;
case LSTIO_BATCH_STOP:
- rc = lst_batch_stop_ioctl((
lstio_batch_stop_args_t
*)buf);
+ rc = lst_batch_stop_ioctl((
struct lstio_batch_stop_args
*)buf);
break;
case LSTIO_BATCH_QUERY:
break;
case LSTIO_BATCH_QUERY:
- rc = lst_batch_query_ioctl((
lstio_batch_query_args_t
*)buf);
+ rc = lst_batch_query_ioctl((
struct lstio_batch_query_args
*)buf);
break;
case LSTIO_BATCH_LIST:
break;
case LSTIO_BATCH_LIST:
- rc = lst_batch_list_ioctl((
lstio_batch_list_args_t
*)buf);
+ rc = lst_batch_list_ioctl((
struct lstio_batch_list_args
*)buf);
break;
case LSTIO_BATCH_INFO:
break;
case LSTIO_BATCH_INFO:
- rc = lst_batch_info_ioctl((
lstio_batch_info_args_t
*)buf);
+ rc = lst_batch_info_ioctl((
struct lstio_batch_info_args
*)buf);
break;
case LSTIO_TEST_ADD:
break;
case LSTIO_TEST_ADD:
- rc = lst_test_add_ioctl((
lstio_test_args_t
*)buf);
+ rc = lst_test_add_ioctl((
struct lstio_test_args
*)buf);
break;
case LSTIO_STAT_QUERY:
break;
case LSTIO_STAT_QUERY:
- rc = lst_stat_query_ioctl((
lstio_stat_args_t
*)buf);
+ rc = lst_stat_query_ioctl((
struct lstio_stat_args
*)buf);
break;
default:
rc = -EINVAL;
}
if (copy_to_user(data->ioc_pbuf2, &console_session.ses_trans_stat,
break;
default:
rc = -EINVAL;
}
if (copy_to_user(data->ioc_pbuf2, &console_session.ses_trans_stat,
- sizeof(
lstcon_trans_stat_
t)))
+ sizeof(
struct lstcon_trans_sta
t)))
rc = -EFAULT;
out:
mutex_unlock(&console_session.ses_mutex);
rc = -EFAULT;
out:
mutex_unlock(&console_session.ses_mutex);
@@
-926,6
+922,3
@@
out:
return rc;
}
return rc;
}
-
-EXPORT_SYMBOL(lstcon_ioctl_entry);
-