diff options
Diffstat (limited to 'fs/ocfs2/dlm')
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 44f87caf3683..92fd1d7d6126 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -2949,7 +2949,7 @@ static int dlm_do_migrate_request(struct dlm_ctxt *dlm, | |||
2949 | struct dlm_node_iter *iter) | 2949 | struct dlm_node_iter *iter) |
2950 | { | 2950 | { |
2951 | struct dlm_migrate_request migrate; | 2951 | struct dlm_migrate_request migrate; |
2952 | int ret, status = 0; | 2952 | int ret, skip, status = 0; |
2953 | int nodenum; | 2953 | int nodenum; |
2954 | 2954 | ||
2955 | memset(&migrate, 0, sizeof(migrate)); | 2955 | memset(&migrate, 0, sizeof(migrate)); |
@@ -2966,12 +2966,27 @@ static int dlm_do_migrate_request(struct dlm_ctxt *dlm, | |||
2966 | nodenum == new_master) | 2966 | nodenum == new_master) |
2967 | continue; | 2967 | continue; |
2968 | 2968 | ||
2969 | /* We could race exit domain. If exited, skip. */ | ||
2970 | spin_lock(&dlm->spinlock); | ||
2971 | skip = (!test_bit(nodenum, dlm->domain_map)); | ||
2972 | spin_unlock(&dlm->spinlock); | ||
2973 | if (skip) { | ||
2974 | clear_bit(nodenum, iter->node_map); | ||
2975 | continue; | ||
2976 | } | ||
2977 | |||
2969 | ret = o2net_send_message(DLM_MIGRATE_REQUEST_MSG, dlm->key, | 2978 | ret = o2net_send_message(DLM_MIGRATE_REQUEST_MSG, dlm->key, |
2970 | &migrate, sizeof(migrate), nodenum, | 2979 | &migrate, sizeof(migrate), nodenum, |
2971 | &status); | 2980 | &status); |
2972 | if (ret < 0) | 2981 | if (ret < 0) { |
2973 | mlog_errno(ret); | 2982 | mlog(0, "migrate_request returned %d!\n", ret); |
2974 | else if (status < 0) { | 2983 | if (!dlm_is_host_down(ret)) { |
2984 | mlog(ML_ERROR, "unhandled error=%d!\n", ret); | ||
2985 | BUG(); | ||
2986 | } | ||
2987 | clear_bit(nodenum, iter->node_map); | ||
2988 | ret = 0; | ||
2989 | } else if (status < 0) { | ||
2975 | mlog(0, "migrate request (node %u) returned %d!\n", | 2990 | mlog(0, "migrate request (node %u) returned %d!\n", |
2976 | nodenum, status); | 2991 | nodenum, status); |
2977 | ret = status; | 2992 | ret = status; |