FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 12-04-2007, 08:09 PM
 
Default cluster/cman/qdisk disk.c main.c mkqdisk.c

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: lhh@sourceware.org 2007-12-04 21:09:17

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

Log message:
Changes per fabbione's comments

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1 =1.4.4.2&r2=1.4.4.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1 =1.4.2.8&r2=1.4.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/mkqdisk.c.diff?cvsroot=cluster&only_with_tag=RHEL5 &r1=1.3.4.2&r2=1.3.4.3

--- cluster/cman/qdisk/disk.c 2007/12/04 20:24:43 1.4.4.2
+++ cluster/cman/qdisk/disk.c 2007/12/04 21:09:17 1.4.4.3
@@ -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:26:51 1.4.2.8
+++ cluster/cman/qdisk/main.c 2007/12/04 21:09:17 1.4.2.9
@@ -454,10 +454,6 @@
quorum_init(qd_ctx *ctx, node_info_t *ni, int max, struct h_data *h, int maxh)
{
int x = 0, score, maxscore, score_req;
- char buf[64];
-#if 0
- struct sockaddr_un sun;
-#endif

clulog(LOG_INFO, "Quorum Daemon Initializing
");

@@ -474,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]",
- (int)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
",
- ctx->qc_cman_label);
- }
-
clulog(LOG_DEBUG, "I/O Size: %d Page Size: %d
",
ctx->qc_disk.d_blksz, ctx->qc_disk.d_pagesz);

@@ -1301,7 +1283,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;
}
@@ -1406,9 +1388,6 @@
{
cman_node_t me;
int cfh, rv, forked = 0, nfd = -1, ret = -1;
-#if 0
- int status_run = 0;
-#endif
qd_ctx ctx;
cman_handle_t ch = NULL;
node_info_t ni[MAX_NODES_DISK];
@@ -1443,10 +1422,6 @@
dup2(nfd, 2);
close(nfd);
break;
-#if 0
- case 's':
- status_run = 1;
-#endif
default:
break;
}
--- cluster/cman/qdisk/mkqdisk.c 2007/12/04 20:24:43 1.3.4.2
+++ cluster/cman/qdisk/mkqdisk.c 2007/12/04 21:09:17 1.3.4.3
@@ -37,26 +37,26 @@
{
char device[128];
char *newdev = NULL, *newlabel = NULL;
- int rv, debug_level = 1;
+ int rv, verbose_level = 1;

printf("mkqdisk v0.5.2
");

while ((rv = getopt(argc, argv, "Ldf:c:l:h")) != EOF) {
switch (rv) {
case 'd':
- ++debug_level;
+ ++verbose_level;
break;
case 'L':
/* List */
close(2);
return find_partitions("/proc/partitions",
- NULL, NULL, 0, debug_level);
+ NULL, NULL, 0, verbose_level);
break;
case 'f':
close(2);
return find_partitions("/proc/partitions",
optarg, device,
- sizeof(device), debug_level);
+ sizeof(device), verbose_level);
case 'c':
newdev = optarg;
break;
 

Thread Tools




All times are GMT. The time now is 09:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org