Ticket #11061: 388-TFW_DontStopTrying.patch
File 388-TFW_DontStopTrying.patch, 3.3 KB (added by , 12 years ago) |
---|
-
mythtv/libs/libmythtv/ThreadedFileWriter.cpp
old new ThreadedFileWriter::ThreadedFileWriter(c --- Hunk 1 mythbuild/mythtv/libs/libmythtv/ThreadedFileWriter.cpp 63 63 mode(pmode), fd(-1), 64 64 // state 65 65 flush(false), in_dtor(false), 66 ignore_writes(false), tfw_min_write_size(kMinWriteSize), 66 ignore_writes(false), max_buffer_warned(false), 67 tfw_min_write_size(kMinWriteSize), 67 68 totalBufferUse(0), 68 69 // threads 69 70 writeThread(NULL), syncThread(NULL) … … bool ThreadedFileWriter::ReOpen(QString --- Hunk 2 mythbuild/mythtv/libs/libmythtv/ThreadedFileWriter.cpp 104 105 bool ThreadedFileWriter::Open(void) 105 106 { 106 107 ignore_writes = false; 108 max_buffer_warned = false; 107 109 108 110 if (filename == "-") 109 111 fd = fileno(stdout); … … uint ThreadedFileWriter::Write(const voi --- Hunk 3 mythbuild/mythtv/libs/libmythtv/ThreadedFileWriter.cpp 207 209 208 210 if (totalBufferUse + count > kMaxBufferSize) 209 211 { 210 LOG(VB_GENERAL, LOG_ERR, LOC + 211 "Maximum buffer size exceeded." 212 "\n\t\t\tfile will be truncated, no further writing " 213 "will be done." 214 "\n\t\t\tThis generally indicates your disk performance " 215 "\n\t\t\tis insufficient to deal with the number of on-going " 216 "\n\t\t\trecordings, or you have a disk failure."); 217 ignore_writes = true; 212 if (!max_buffer_warned) 213 LOG(VB_GENERAL, LOG_ERR, LOC + 214 QString("Maximum buffer size %1 exceeded." 215 "\n\t\t\tThis generally indicates your disk performance " 216 "\n\t\t\tis insufficient to deal with the number of on-going " 217 "\n\t\t\trecordings, or you have a disk failure.") 218 .arg(kMaxBufferSize)); 219 220 max_buffer_warned = true; 218 221 return count; 219 222 } 220 223 … … void ThreadedFileWriter::DiskLoop(void) --- Hunk 4 mythbuild/mythtv/libs/libmythtv/ThreadedFileWriter.cpp 488 491 489 492 locker.relock(); 490 493 491 if (!in_dtor) 494 if (!in_dtor && (tot < sz)) 495 { 496 LOG(VB_GENERAL, LOG_WARNING, LOC + QString("Wrote %1 of %2").arg(tot).arg(sz)); 492 497 bufferHasData.wait(locker.mutex(), 50); 498 } 493 499 } 494 500 495 501 ////////////////////////////////////////// -
mythtv/libs/libmythtv/ThreadedFileWriter.h
old new class ThreadedFileWriter --- Hunk 1 mythbuild/mythtv/libs/libmythtv/ThreadedFileWriter.h 72 72 bool flush; // protected by buflock 73 73 bool in_dtor; // protected by buflock 74 74 bool ignore_writes; // protected by buflock 75 bool max_buffer_warned; // protected by buflock 75 76 uint tfw_min_write_size; // protected by buflock 76 77 uint totalBufferUse; // protected by buflock 77 78