Opened 10 years ago
Closed 4 years ago
#12306 closed Bug Report - General (Unverified)
LiveTV recording hangs on btrfs filesystem
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - General | Version: | 0.27.4 |
Severity: | medium | Keywords: | livetv btrfs |
Cc: | Ticket locked: | no |
Description
This issue comes up when mythtv is recording into a Btrfs filesystem with a default mount option. The default option (commit) for btrfs is set to 30 seconds, and this will cause the backend to freeze intermittently if the write have not commit back to the device. This issue goes away if I change my mount to commit every second.
The fixes made for bug #12045 rely on a system fstat call to determine if EOF is reached. This works for system that commits to the device regularly, but it defeats the purpose of Linux's buffering / caching algorithm. The issue that Jean pointed out was because read() was blocking (hence timed-out) due to EOF. My suggestion is to open the file with O_NONBLOCK for both read/write.
I made my changes to fileringbuffer.cpp to open files with O_NONBLOCK mode and remove the fstat calls, that seems to fix my problem.
Attachments (1)
Change History (2)
Changed 10 years ago by
Attachment: | fileringbuffer.cpp.diff added |
---|
comment:1 Changed 4 years ago by
Resolution: | → Unverified |
---|---|
Status: | new → closed |
Closing all old tickets in trac.
If your issue still persists, please open an issue in Github https://github.com/MythTV/mythtv/issues
and reference the existing trac ticket.
Diff file