Commit fbfaf03e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull dlm updates from David Teigland:

 - Remove some unused features (related to lock timeouts) that have been
   previously scheduled for removal

 - Fix a bug where the pending callback flag would be incorrectly
   cleared, which could potentially result in missing a completion
   callback

 - Use an unbound workqueue for dlm socket handling so that socket
   operations can be processed with less delay

 - Fix possible lockspace join connection errors with large clusters
   (e.g. over 16 nodes) caused by a small socket backlog setting

 - Use atomic bit ops for internal flags to help avoid mistakes copying
   flag values from messages

 - Fix recently introduced bug where memory for lvb data could be
   unnecessarily allocated for a lock

* tag 'dlm-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
  fs: dlm: stop unnecessarily filling zero ms_extra bytes
  fs: dlm: switch lkb_sbflags to atomic ops
  fs: dlm: rsb hash table flag value to atomic ops
  fs: dlm: move internal flags to atomic ops
  fs: dlm: change dflags to use atomic bits
  fs: dlm: store lkb distributed flags into own value
  fs: dlm: remove DLM_IFL_LOCAL_MS flag
  fs: dlm: rename stub to local message flag
  fs: dlm: remove deprecated code parts
  DLM: increase socket backlog to avoid hangs with 16 nodes
  fs: dlm: add unbound flag to dlm_io workqueue
  fs: dlm: fix DLM_IFL_CB_PENDING gets overwritten
parents e0fcc9c6 7a40f1f1
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -8,15 +8,6 @@ menuconfig DLM
	A general purpose distributed lock manager for kernel or userspace
	applications.

config DLM_DEPRECATED_API
	bool "DLM deprecated API"
	depends on DLM
	help
	Enables deprecated DLM timeout features that will be removed in
        later Linux kernel releases.

	If you are unsure, say N.

config DLM_DEBUG
	bool "DLM debugging"
	depends on DLM
+0 −1
Original line number Diff line number Diff line
@@ -17,6 +17,5 @@ dlm-y := ast.o \
				requestqueue.o \
				user.o \
				util.o 
dlm-$(CONFIG_DLM_DEPRECATED_API) +=	netlink.o
dlm-$(CONFIG_DLM_DEBUG) +=	debug_fs.o
+5 −6
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ void dlm_purge_lkb_callbacks(struct dlm_lkb *lkb)
		kref_put(&cb->ref, dlm_release_callback);
	}

	lkb->lkb_flags &= ~DLM_IFL_CB_PENDING;
	clear_bit(DLM_IFL_CB_PENDING_BIT, &lkb->lkb_iflags);

	/* invalidate */
	dlm_callback_set_last_ptr(&lkb->lkb_last_cast, NULL);
