> Aidan Van Dyk <aidan@highrise.ca> writes:
>> One possibility would be to "double-buffer" the write... i.e. as you
>> calculate your CRC, you're doing it on a local copy of the block, which
>> you hand to the OS to write... If you're touching the whole block of
>> memory to CRC it, it isn't *ridiculously* more expensive to copy the
>> memory somewhere else as you do it...
>
> That actually seems like a really good idea. We don't have to increase
> the buffer locking requirements, or make much of any change at all in
> the existing logic. +1, especially if this is intended to be an
> optional feature (which I agree with).
>
I don't think it make sense at all!!!
If you are going to double buffer, one presumes that for some non-zero
period of time, the block must be locked during which it is copied. You
wouldn't want it changing "mid-copy" would you? How is this any less of a
hit than just calculating the checksum?