cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [DLM] rename dlm_config_info fields [18/54]
Date: Mon, 05 Feb 2007 14:23:26 +0000	[thread overview]
Message-ID: <1170685406.11001.306.camel@quoit.chygwyn.com> (raw)
In-Reply-To: <1170684425.11001.267.camel@quoit.chygwyn.com>

From 96eb818411ad5df07e221d854a55e833c92bc0d0 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Tue, 9 Jan 2007 09:41:48 -0600
Subject: [PATCH] [DLM] rename dlm_config_info fields

Add a "ci_" prefix to the fields in the dlm_config_info struct so that we
can use macros to add configfs functions to access them (in a later
patch).  No functional changes in this patch, just naming changes.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 8855305..958021f 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -777,13 +777,13 @@ int dlm_our_addr(struct sockaddr_storage *addr, int num)
 #define DEFAULT_SCAN_SECS          5
 
 struct dlm_config_info dlm_config = {
-	.tcp_port = DEFAULT_TCP_PORT,
-	.buffer_size = DEFAULT_BUFFER_SIZE,
-	.rsbtbl_size = DEFAULT_RSBTBL_SIZE,
-	.lkbtbl_size = DEFAULT_LKBTBL_SIZE,
-	.dirtbl_size = DEFAULT_DIRTBL_SIZE,
-	.recover_timer = DEFAULT_RECOVER_TIMER,
-	.toss_secs = DEFAULT_TOSS_SECS,
-	.scan_secs = DEFAULT_SCAN_SECS
+	.ci_tcp_port = DEFAULT_TCP_PORT,
+	.ci_buffer_size = DEFAULT_BUFFER_SIZE,
+	.ci_rsbtbl_size = DEFAULT_RSBTBL_SIZE,
+	.ci_lkbtbl_size = DEFAULT_LKBTBL_SIZE,
+	.ci_dirtbl_size = DEFAULT_DIRTBL_SIZE,
+	.ci_recover_timer = DEFAULT_RECOVER_TIMER,
+	.ci_toss_secs = DEFAULT_TOSS_SECS,
+	.ci_scan_secs = DEFAULT_SCAN_SECS
 };
 
diff --git a/fs/dlm/config.h b/fs/dlm/config.h
index 9da7839..ce603e1 100644
--- a/fs/dlm/config.h
+++ b/fs/dlm/config.h
@@ -17,14 +17,14 @@
 #define DLM_MAX_ADDR_COUNT 3
 
 struct dlm_config_info {
-	int tcp_port;
-	int buffer_size;
-	int rsbtbl_size;
-	int lkbtbl_size;
-	int dirtbl_size;
-	int recover_timer;
-	int toss_secs;
-	int scan_secs;
+	int ci_tcp_port;
+	int ci_buffer_size;
+	int ci_rsbtbl_size;
+	int ci_lkbtbl_size;
+	int ci_dirtbl_size;
+	int ci_recover_timer;
+	int ci_toss_secs;
+	int ci_scan_secs;
 };
 
 extern struct dlm_config_info dlm_config;
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index ed52485..5bac982 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -810,7 +810,7 @@ static int shrink_bucket(struct dlm_ls *ls, int b)
 		list_for_each_entry_reverse(r, &ls->ls_rsbtbl[b].toss,
 					    res_hashchain) {
 			if (!time_after_eq(jiffies, r->res_toss_time +
-					   dlm_config.toss_secs * HZ))
+					   dlm_config.ci_toss_secs * HZ))
 				continue;
 			found = 1;
 			break;
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 59012b0..f40817b 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -236,7 +236,7 @@ static int dlm_scand(void *data)
 	while (!kthread_should_stop()) {
 		list_for_each_entry(ls, &lslist, ls_list)
 			dlm_scan_rsbs(ls);
-		schedule_timeout_interruptible(dlm_config.scan_secs * HZ);
+		schedule_timeout_interruptible(dlm_config.ci_scan_secs * HZ);
 	}
 	return 0;
 }
