Пример #1
0
int
init_lnet(void)
{
        int                  rc;
        ENTRY;

        cfs_mutex_init(&lnet_config_mutex);

        rc = LNetInit();
        if (rc != 0) {
                CERROR("LNetInit: error %d\n", rc);
                RETURN(rc);
        }

        rc = libcfs_register_ioctl(&lnet_ioctl_handler);
        LASSERT (rc == 0);

        if (config_on_load) {
                /* Have to schedule a separate thread to avoid deadlocking
                 * in modload */
                (void) cfs_create_thread(lnet_configure, NULL, 0);
        }

        RETURN(0);
}
Пример #2
0
int init_lib_portals()
{
    int rc;
    ENTRY;

    rc = libcfs_debug_init(5 * 1024 * 1024);
    if (rc != 0) {
        CERROR("libcfs_debug_init() failed: %d\n", rc);
        RETURN (-ENXIO);
    }

    rc = LNetInit();
    if (rc != 0) {
        CERROR("LNetInit() failed: %d\n", rc);
        RETURN (-ENXIO);
    }
    RETURN(0);
}
Пример #3
0
int
init_lnet(void)
{
	int		  rc;

	mutex_init(&lnet_config_mutex);

	rc = LNetInit();
	if (rc != 0) {
		CERROR("LNetInit: error %d\n", rc);
		return rc;
	}

	rc = libcfs_register_ioctl(&lnet_ioctl_handler);
	LASSERT(rc == 0);

	if (config_on_load) {
		/* Have to schedule a separate thread to avoid deadlocking
		 * in modload */
		(void) kthread_run(lnet_configure, NULL, "lnet_initd");
	}

	return 0;
}