[mythtv-commits] Ticket #12306: LiveTV recording hangs on btrfs filesystem
MythTV
noreply at mythtv.org
Fri Oct 24 13:50:12 UTC 2014
#12306: LiveTV recording hangs on btrfs filesystem
--------------------------------------+--------------------------
Reporter: cweemin@… | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: 0.27.4
Severity: medium | Keywords: livetv btrfs
Ticket locked: 0 |
--------------------------------------+--------------------------
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.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12306>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list