@@ -422,7 +422,7 @@ static int new_lockspace(char *name, int namelen, void **lockspace,
 	ls->ls_count = 0;
 	ls->ls_flags = 0;
 
-	size = dlm_config.rsbtbl_size;
+	size = dlm_config.ci_rsbtbl_size;
 	ls->ls_rsbtbl_size = size;
 
 	ls->ls_rsbtbl = kmalloc(sizeof(struct dlm_rsbtable) * size, GFP_KERNEL);
@@ -434,7 +434,7 @@ static int new_lockspace(char *name, int namelen, void **lockspace,
 		rwlock_init(&ls->ls_rsbtbl[i].lock);
 	}
 
-	size = dlm_config.lkbtbl_size;
+	size = dlm_config.ci_lkbtbl_size;
 	ls->ls_lkbtbl_size = size;
 
 	ls->ls_lkbtbl = kmalloc(sizeof(struct dlm_lkbtable) * size, GFP_KERNEL);
@@ -446,7 +446,7 @@ static int new_lockspace(char *name, int namelen, void **lockspace,
 		ls->ls_lkbtbl[i].counter = 1;
 	}
 
-	size = dlm_config.dirtbl_size;
+	size = dlm_config.ci_dirtbl_size;
 	ls->ls_dirtbl_size = size;
 
 	ls->ls_dirtbl = kmalloc(sizeof(struct dlm_dirtable) * size, GFP_KERNEL);
@@ -489,7 +489,7 @@ static int new_lockspace(char *name, int namelen, void **lockspace,
 	mutex_init(&ls->ls_requestqueue_mutex);
 	mutex_init(&ls->ls_clear_proc_locks);
 
-	ls->ls_recover_buf = kmalloc(dlm_config.buffer_size, GFP_KERNEL);
+	ls->ls_recover_buf = kmalloc(dlm_config.ci_buffer_size, GFP_KERNEL);
 	if (!ls->ls_recover_buf)
 		goto out_dirfree;
 
diff --git a/fs/dlm/lowcomms-sctp.c b/fs/dlm/lowcomms-sctp.c
index 0940a80..5aeadad 100644
--- a/fs/dlm/lowcomms-sctp.c
+++ b/fs/dlm/lowcomms-sctp.c
@@ -635,7 +635,7 @@ static int add_bind_addr(struct sockaddr_storage *addr, int addr_len, int num)
 
 	if (result < 0)
 		log_print("Can't bind to port %d addr number %d",
-			  dlm_config.tcp_port, num);
+			  dlm_config.ci_tcp_port, num);
 
 	return result;
 }
@@ -711,7 +711,7 @@ static int init_sock(void)
 	/* Bind to all interfaces. */
 	for (i = 0; i < dlm_local_count; i++) {
 		memcpy(&localaddr, dlm_local_addr[i], sizeof(localaddr));
-		make_sockaddr(&localaddr, dlm_config.tcp_port, &addr_len);
+		make_sockaddr(&localaddr, dlm_config.ci_tcp_port, &addr_len);
 
 		result = add_bind_addr(&localaddr, addr_len, num);
 		if (result)
@@ -863,7 +863,7 @@ static void initiate_association(int nodeid)
 		return;
 	}
 
-	make_sockaddr(&rem_addr, dlm_config.tcp_port, &addrlen);
+	make_sockaddr(&rem_addr, dlm_config.ci_tcp_port, &addrlen);
 
 	outmessage.msg_name = &rem_addr;
 	outmessage.msg_namelen = addrlen;
diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c
index ce5e7cd..b4fb578 100644
--- a/fs/dlm/lowcomms-tcp.c
+++ b/fs/dlm/lowcomms-tcp.c
@@ -548,7 +548,7 @@ static void connect_to_sock(struct connection *con)
 	sock->sk->sk_user_data = con;
 	con->rx_action = receive_from_sock;
 
-	make_sockaddr(&saddr, dlm_config.tcp_port, &addr_len);
+	make_sockaddr(&saddr, dlm_config.ci_tcp_port, &addr_len);
 
 	add_sock(sock, con);
 
