All of lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cman/qdisk disk.c main.c
Date: 4 Dec 2007 21:07:00 -0000	[thread overview]
Message-ID: <20071204210700.14366.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh at sourceware.org	2007-12-04 21:06:59

Modified files:
	cman/qdisk     : disk.c main.c 

Log message:
	Remove artificial label size limit

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.5&r2=1.1.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.9&r2=1.1.2.10

--- cluster/cman/qdisk/disk.c	2007/12/04 20:40:54	1.1.2.5
+++ cluster/cman/qdisk/disk.c	2007/12/04 21:06:58	1.1.2.6
@@ -225,13 +225,11 @@
 	if (disk->d_fd < 0)
 		return disk->d_fd;
 
-	disk->d_blksz = 512;
 	ret = ioctl(disk->d_fd, BLKSSZGET, &ssz);
-	if (ret < 0)
+	if (ret < 0) {
 		perror("qdisk_open: ioctl(BLKSSZGET)");
-	else
-		/* Sorry, no sector sizes >4GB please */
-		disk->d_blksz = (uint32_t)ssz;
+		return -1;
+	}
 
 	disk->d_pagesz = sysconf(_SC_PAGESIZE);
 
--- cluster/cman/qdisk/main.c	2007/12/04 20:40:54	1.1.2.9
+++ cluster/cman/qdisk/main.c	2007/12/04 21:06:58	1.1.2.10
@@ -470,20 +470,6 @@
 		return -1;
 	}
 
-	if (strlen(ctx->qc_device) > 15 && !(ctx->qc_flags & RF_CMAN_LABEL)) {
-		if (ctx->qc_label && strlen(ctx->qc_label) <= 15) {
-			ctx->qc_cman_label = strdup(ctx->qc_label);
-		} else {
-			snprintf(buf, sizeof(buf), "QDisk[%d]",
-			 	strlen(ctx->qc_device));
-			ctx->qc_cman_label = strdup(buf);
-		}
-
-		ctx->qc_flags |= RF_CMAN_LABEL;
-		clulog(LOG_DEBUG, "Device too long! Setting CMAN label to: %s\n",
-			ctx->qc_cman_label);
-	}
-
 	clulog(LOG_DEBUG, "I/O Size: %d  Page Size: %d\n",
 	       ctx->qc_disk.d_blksz, ctx->qc_disk.d_pagesz);
 	
@@ -1323,7 +1309,7 @@
 	/* Get cman_label */
 	snprintf(query, sizeof(query), "/cluster/quorumd/@cman_label");
 	if (ccs_get(ccsfd, query, &val) == 0) {
-		if (strlen(val) > 0 && strlen(val) <= 15) {
+		if (strlen(val) > 0) {
 			ctx->qc_flags |= RF_CMAN_LABEL;
 			ctx->qc_cman_label = val;
 		}



                 reply	other threads:[~2007-12-04 21:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20071204210700.14366.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.