Ticket #6359: disk-full.diff
File disk-full.diff, 2.6 KB (added by , 15 years ago) |
---|
-
libs/libmythtv/ThreadedFileWriter.cpp
68 68 VERBOSE(VB_IMPORTANT, LOC + "safe_write(): Got EAGAIN."); 69 69 continue; 70 70 } 71 71 if (errno == ENOSPC) 72 { 73 VERBOSE(VB_IMPORTANT, LOC + "safe_write(): Got ENOSPC (No space left on device)."); 74 errcnt = 10; 75 tot = 0; 76 break; 77 } 72 78 errcnt++; 73 79 VERBOSE(VB_IMPORTANT, LOC_ERR + "safe_write(): File I/O " + 74 QString(" errcnt: %1").arg(errcnt) + ENO );80 QString(" errcnt: %1").arg(errcnt) + ENO + QString(" errno: %1").arg(errno)); 75 81 76 82 if (errcnt == 3) 77 83 break; … … 389 395 size = safe_write(fd, buf+rpos, size, write_ok); 390 396 } 391 397 392 393 if (!ignore_writes && !write_ok && (EFBIG == errno)) 398 if (!ignore_writes && !write_ok && ((EFBIG == errno) || (ENOSPC == errno))) 394 399 { 395 QString msg = 396 "Maximum file size exceeded by '%1'" 397 "\n\t\t\t" 398 "You must either change the process ulimits, configure" 399 "\n\t\t\t" 400 "your operating system with \"Large File\" support, or use" 401 "\n\t\t\t" 402 "a filesystem which supports 64-bit or 128-bit files." 403 "\n\t\t\t" 404 "HINT: FAT32 is a 32-bit filesystem."; 400 QString msg; 401 switch (errno) 402 { 403 case EFBIG: 404 msg = 405 "Maximum file size exceeded by '%1'" 406 "\n\t\t\t" 407 "You must either change the process ulimits, configure" 408 "\n\t\t\t" 409 "your operating system with \"Large File\" support, or use" 410 "\n\t\t\t" 411 "a filesystem which supports 64-bit or 128-bit files." 412 "\n\t\t\t" 413 "HINT: FAT32 is a 32-bit filesystem."; 414 break; 415 case ENOSPC: 416 msg = 417 "No space left on the device for file '%1'" 418 "\n\t\t\t" 419 "file will be truncate, no further write will be done."; 420 break; 421 } 405 422 406 423 VERBOSE(VB_IMPORTANT, msg.arg(filename)); 407 424 ignore_writes = true;