Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 148410 Details for
Bug 229338
qdisk no-heuristic mode does not work
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Makes it work
cman-229338.patch (text/plain), 2.69 KB, created by
Lon Hohberger
on 2007-02-20 14:13:57 UTC
(
hide
)
Description:
Makes it work
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-02-20 14:13:57 UTC
Size:
2.69 KB
patch
obsolete
>? cman-qdisk-update-3.patch >? make/.cvsignore >Index: man/qdiskd.8 >=================================================================== >RCS file: /cvs/cluster/cluster/cman/man/qdiskd.8,v >retrieving revision 1.1.2.1 >diff -u -r1.1.2.1 qdiskd.8 >--- man/qdiskd.8 21 Jul 2006 17:53:08 -0000 1.1.2.1 >+++ man/qdiskd.8 20 Feb 2007 14:13:27 -0000 >@@ -15,6 +15,11 @@ > Run in the foreground (do not fork / daemonize). > .IP "\-d" > Enable debug output. >+.IP "\-Q" >+Close stdin/out/err immediately before doing validations. This >+is primarily for use when being called from an init script. Using >+this option will output, rendering the -f and -d options more or less >+useless. > > .SH "SEE ALSO" > mkqdisk(8), qdisk(5), cman(5) >Index: qdisk/main.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/qdisk/main.c,v >retrieving revision 1.1.2.6 >diff -u -r1.1.2.6 main.c >--- qdisk/main.c 23 Jan 2007 17:57:07 -0000 1.1.2.6 >+++ qdisk/main.c 20 Feb 2007 14:13:28 -0000 >@@ -464,7 +464,12 @@ > return -1; > } > >- start_score_thread(ctx, h, maxh); >+ if (h && maxh) { >+ start_score_thread(ctx, h, maxh); >+ } else { >+ clulog(LOG_DEBUG, "Permanently setting score to 1/1\n"); >+ fudge_scoring(); >+ } > > node_info_init(ni, max); > if (qd_write_status(ctx, ctx->qc_my_id, >@@ -1274,7 +1279,7 @@ > main(int argc, char **argv) > { > cman_node_t me; >- int cfh, rv, forked = 0; >+ int cfh, rv, forked = 0, nfd = -1; > qd_ctx ctx; > cman_handle_t ch; > node_info_t ni[MAX_NODES_DISK]; >@@ -1288,7 +1293,7 @@ > return 0; > } > >- while ((rv = getopt(argc, argv, "fd")) != EOF) { >+ while ((rv = getopt(argc, argv, "fdQ")) != EOF) { > switch (rv) { > case 'd': > debug = 1; >@@ -1296,6 +1301,17 @@ > case 'f': > foreground = 1; > clu_log_console(1); >+ case 'Q': >+ /* Make qdisk very quiet */ >+ nfd = open("/dev/null", O_RDWR); >+ close(0); >+ close(1); >+ close(2); >+ dup2(nfd, 0); >+ dup2(nfd, 1); >+ dup2(nfd, 2); >+ close(nfd); >+ break; > default: > break; > } >Index: qdisk/score.c >=================================================================== >RCS file: /cvs/cluster/cluster/cman/qdisk/score.c,v >retrieving revision 1.1.2.2 >diff -u -r1.1.2.2 score.c >--- qdisk/score.c 22 Jan 2007 22:50:38 -0000 1.1.2.2 >+++ qdisk/score.c 20 Feb 2007 14:13:28 -0000 >@@ -143,6 +143,7 @@ > *score = 0; > *maxscore = 0; > >+ printf("max = %d\n", max); > /* Allow operation w/o any heuristics */ > if (!max) { > *score = *maxscore = 1; >@@ -332,6 +333,20 @@ > > > /** >+ Call this if no heuristics are set to run in master-wins mode >+ */ >+int >+fudge_scoring(void) >+{ >+ pthread_mutex_lock(&sc_lock); >+ _score = _maxscore = 1; >+ pthread_mutex_unlock(&sc_lock); >+ >+ return 0; >+} >+ >+ >+/** > Loop for the scoring thread. > */ > void *
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229338
:
148410
|
148531