ide write barrier support
Quoted 6 lines · Jens
The problem is that as far as I can see the best way to make fsync really work is to make the last write a barrier write. That automagically gets everything right for you - when the last block goes to disk, you know the previous ones have already. And when the last block completes, you know the whole lot is on platter.
Are you sure?
What prevents the io scheduler from writing the last block before other blocks?
--
Manfred
Quoted 11 lines · Manfred Spraul
Quoted 6 lines · Jens
The problem is that as far as I can see the best way to make fsync really work is to make the last write a barrier write. That automagically gets everything right for you - when the last block goes to disk, you know the previous ones have already. And when the last block completes, you know the whole lot is on platter.
Are you sure?
What prevents the io scheduler from writing the last block before other blocks?
Very sure, the io scheduler will never put the barrier write before previously comitted writes. So yes, it will work as described.
Jens
Quoted 9 lines · Jens Axboe
Quoted 8 lines · Manfred Spraul
Quoted 6 lines · Jens
The problem is that as far as I can see the best way to make fsync really work is to make the last write a barrier write. That automagically gets everything right for you - when the last block goes to disk, you know the previous ones have already. And when the last block completes, you know the whole lot is on platter.
Quoted 6 lines
Quoted 3 lines
Are you sure?
What prevents the io scheduler from writing the last block before other blocks?Very sure, the io scheduler will never put the barrier write before previously comitted writes. So yes, it will work as described.
If the "last block" is special however (containing a "complete" marker for instance), the order needs to be:
write1 write2 write3 write4 barrier write-last barrier
This will guarantee write-last will happen after write4.
The drive is free to permute the order of write1 ... write4, no?
Manfred, was that your idea?
Signature · 3 lines
Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95