@@ -103,10 +103,9 @@ int dlm_enqueue_lkb_callback(struct dlm_lkb *lkb, uint32_t flags, int mode,
	cb->sb_status = status;
	cb->sb_flags = (sbflags & 0x000000FF);
	kref_init(&cb->ref);
	if (!(lkb->lkb_flags & DLM_IFL_CB_PENDING)) {
		lkb->lkb_flags |= DLM_IFL_CB_PENDING;
	if (!test_and_set_bit(DLM_IFL_CB_PENDING_BIT, &lkb->lkb_iflags))
		rv = DLM_ENQUEUE_CALLBACK_NEED_SCHED;
	}

	list_add_tail(&cb->list, &lkb->lkb_callbacks);

	if (flags & DLM_CB_CAST)
@@ -140,7 +139,7 @@ void dlm_add_cb(struct dlm_lkb *lkb, uint32_t flags, int mode, int status,
	struct dlm_ls *ls = lkb->lkb_resource->res_ls;
	int rv;

	if (lkb->lkb_flags & DLM_IFL_USER) {
	if (test_bit(DLM_DFL_USER_BIT, &lkb->lkb_dflags)) {
		dlm_user_add_ast(lkb, flags, mode, status, sbflags);
		return;
	}
@@ -209,7 +208,7 @@ void dlm_callback_work(struct work_struct *work)
		spin_lock(&lkb->lkb_cb_lock);
		rv = dlm_dequeue_lkb_callback(lkb, &cb);
		if (rv == DLM_DEQUEUE_CALLBACK_EMPTY) {
			lkb->lkb_flags &= ~DLM_IFL_CB_PENDING;
			clear_bit(DLM_IFL_CB_PENDING_BIT, &lkb->lkb_iflags);
			spin_unlock(&lkb->lkb_cb_lock);
			break;
		}
+0 −21
Original line number Diff line number Diff line
@@ -75,9 +75,6 @@ struct dlm_cluster {
	unsigned int cl_log_info;
	unsigned int cl_protocol;
	unsigned int cl_mark;
#ifdef CONFIG_DLM_DEPRECATED_API
	unsigned int cl_timewarn_cs;
#endif
	unsigned int cl_new_rsb_count;
	unsigned int cl_recover_callbacks;
	char cl_cluster_name[DLM_LOCKSPACE_LEN];
@@ -103,9 +100,6 @@ enum {
	CLUSTER_ATTR_LOG_INFO,
	CLUSTER_ATTR_PROTOCOL,
	CLUSTER_ATTR_MARK,
#ifdef CONFIG_DLM_DEPRECATED_API
	CLUSTER_ATTR_TIMEWARN_CS,
#endif
	CLUSTER_ATTR_NEW_RSB_COUNT,
	CLUSTER_ATTR_RECOVER_CALLBACKS,
	CLUSTER_ATTR_CLUSTER_NAME,
@@ -226,9 +220,6 @@ CLUSTER_ATTR(log_debug, NULL);
CLUSTER_ATTR(log_info, NULL);
CLUSTER_ATTR(protocol, dlm_check_protocol_and_dlm_running);
CLUSTER_ATTR(mark, NULL);
#ifdef CONFIG_DLM_DEPRECATED_API
CLUSTER_ATTR(timewarn_cs, dlm_check_zero);
#endif
CLUSTER_ATTR(new_rsb_count, NULL);
CLUSTER_ATTR(recover_callbacks, NULL);

@@ -243,9 +234,6 @@ static struct configfs_attribute *cluster_attrs[] = {
	[CLUSTER_ATTR_LOG_INFO] = &cluster_attr_log_info,
	[CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol,
	[CLUSTER_ATTR_MARK] = &cluster_attr_mark,
#ifdef CONFIG_DLM_DEPRECATED_API
	[CLUSTER_ATTR_TIMEWARN_CS] = &cluster_attr_timewarn_cs,
#endif
	[CLUSTER_ATTR_NEW_RSB_COUNT] = &cluster_attr_new_rsb_count,
	[CLUSTER_ATTR_RECOVER_CALLBACKS] = &cluster_attr_recover_callbacks,
	[CLUSTER_ATTR_CLUSTER_NAME] = &cluster_attr_cluster_name,
@@ -436,9 +424,6 @@ static struct config_group *make_cluster(struct config_group *g,
	cl->cl_log_debug = dlm_config.ci_log_debug;
	cl->cl_log_info = dlm_config.ci_log_info;
	cl->cl_protocol = dlm_config.ci_protocol;
#ifdef CONFIG_DLM_DEPRECATED_API
	cl->cl_timewarn_cs = dlm_config.ci_timewarn_cs;
#endif
	cl->cl_new_rsb_count = dlm_config.ci_new_rsb_count;
	cl->cl_recover_callbacks = dlm_config.ci_recover_callbacks;
	memcpy(cl->cl_cluster_name, dlm_config.ci_cluster_name,
@@ -959,9 +944,6 @@ int dlm_our_addr(struct sockaddr_storage *addr, int num)
#define DEFAULT_LOG_INFO           1
#define DEFAULT_PROTOCOL           DLM_PROTO_TCP
#define DEFAULT_MARK               0
#ifdef CONFIG_DLM_DEPRECATED_API
#define DEFAULT_TIMEWARN_CS      500 /* 5 sec = 500 centiseconds */
#endif
#define DEFAULT_NEW_RSB_COUNT    128
#define DEFAULT_RECOVER_CALLBACKS  0
#define DEFAULT_CLUSTER_NAME      ""
@@ -977,9 +959,6 @@ struct dlm_config_info dlm_config = {
	.ci_log_info = DEFAULT_LOG_INFO,
	.ci_protocol = DEFAULT_PROTOCOL,
	.ci_mark = DEFAULT_MARK,
#ifdef CONFIG_DLM_DEPRECATED_API
	.ci_timewarn_cs = DEFAULT_TIMEWARN_CS,
#endif
	.ci_new_rsb_count = DEFAULT_NEW_RSB_COUNT,
	.ci_recover_callbacks = DEFAULT_RECOVER_CALLBACKS,
	.ci_cluster_name = DEFAULT_CLUSTER_NAME
+0 −3
Original line number Diff line number Diff line
@@ -37,9 +37,6 @@ struct dlm_config_info {
	int ci_log_info;
	int ci_protocol;
	int ci_mark;
#ifdef CONFIG_DLM_DEPRECATED_API
	int ci_timewarn_cs;
#endif
	int ci_new_rsb_count;
	int ci_recover_callbacks;
	char ci_cluster_name[DLM_LOCKSPACE_LEN];
Loading