[Top] [All Lists]

Re: IDE write cache and journaling file systems

To: Jim Buzbee <James.Buzbee@xxxxxxxxxxxx>, ak@xxxxxxx
Subject: Re: IDE write cache and journaling file systems
From: Steve Lord <lord@xxxxxxx>
Date: 18 Apr 2002 10:44:52 -0500
Cc: XFS List <linux-xfs@xxxxxxxxxxx>
In-reply-to: <3CBEE618.B220A393@echostar.com>
References: <3CBEE618.B220A393@echostar.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thu, 2002-04-18 at 10:28, Jim Buzbee wrote:
> We've got a bit of an issue. From conversations on this list over the
> last few months, it appears as if enabling the write cache on an IDE
> drive is a "bad thing" when using a journaling file system such as XFS. 
> But, when talking to drive manufacturers, we are told that if the write
> cache is disabled, the life of the drive is substantially reduced.  This
> puts us in a bit of a hard place. We have little choice but to turn the
> write cache on.  
> In our application, (consumer set top box) we cannot always cleanly shut
> down the system.  The consumer rightly expects to just unplug the box
> when he wants/needs to.  I'm not terribly concerned about losing a bit
> of data in such a case. I'm worried about file system corruption that
> would turn the box into an expensive door stop. My own testing so far
> has not shown any catastrophic failures, but if we have a million boxes
> in the field, issues could start showing up.
> The drive manufactures have recommended inserting IDE cache flushes at
> critical sections of the code. I'm hesitant to muck with XFS internals,
> and adding flushes in our user-space code would not cover all cases.
> This has to be a common problem.  Does anyone have any strategies or
> words of wisdom?
> Jim Buzbee,
> Echostar Technologies

Andi Kleen was experimenting with the ide cache flushing code in the
Suse kernel and adding some flushing calls to XFS. We talked about
the right place to add them, I am not sure if he has tried it yet.

The simplistic approach is to isolate log writes from other writes
and ensure they can never share the cache. This is not the optimal
approach, but should allow filesystem consistency to be maintained
while keeping the cache on.



Steve Lord                                      voice: +1-651-683-3511
Principal Engineer, Filesystem Software         email: lord@xxxxxxx

<Prev in Thread] Current Thread [Next in Thread>