]> git.hungrycats.org Git - linux/commit
[PATCH] fix the barrier IDE detection logic
authorAlan Cox <alan@redhat.com>
Fri, 3 Sep 2004 03:28:40 +0000 (20:28 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 3 Sep 2004 03:28:40 +0000 (20:28 -0700)
commit1afdb8bb8bbb73657369df799ba90697196837f4
tree00f8de56e8f343ba0ad99db9e4b363874ab5b530
parent157ac241676375244192a63a140a36a8b5198680
[PATCH] fix the barrier IDE detection logic

This fixes the logic so we always check for the cache.  It also defaults to
safer behaviour for the non cache flush case now we have the right bits in
the right places.  I've also played a bit with timings - the worst case
timings I can get for the flush are about 7 seconds (which I'd expect as
the engineering worst cases will include retries)

Probably what should happen is that the barrier logic is enabled providing
the wcache is disabled.  I've not meddled with this as I don't know what
the intended semantics and rules are for disabling barrier on a live disk
(eg when a user uses hdparm to turn on the write cache).  In the current
code as with Jens original that cannot occur.

I've also fixed the new printk's as per a private request from Matt Domsch.

Cc: Jens Axboe <axboe@suse.de>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ide/ide-disk.c