@@ -616,10 +616,10 @@ static struct socket *create_listen_sock(struct connection *con,
 	con->sock = sock;
 
 	/* Bind to our port */
-	make_sockaddr(saddr, dlm_config.tcp_port, &addr_len);
+	make_sockaddr(saddr, dlm_config.ci_tcp_port, &addr_len);
 	result = sock->ops->bind(sock, (struct sockaddr *) saddr, addr_len);
 	if (result < 0) {
-		printk("dlm: Can't bind to port %d\n", dlm_config.tcp_port);
+		printk("dlm: Can't bind to port %d\n", dlm_config.ci_tcp_port);
 		sock_release(sock);
 		sock = NULL;
 		con->sock = NULL;
@@ -638,7 +638,8 @@ static struct socket *create_listen_sock(struct connection *con,
 
 	result = sock->ops->listen(sock, 5);
 	if (result < 0) {
-		printk("dlm: Can't listen on port %d\n", dlm_config.tcp_port);
+		printk("dlm: Can't listen on port %d\n",
+		       dlm_config.ci_tcp_port);
 		sock_release(sock);
 		sock = NULL;
 		goto create_out;
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c
index c9b1c3d..a5126e0 100644
--- a/fs/dlm/midcomms.c
+++ b/fs/dlm/midcomms.c
@@ -82,7 +82,7 @@ int dlm_process_incoming_buffer(int nodeid, const void *base,
 		if (msglen < sizeof(struct dlm_header))
 			break;
 		err = -E2BIG;
-		if (msglen > dlm_config.buffer_size) {
+		if (msglen > dlm_config.ci_buffer_size) {
 			log_print("message size %d from %d too big, buf len %d",
 				  msglen, nodeid, len);
 			break;
@@ -103,7 +103,7 @@ int dlm_process_incoming_buffer(int nodeid, const void *base,
 
 		if (msglen > sizeof(__tmp) &&
 		    msg == (struct dlm_header *) __tmp) {
-			msg = kmalloc(dlm_config.buffer_size, GFP_KERNEL);
+			msg = kmalloc(dlm_config.ci_buffer_size, GFP_KERNEL);
 			if (msg == NULL)
 				return ret;
 		}
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index 2e246af..6bfbd61 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -138,7 +138,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid)
 		goto out;
 
 	allow_sync_reply(ls, &rc->rc_id);
-	memset(ls->ls_recover_buf, 0, dlm_config.buffer_size);
+	memset(ls->ls_recover_buf, 0, dlm_config.ci_buffer_size);
 
 	send_rcom(ls, mh, rc);
 
@@ -213,7 +213,7 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len)
 	if (nodeid == dlm_our_nodeid()) {
 		dlm_copy_master_names(ls, last_name, last_len,
 		                      ls->ls_recover_buf + len,
-		                      dlm_config.buffer_size - len, nodeid);
+		                      dlm_config.ci_buffer_size - len, nodeid);
 		goto out;
 	}
 
@@ -223,7 +223,7 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len)
 	memcpy(rc->rc_buf, last_name, last_len);
 
 	allow_sync_reply(ls, &rc->rc_id);
-	memset(ls->ls_recover_buf, 0, dlm_config.buffer_size);
+	memset(ls->ls_recover_buf, 0, dlm_config.ci_buffer_size);
 
 	send_rcom(ls, mh, rc);
 
@@ -241,7 +241,7 @@ static void receive_rcom_names(struct dlm_ls *ls, struct dlm_rcom *rc_in)
 
 	nodeid = rc_in->rc_header.h_nodeid;
 	inlen = rc_in->rc_header.h_length - sizeof(struct dlm_rcom);
-	outlen = dlm_config.buffer_size - sizeof(struct dlm_rcom);
+	outlen = dlm_config.ci_buffer_size - sizeof(struct dlm_rcom);
 
 	error = create_rcom(ls, nodeid, DLM_RCOM_NAMES_REPLY, outlen, &rc, &mh);
 	if (error)
diff --git a/fs/dlm/recover.c b/fs/dlm/recover.c
index cf9f683..a7fa4cb 100644
--- a/fs/dlm/recover.c
+++ b/fs/dlm/recover.c
@@ -44,7 +44,7 @@
 static void dlm_wait_timer_fn(unsigned long data)
 {
 	struct dlm_ls *ls = (struct dlm_ls *) data;
-	mod_timer(&ls->ls_timer, jiffies + (dlm_config.recover_timer * HZ));
+	mod_timer(&ls->ls_timer, jiffies + (dlm_config.ci_recover_timer * HZ));
 	wake_up(&ls->ls_wait_general);
 }
 
@@ -55,7 +55,7 @@ int dlm_wait_function(struct dlm_ls *ls, int (*testfn) (struct dlm_ls *ls))
 	init_timer(&ls->ls_timer);
 	ls->ls_timer.function = dlm_wait_timer_fn;
 	ls->ls_timer.data = (long) ls;
-	ls->ls_timer.expires = jiffies + (dlm_config.recover_timer * HZ);
+	ls->ls_timer.expires = jiffies + (dlm_config.ci_recover_timer * HZ);
 	add_timer(&ls->ls_timer);
 
 	wait_event(ls->ls_wait_general, testfn(ls) || dlm_recovery_stopped(ls));
-- 
1.4.4.2





  parent reply	other threads:[~2007-02-05 14:23 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05 14:07 [Cluster-devel] [GFS2 & DLM] Proposed patches for 2.6.20 merge window [0/54] Steven Whitehouse
2007-02-05 14:09 ` [Cluster-devel] [GFS2] don't try to lockfs after shutdown [1/54] Steven Whitehouse
2007-02-05 14:09 ` [Cluster-devel] [DLM] fix resend rcom lock [2/54] Steven Whitehouse
2007-02-05 14:10 ` [Cluster-devel] [DLM] fix old rcom messages [3/54] Steven Whitehouse
2007-02-05 14:11 ` [Cluster-devel] [DLM] add version check [4/54] Steven Whitehouse
2007-02-05 14:12 ` [Cluster-devel] [DLM] fix send_args() lvb copying [5/54] Steven Whitehouse
2007-02-05 14:13 ` [Cluster-devel] [DLM] fix receive_request() lvb copying [6/54] Steven Whitehouse
2007-02-05 14:14 ` [Cluster-devel] [DLM] fix lost flags in stub replies Steven Whitehouse
2007-02-05 14:15 ` [Cluster-devel] [DLM] fs/dlm/lowcomms-tcp.c: remove 2 functions [8/54] Steven Whitehouse
2007-02-05 14:16 ` [Cluster-devel] [GFS2] Fix DIO deadlock [9/54] Steven Whitehouse
2007-02-05 14:17 ` [Cluster-devel] [GFS2] Fail over to readpage for stuffed files [10/54] Steven Whitehouse
2007-02-05 14:18 ` [Cluster-devel] [GFS2] Fix change nlink deadlock [11/54] Steven Whitehouse
2007-02-05 14:19 ` [Cluster-devel] [DLM] Fix schedule() calls [12/54] Steven Whitehouse
2007-02-05 14:19 ` [Cluster-devel] [DLM] Fix spin lock already unlocked bug [13/54] Steven Whitehouse
2007-02-05 14:20 ` [Cluster-devel] [GFS2] Fix ordering of page disposal vs. glock_dq [14/54] Steven Whitehouse
2007-02-05 14:21 ` [Cluster-devel] [GFS2] BZ 217008 fsfuzzer fix [15/54] Steven Whitehouse
2007-02-05 14:22 ` [Cluster-devel] [GFS2] Fix gfs2_rename deadlock [16/54] Steven Whitehouse
2007-02-05 14:22 ` [Cluster-devel] [DLM] change some log_error to log_debug [17/54] Steven Whitehouse
2007-02-05 14:23 ` Steven Whitehouse [this message]
2007-02-05 14:24 ` [Cluster-devel] [DLM] add config entry to enable log_debug [16/54] Steven Whitehouse
2007-02-05 14:25 ` [Cluster-devel] [DLM] expose dlm_config_info fields in configfs [20/54] Steven Whitehouse
2007-02-05 14:26 ` [Cluster-devel] [GFS2] gfs2 knows of directories which it chooses not to display [21/54] Steven Whitehouse
2007-02-05 14:27 ` [Cluster-devel] [GFS2] make gfs2_change_nlink_i() static [22/54] Steven Whitehouse
2007-02-05 14:28 ` [Cluster-devel] [DLM] Use workqueues for dlm lowcomms [23/54] Steven Whitehouse
2007-02-05 14:29 ` [Cluster-devel] [DLM] fix user unlocking [24/54] Steven Whitehouse
2007-02-05 14:29 ` [Cluster-devel] [DLM] fix master recovery [25/54] Steven Whitehouse
2007-02-05 14:30 ` [Cluster-devel] [GFS2] Add writepages for "data=writeback" mounts [26/54] Steven Whitehouse
2007-02-05 14:31 ` [Cluster-devel] [GFS2] Clean up/speed up readdir [27/54] Steven Whitehouse
2007-02-05 14:31 ` [Cluster-devel] [GFS2] Remove max_atomic_write tunable [28/54] Steven Whitehouse
2007-02-05 14:32 ` [Cluster-devel] [GFS2] Shrink gfs2_inode memory by half [29/54] Steven Whitehouse
2007-02-05 14:33 ` [Cluster-devel] [GFS2] Remove the "greedy" function from glock.[ch] [30/54] Steven Whitehouse
2007-02-05 14:34 ` [Cluster-devel] [GFS2] Remove unused go_callback operation [31/54] Steven Whitehouse
2007-02-05 14:34 ` [Cluster-devel] [GFS2] Remove local exclusive glock mode [32/54] Steven Whitehouse
2007-02-05 14:35 ` [Cluster-devel] [DLM] lowcomms tidy [33/54] Steven Whitehouse
2007-02-05 14:35 ` [Cluster-devel] [GFS2] Tidy up glops calls [34/54] Steven Whitehouse
2007-02-05 14:36 ` [Cluster-devel] [DLM] fix lowcomms receiving [35/54] Steven Whitehouse
2007-02-05 14:37 ` [Cluster-devel] [GFS2] Remove queue_empty() function [36/54] Steven Whitehouse
2007-02-05 14:37 ` [Cluster-devel] [GFS2] Compile fix for glock.c [37/54] Steven Whitehouse
2007-02-05 14:38 ` [Cluster-devel] [GFS2] use CURRENT_TIME_SEC instead of get_seconds in gfs2 [38/54] Steven Whitehouse
2007-02-05 14:39 ` [Cluster-devel] [GFS2] Fix typo in glock.c [39/54] Steven Whitehouse
2007-02-05 14:40 ` [Cluster-devel] [DLM] Make sock_sem into a mutex [40/54] Steven Whitehouse
2007-02-05 14:40 ` [Cluster-devel] [DLM] saved dlm message can be dropped [41/54] Steven Whitehouse
2007-02-05 14:41 ` [Cluster-devel] [DLM] can miss clearing resend flag Steven Whitehouse
2007-02-05 14:41 ` [Cluster-devel] [GFS2] Fix recursive locking attempt with NFS [43/54] Steven Whitehouse
2007-02-05 14:42 ` [Cluster-devel] [GFS2] Fix list corruption in lops.c [44/54] Steven Whitehouse
2007-02-05 14:43 ` [Cluster-devel] [GFS2] increase default lock limit [45/54] Steven Whitehouse
2007-02-05 14:44 ` [Cluster-devel] [GFS2] make lock_dlm drop_count tunable in sysfs [46/54] Steven Whitehouse
2007-02-05 14:44 ` [Cluster-devel] [GFS2/DLM] use sysfs Steven Whitehouse
2007-02-05 14:45 ` [Cluster-devel] [GFS2/DLM] fix GFS2 circular dependency [48/54] Steven Whitehouse
2007-02-05 14:46 ` [Cluster-devel] [GFS2] more CURRENT_TIME_SEC [49/54] Steven Whitehouse
2007-02-05 14:47 ` [Cluster-devel] [GFS2] Put back semaphore to avoid umount proble Steven Whitehouse
2007-02-05 14:47 ` [Cluster-devel] [GFS2] Fix unlink deadlocks [51/54] Steven Whitehouse
2007-02-05 14:48 ` [Cluster-devel] [DLM/GFS2] indent help text [52/54] Steven Whitehouse
2007-02-05 14:49 ` [Cluster-devel] [DLM] zero new user lvbs [53/54] Steven Whitehouse
2007-02-05 14:50 ` [Cluster-devel] [DLM] fix softlockup in dlm_recv [54/54] Steven Whitehouse
2007-02-07 13:20 ` [Cluster-devel] [GFS2 & DLM] Pull request Steven Whitehouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1170685406.11001.306.camel@quoit.chygwyn.com \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).