Open the underlying file (or device) with O_NOCACHE. This works around a
potential page writer deadlock. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37587 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -311,7 +311,12 @@ struct RawDevice : Device, DoublyLinkedListLinkImpl<RawDevice> {
|
|||||||
status_t Init(const char* fileName)
|
status_t Init(const char* fileName)
|
||||||
{
|
{
|
||||||
// open and stat file
|
// open and stat file
|
||||||
fFD = open(fileName, O_RDWR);
|
fFD = open(fileName, O_RDWR | O_NOCACHE);
|
||||||
|
// TODO: The O_NOCACHE is a work-around for a page writer problem.
|
||||||
|
// Since it collects pages for writing back without regard for
|
||||||
|
// which caches and file systems they belong to, a deadlock can
|
||||||
|
// result when pages from both the underlying file system and the
|
||||||
|
// one using the checksum device are collected in one run.
|
||||||
if (fFD < 0)
|
if (fFD < 0)
|
||||||
return errno;
|
return errno;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user