Re: [PATCH] ext3 barrier bits

From: Jens Axboe
Date: Sat May 22 2004 - 03:43:18 EST


On Sat, May 22 2004, Andrew Morton wrote:
>
> May as well cc lkml on this. It's to do with the disk write barrier
> implementation.
>
>
> - How do I know that the barrier code is actually doing stuff? It doesn't
> seem to affect benchmarks much, if at all.

Usually not a lot of barriers would be generated. If you use reiser and
heavy fsync load, it should be pretty apparent of barriers are issued or
not (ie compare without barrier + wb cache, with barrier + wb cache, and
with/without - wb cache).

> - Does reiserfs support `mount -o remount,barrier=flush'? and "=none"?

Chris?

> - How do I test the "oh, barriers aren't working" fallback code in ext3?

A quick hack would be to replace 'err' with '1' in this line in
drivers/ide/ide-io.c:void ide_end_drive_cmd():

if (blk_barrier_preflush(rq) || blk_barrier_postflush(rq))
ide_complete_barrier(drive, rq, err);

that'll fail the first barrier, should trigger the fall back. Or just
try -o barrier=flush on a SCSI drive, should fail the barrier too.

> - Does the kernel tell you if your disk doesn't supoprt barriers? ie:
> how does the user know if it's working or not?

IDE will not tell you, the file system should flag the disabling of
barriers (like reiser currently does). Try SCSI case again.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/