217
218 FLUSH_DEBUGFILE();
219
220 if (master_err != MDMNE_ACK) {
221 (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC "
222 "fail on master when processing message type %d\n", type);
223 } else if (slave_result == NULL) {
224 (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC fail "
225 "on node %d when processing message type %d\n", nid, type);
226 } else {
227 (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: "
228 "Inconsistent return value from node %d when processing "
229 "message type %d. Master exitval = %d, "
230 "Slave exitval = %d\n", nid, type, master_exitval,
231 slave_result->mmr_exitval);
232 }
233 commd_err.size = strlen(msg_buf);
234 commd_err.md_message = (uint64_t)(uintptr_t)&msg_buf[0];
235
236 (void) metaioctl(MD_MN_COMMD_ERR, &commd_err, &mne, "rpc.mdcommd");
237 (void) uadmin(A_DUMP, AD_BOOT, NULL);
238 }
239
240 static void
241 flush_fcout()
242 {
243 struct statvfs64 vfsbuf;
244 long long avail_bytes;
245 int warned = 0;
246
247 for (; ; ) {
248 (void) sleep(10);
249 /* No output file, nothing to do */
250 if (commdout == (FILE *)NULL)
251 continue;
252
253 /*
254 * stat the appropriate filesystem to check for available space.
255 */
256 if (statvfs64(commdoutfile, &vfsbuf)) {
257 continue;
|
217
218 FLUSH_DEBUGFILE();
219
220 if (master_err != MDMNE_ACK) {
221 (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC "
222 "fail on master when processing message type %d\n", type);
223 } else if (slave_result == NULL) {
224 (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: RPC fail "
225 "on node %d when processing message type %d\n", nid, type);
226 } else {
227 (void) snprintf(msg_buf, MAXPATHLEN, "rpc.mdcommd: "
228 "Inconsistent return value from node %d when processing "
229 "message type %d. Master exitval = %d, "
230 "Slave exitval = %d\n", nid, type, master_exitval,
231 slave_result->mmr_exitval);
232 }
233 commd_err.size = strlen(msg_buf);
234 commd_err.md_message = (uint64_t)(uintptr_t)&msg_buf[0];
235
236 (void) metaioctl(MD_MN_COMMD_ERR, &commd_err, &mne, "rpc.mdcommd");
237 (void) uadmin(A_DUMP, AD_BOOT, (uintptr_t)NULL);
238 }
239
240 static void
241 flush_fcout()
242 {
243 struct statvfs64 vfsbuf;
244 long long avail_bytes;
245 int warned = 0;
246
247 for (; ; ) {
248 (void) sleep(10);
249 /* No output file, nothing to do */
250 if (commdout == (FILE *)NULL)
251 continue;
252
253 /*
254 * stat the appropriate filesystem to check for available space.
255 */
256 if (statvfs64(commdoutfile, &vfsbuf)) {
257 continue;
|