| .. | .. |
|---|
| 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 | * standalone DLM module |
|---|
| 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 | |
|---|
| .. | .. |
|---|
| 40 | 25 | #include <linux/delay.h> |
|---|
| 41 | 26 | |
|---|
| 42 | 27 | |
|---|
| 43 | | -#include "cluster/heartbeat.h" |
|---|
| 44 | | -#include "cluster/nodemanager.h" |
|---|
| 45 | | -#include "cluster/tcp.h" |
|---|
| 28 | +#include "../cluster/heartbeat.h" |
|---|
| 29 | +#include "../cluster/nodemanager.h" |
|---|
| 30 | +#include "../cluster/tcp.h" |
|---|
| 46 | 31 | |
|---|
| 47 | 32 | #include "dlmapi.h" |
|---|
| 48 | 33 | #include "dlmcommon.h" |
|---|
| .. | .. |
|---|
| 50 | 35 | #include "dlmdebug.h" |
|---|
| 51 | 36 | |
|---|
| 52 | 37 | #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_MASTER) |
|---|
| 53 | | -#include "cluster/masklog.h" |
|---|
| 38 | +#include "../cluster/masklog.h" |
|---|
| 54 | 39 | |
|---|
| 55 | 40 | static void dlm_mle_node_down(struct dlm_ctxt *dlm, |
|---|
| 56 | 41 | struct dlm_master_list_entry *mle, |
|---|
| .. | .. |
|---|
| 2176 | 2161 | * think that $RECOVERY is currently mastered by a dead node. If so, |
|---|
| 2177 | 2162 | * we wait a short time to allow that node to get notified by its own |
|---|
| 2178 | 2163 | * heartbeat stack, then check again. All $RECOVERY lock resources |
|---|
| 2179 | | - * mastered by dead nodes are purged when the hearbeat callback is |
|---|
| 2164 | + * mastered by dead nodes are purged when the heartbeat callback is |
|---|
| 2180 | 2165 | * fired, so we can know for sure that it is safe to continue once |
|---|
| 2181 | 2166 | * the node returns a live node or no node. */ |
|---|
| 2182 | 2167 | static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, |
|---|
| .. | .. |
|---|
| 2569 | 2554 | if (!dlm_grab(dlm)) |
|---|
| 2570 | 2555 | return -EINVAL; |
|---|
| 2571 | 2556 | |
|---|
| 2572 | | - BUG_ON(target == O2NM_MAX_NODES); |
|---|
| 2573 | | - |
|---|
| 2574 | 2557 | name = res->lockname.name; |
|---|
| 2575 | 2558 | namelen = res->lockname.len; |
|---|
| 2576 | 2559 | |
|---|
| .. | .. |
|---|
| 2766 | 2749 | return ret; |
|---|
| 2767 | 2750 | } |
|---|
| 2768 | 2751 | |
|---|
| 2769 | | -#define DLM_MIGRATION_RETRY_MS 100 |
|---|
| 2770 | | - |
|---|
| 2771 | 2752 | /* |
|---|
| 2772 | 2753 | * Should be called only after beginning the domain leave process. |
|---|
| 2773 | 2754 | * There should not be any remaining locks on nonlocal lock resources, |
|---|
| .. | .. |
|---|
| 2779 | 2760 | * Returns: 1 if dlm->spinlock was dropped/retaken, 0 if never dropped |
|---|
| 2780 | 2761 | */ |
|---|
| 2781 | 2762 | int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) |
|---|
| 2763 | + __must_hold(&dlm->spinlock) |
|---|
| 2782 | 2764 | { |
|---|
| 2783 | 2765 | int ret; |
|---|
| 2784 | 2766 | int lock_dropped = 0; |
|---|