| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* -*- mode: c; c-basic-offset: 8; -*- |
|---|
| 2 | 3 | * vim: noexpandtab sw=8 ts=8 sts=0: |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 6 | 7 | * defines domain join / leave apis |
|---|
| 7 | 8 | * |
|---|
| 8 | 9 | * Copyright (C) 2004 Oracle. All rights reserved. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or |
|---|
| 11 | | - * modify it under the terms of the GNU General Public |
|---|
| 12 | | - * License as published by the Free Software Foundation; either |
|---|
| 13 | | - * version 2 of the License, or (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 18 | | - * General Public License for more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * You should have received a copy of the GNU General Public |
|---|
| 21 | | - * License along with this program; if not, write to the |
|---|
| 22 | | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|---|
| 23 | | - * Boston, MA 021110-1307, USA. |
|---|
| 24 | | - * |
|---|
| 25 | 10 | */ |
|---|
| 26 | 11 | |
|---|
| 27 | 12 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 35 | 20 | #include <linux/debugfs.h> |
|---|
| 36 | 21 | #include <linux/sched/signal.h> |
|---|
| 37 | 22 | |
|---|
| 38 | | -#include "cluster/heartbeat.h" |
|---|
| 39 | | -#include "cluster/nodemanager.h" |
|---|
| 40 | | -#include "cluster/tcp.h" |
|---|
| 23 | +#include "../cluster/heartbeat.h" |
|---|
| 24 | +#include "../cluster/nodemanager.h" |
|---|
| 25 | +#include "../cluster/tcp.h" |
|---|
| 41 | 26 | |
|---|
| 42 | 27 | #include "dlmapi.h" |
|---|
| 43 | 28 | #include "dlmcommon.h" |
|---|
| .. | .. |
|---|
| 45 | 30 | #include "dlmdebug.h" |
|---|
| 46 | 31 | |
|---|
| 47 | 32 | #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_DOMAIN) |
|---|
| 48 | | -#include "cluster/masklog.h" |
|---|
| 33 | +#include "../cluster/masklog.h" |
|---|
| 49 | 34 | |
|---|
| 50 | 35 | /* |
|---|
| 51 | 36 | * ocfs2 node maps are array of long int, which limits to send them freely |
|---|
| .. | .. |
|---|
| 402 | 387 | static void dlm_complete_dlm_shutdown(struct dlm_ctxt *dlm) |
|---|
| 403 | 388 | { |
|---|
| 404 | 389 | dlm_unregister_domain_handlers(dlm); |
|---|
| 405 | | - dlm_debug_shutdown(dlm); |
|---|
| 406 | 390 | dlm_complete_thread(dlm); |
|---|
| 407 | 391 | dlm_complete_recovery_thread(dlm); |
|---|
| 408 | 392 | dlm_destroy_dlm_worker(dlm); |
|---|
| .. | .. |
|---|
| 1896 | 1880 | goto bail; |
|---|
| 1897 | 1881 | } |
|---|
| 1898 | 1882 | |
|---|
| 1899 | | - status = dlm_debug_init(dlm); |
|---|
| 1900 | | - if (status < 0) { |
|---|
| 1901 | | - mlog_errno(status); |
|---|
| 1902 | | - goto bail; |
|---|
| 1903 | | - } |
|---|
| 1883 | + dlm_debug_init(dlm); |
|---|
| 1904 | 1884 | |
|---|
| 1905 | 1885 | snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name); |
|---|
| 1906 | 1886 | dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM, 0); |
|---|
| .. | .. |
|---|
| 1957 | 1937 | |
|---|
| 1958 | 1938 | if (status) { |
|---|
| 1959 | 1939 | dlm_unregister_domain_handlers(dlm); |
|---|
| 1960 | | - dlm_debug_shutdown(dlm); |
|---|
| 1961 | 1940 | dlm_complete_thread(dlm); |
|---|
| 1962 | 1941 | dlm_complete_recovery_thread(dlm); |
|---|
| 1963 | 1942 | dlm_destroy_dlm_worker(dlm); |
|---|
| .. | .. |
|---|
| 2011 | 1990 | dlm->key = key; |
|---|
| 2012 | 1991 | dlm->node_num = o2nm_this_node(); |
|---|
| 2013 | 1992 | |
|---|
| 2014 | | - ret = dlm_create_debugfs_subroot(dlm); |
|---|
| 2015 | | - if (ret < 0) |
|---|
| 2016 | | - goto leave; |
|---|
| 1993 | + dlm_create_debugfs_subroot(dlm); |
|---|
| 2017 | 1994 | |
|---|
| 2018 | 1995 | spin_lock_init(&dlm->spinlock); |
|---|
| 2019 | 1996 | spin_lock_init(&dlm->master_lock); |
|---|
| .. | .. |
|---|
| 2075 | 2052 | mlog(0, "context init: refcount %u\n", |
|---|
| 2076 | 2053 | kref_read(&dlm->dlm_refs)); |
|---|
| 2077 | 2054 | |
|---|
| 2055 | + ret = 0; |
|---|
| 2078 | 2056 | leave: |
|---|
| 2079 | 2057 | if (ret < 0 && dlm) { |
|---|
| 2080 | 2058 | if (dlm->master_hash) |
|---|
| .. | .. |
|---|
| 2361 | 2339 | goto error; |
|---|
| 2362 | 2340 | } |
|---|
| 2363 | 2341 | |
|---|
| 2364 | | - status = dlm_create_debugfs_root(); |
|---|
| 2365 | | - if (status) |
|---|
| 2366 | | - goto error; |
|---|
| 2342 | + dlm_create_debugfs_root(); |
|---|
| 2367 | 2343 | |
|---|
| 2368 | 2344 | return 0; |
|---|
| 2369 | 2345 | error: |
|---|