Skip to contentSkip to conversation

Cluster Project branch, STABLE2, updated. cluster-2.03.01-12-g23d5682

Cluster-devel [email protected] 1 participant 1 message Apr 22, 2008

lore
Share & tools
lore
#0 lore raw

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=23d5682698c2de24f29037c3a8081740a0419668

The branch, STABLE2 has been updated

       via  23d5682698c2de24f29037c3a8081740a0419668 (commit)
       via  41a9904b9a2bcebc862cb55f3306df698431b8d1 (commit)
       via  83d29d3c08e13d5ae2649509cca388b2a2ca168a (commit)
       via  4e7f6c121a1cc1c40011aff6d885d6c396717072 (commit)
       via  ad7f3c12a864eacbb9c5f552a8d4870c8ccc59bd (commit)
       via  bd5b07b062cea5f29f92752df9afba5821b61b4f (commit)
       via  b8d8c52f46c8c81885b6a0db08e4f95dafbbc672 (commit)
       via  9baa0907064ec24cbc295f1180558bafd94ba56d (commit)
      from  f3b6ea990e81e9234903a7fb65565f7dd3d3d43f (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit 23d5682698c2de24f29037c3a8081740a0419668

Author: Fabio M. Di Nitto <[email protected]>
Date:   Tue Apr 22 20:34:16 2008 +0200

[MISC] Update Red Hat main copyright file

commit 41a9904b9a2bcebc862cb55f3306df698431b8d1

Author: Fabio M. Di Nitto <[email protected]>
Date:   Tue Apr 22 20:33:31 2008 +0200

[MISC] Update copyright headers

commit 83d29d3c08e13d5ae2649509cca388b2a2ca168a

Author: Fabio M. Di Nitto <[email protected]>
Date:   Fri Mar 28 06:39:45 2008 +0100

[CMAN] qdisk: add credits to Joel

commit 4e7f6c121a1cc1c40011aff6d885d6c396717072

Author: Lon Hohberger <[email protected]>
Date:   Mon Mar 24 11:41:00 2008 -0400

[cman/qdisk] Fix type pun errors in proc.c

commit ad7f3c12a864eacbb9c5f552a8d4870c8ccc59bd

Author: Fabio M. Di Nitto <[email protected]>
Date:   Fri Mar 21 05:05:43 2008 +0100

[CMAN] Drop dependency on libdevmapper

commit bd5b07b062cea5f29f92752df9afba5821b61b4f

Author: Lon Hohberger <[email protected]>
Date:   Thu Mar 20 16:42:09 2008 -0400

[cman] Make mkqdisk print all device paths

commit b8d8c52f46c8c81885b6a0db08e4f95dafbbc672

Author: Lon Hohberger <[email protected]>
Date:   Thu Mar 20 16:34:20 2008 -0400

[cman] Fix qdisk Makefile / disk_util merge bugs

commit 9baa0907064ec24cbc295f1180558bafd94ba56d

Author: Lon Hohberger <[email protected]>
Date:   Thu Mar 20 12:49:36 2008 -0400

[cman] Merge scandisk & fixes from RHEL5 branch

Scandisk replaces the old scanning of /proc/partitions with a flexible library created by Fabio M. Di Nitto

Fixes from the RHEL5 branch include:
* ability to use block devices with >512 byte sector size
* bug causing infinite "Node X is undead" messages

-----------------------------------------------------------------------

Summary of changes:

 cman/qdisk/Makefile    |    3 +-
 cman/qdisk/disk.c      |  207 ++++++++------
 cman/qdisk/disk.h      |   62 +++--
 cman/qdisk/disk_util.c |   21 +-
 cman/qdisk/main.c      |  157 ++++++-----
 cman/qdisk/mkqdisk.c   |   15 +-
 cman/qdisk/proc.c      |  267 +++++++++++++----
 cman/qdisk/scandisk.c  |  751 ++++++++++++++++++++++++++++++++++++++++++++++++
 cman/qdisk/scandisk.h  |  105 +++++++
 config/copyright.cf    |    4 +-
 10 files changed, 1323 insertions(+), 269 deletions(-)
 create mode 100644 cman/qdisk/scandisk.c
 create mode 100644 cman/qdisk/scandisk.h
cman/qdisk/Makefile +2 -1
index a6ab43f..4d3634d 100644
@@ -44,7 +44,8 @@ OBJS2=	mkqdisk.o
 SHAREDOBJS= disk.o \
 	    crc32.o \
 	    disk_util.o \
-	    proc.o
+	    proc.o \
+	    scandisk.o
 
 
 ${TARGET1}: ${SHAREDOBJS} ${OBJS1}
cman/qdisk/disk.c +115 -92

508 lines not on this page · raw message

cman/qdisk/disk.h +39 -23

136 lines not on this page · raw message

cman/qdisk/disk_util.c +11 -10
index eb5e6fa..f5539c0 100644
@@ -201,8 +201,9 @@ qd_write_status(qd_ctx *ctx, int nid, disk_node_state_t state,
 	if (get_time(&start, ctx->qc_flags&RF_UPTIME) < 0)
 		utime_ok = 0;
 	swab_status_block_t(&ps);
-	if (qdisk_write(ctx->qc_fd, qdisk_nodeid_offset(nid), &ps,
-			sizeof(ps)) < 0) {
+	if (qdisk_write(&ctx->qc_disk,
+			qdisk_nodeid_offset(nid, ctx->qc_disk.d_blksz),
+			&ps, sizeof(ps)) < 0) {
 		printf("Error writing node ID block %d\n", nid);
 		return -1;
 	}
@@ -223,12 +224,12 @@ qd_write_status(qd_ctx *ctx, int nid, disk_node_state_t state,
 
 
 int
-qd_print_status(status_block_t *ps)
+qd_print_status(target_info_t *disk, status_block_t *ps)
 {
 	int x;
 
 	printf("Data @ offset %d:\n",
-	       (int)qdisk_nodeid_offset(ps->ps_nodeid));
+	       (int)qdisk_nodeid_offset(ps->ps_nodeid, disk->d_blksz));
 	printf("status_block_t {\n");
 	printf("\t.ps_magic = %08x;\n", (int)ps->ps_magic);
 	printf("\t.ps_nodeid = %d;\n", (int)ps->ps_nodeid);
@@ -261,11 +262,11 @@ qd_print_status(status_block_t *ps)
 
 
 int
-qd_read_print_status(int fd, int nid)
+qd_read_print_status(target_info_t *disk, int nid)
 {
 	status_block_t ps;
 
-	if (fd < 0) {
+	if (!disk || disk->d_fd < 0) {
 		errno = EINVAL;
 		return -1;
 	}
@@ -275,13 +276,13 @@ qd_read_print_status(int fd, int nid)
 		return -1;
 	}
 
-	if (qdisk_read(fd, qdisk_nodeid_offset(nid), &ps,
+	if (qdisk_read(disk, qdisk_nodeid_offset(nid, disk->d_blksz), &ps,
 			sizeof(ps)) < 0) {
 		printf("Error reading node ID block %d\n", nid);
 		return -1;
 	}
 	swab_status_block_t(&ps);
-	qd_print_status(&ps);
+	qd_print_status(disk, &ps);
 
 	return 0;
 }
@@ -322,6 +323,7 @@ qd_init(qd_ctx *ctx, cman_handle_t ch, int me)
 	ctx->qc_incarnation = generate_token();
 	ctx->qc_ch = ch;
 	ctx->qc_my_id = me;
+	ctx->qc_status_sock = -1;
 
 	return 0;
 }
@@ -339,6 +341,5 @@ qd_destroy(qd_ctx *ctx)
 		free(ctx->qc_device);
 		ctx->qc_device = NULL;
 	}
-	close(ctx->qc_fd);
-	ctx->qc_fd = -1;
+	qdisk_close(&ctx->qc_disk);
 }
cman/qdisk/main.c +82 -75

316 lines not on this page · raw message

cman/qdisk/mkqdisk.c +8 -7
index fab5ea4..19cb5e2 100644
@@ -37,23 +37,24 @@ main(int argc, char **argv)
 {
 	char device[128];
 	char *newdev = NULL, *newlabel = NULL;
-	int rv;
+	int rv, verbose_level = 1;
 
 	printf("mkqdisk v" RELEASE_VERSION "\n\n");
 
-	while ((rv = getopt(argc, argv, "Lf:c:l:h")) != EOF) {
+	while ((rv = getopt(argc, argv, "Ldf:c:l:h")) != EOF) {
 		switch (rv) {
+		case 'd':
+			++verbose_level;
+			break;
 		case 'L':
 			/* List */
 			close(2);
-			return find_partitions("/dev",
-					       NULL, NULL, 0, 1);
+			return find_partitions(NULL, NULL, 0, verbose_level);
 			break;
 		case 'f':
 			close(2);
-			return find_partitions("/dev",
-					       optarg, device,
-					       sizeof(device), 1);
+			return find_partitions( optarg, device,
+					       sizeof(device), verbose_level);
 		case 'c':
 			newdev = optarg;
 			break;
cman/qdisk/proc.c +208 -59

311 lines not on this page · raw message

cman/qdisk/scandisk.c new file +751 -0

751 lines not on this page · raw message

cman/qdisk/scandisk.h new file +105 -0

105 lines not on this page · raw message

config/copyright.cf +2 -2
index 0ff3bab..54f1c33 100644
@@ -2,7 +2,7 @@
 *******************************************************************************
 **
 **  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
-**  Copyright (C) Red Hat, Inc. 2004-2007  All rights reserved.
+**  Copyright (C) Red Hat, Inc. 2004-2008  All rights reserved.
 **
 **  This copyrighted material is made available to anyone wishing to use,
 **  modify, copy, or redistribute it subject to the terms and conditions
@@ -14,7 +14,7 @@
 #ifndef __COPYRIGHT_DOT_CF__
 #define __COPYRIGHT_DOT_CF__
 
-#define REDHAT_COPYRIGHT ("Copyright (C) Red Hat, Inc.  2004-2007  All rights reserved.")
+#define REDHAT_COPYRIGHT ("Copyright (C) Red Hat, Inc.  2004-2008  All rights reserved.")
 
 #endif  /*  __COPYRIGHT_DOT_CF__  */
 

hooks/post-receive
--
Cluster Project