struct completion completion;
struct dlm_lock_resource *sb_lock;
struct mutex sb_mutex;
+ struct dlm_lock_resource *bitmap_lockres;
};
static void sync_ast(void *arg)
ret = -ENOMEM;
goto err;
}
+
+ pr_info("md-cluster: Joined cluster %s slot %d\n", str, cinfo->slot_number);
+ snprintf(str, 64, "bitmap%04d", cinfo->slot_number - 1);
+ cinfo->bitmap_lockres = lockres_init(mddev, str, NULL, 1);
+ if (!cinfo->bitmap_lockres)
+ goto err;
+ if (dlm_lock_sync(cinfo->bitmap_lockres, DLM_LOCK_PW)) {
+ pr_err("Failed to get bitmap lock\n");
+ ret = -EINVAL;
+ goto err;
+ }
+
return 0;
err:
if (cinfo->lockspace)
if (!cinfo)
return 0;
lockres_free(cinfo->sb_lock);
+ lockres_free(cinfo->bitmap_lockres);
dlm_release_lockspace(cinfo->lockspace, 2);
return 0;
}