[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/cman/qdisk disk.c main.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh 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;
 		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]