-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
+// SPDX-License-Identifier: GPL-2.0
+
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2012, 2013, Intel Corporation.
*/
+
/*
* This file is part of Lustre, http://www.lustre.org/
*
- * lnet/selftest/console.h
- *
* kernel structure for LST console
*
* Author: Liang Zhen <liangzhen@clusterfs.com>
struct lstcon_session {
struct mutex ses_mutex; /* only 1 thread in session */
- struct lst_sid ses_id; /* global session id */
- int ses_key; /* local session key */
+ struct lst_session_id ses_id; /* global session id */
+ u32 ses_key; /* local session key */
int ses_state; /* state of session */
int ses_timeout; /* timeout in seconds */
time64_t ses_laststamp; /* last operation stamp (seconds) */
extern int lstcon_session_match(struct lst_sid sid);
extern int lstcon_session_new(char *name, int key, unsigned version,
- int timeout, int flags, struct lst_sid __user *sid_up);
-extern int lstcon_session_info(struct lst_sid __user *sid_up, int __user *key,
- unsigned __user *verp,
- struct lstcon_ndlist_ent __user *entp,
- char __user *name_up, int len);
+ int timeout, int flags);
extern int lstcon_session_end(void);
extern int lstcon_session_debug(int timeout,
struct list_head __user *result_up);
struct list_head __user *result_up);
extern int lstcon_group_add(char *name);
extern int lstcon_group_del(char *name);
+void lstcon_group_addref(struct lstcon_group *grp);
+void lstcon_group_decref(struct lstcon_group *grp);
+int lstcon_group_find(const char *name, struct lstcon_group **grpp);
extern int lstcon_group_clean(char *name, int args);
extern int lstcon_group_refresh(char *name, struct list_head __user *result_up);
extern int lstcon_nodes_add(char *name, int nnd,
extern int lstcon_group_info(char *name, struct lstcon_ndlist_ent __user *gent_up,
int *index_p, int *ndent_p,
struct lstcon_node_ent __user *ndents_up);
-extern int lstcon_group_list(int idx, int len, char __user *name_up);
extern int lstcon_batch_add(char *name);
extern int lstcon_batch_run(char *name, int timeout,
struct list_head __user *result_up);
int lstcon_ioctl_entry(struct notifier_block *nb,
unsigned long cmd, void *vdata);
+
int lstcon_console_init(void);
int lstcon_console_fini(void);
+int lstcon_init_netlink(void);
+void lstcon_fini_netlink(void);
+
#endif