On Tue, Feb 01, 2011 at 09:47:15AM +0100, Corinna Vinschen wrote:
>On Jan 31 20:44, Christian Franke wrote:
>> If used on raw devices like /dev/sda fsync() always fails with
>> EBADRQC (54) because FlushFileBuffers() always fails with
>> ERROR_INVALID_FUNCTION (1).
>> 
>> The attached patch fixes this by simply ignoring this error in the
>> fhandler_base implementation. This should not affect any real flush
>> errors which likely would return other error codes.
>> 
>> An alternative approach would be to ignore the error only in a new
>> fhandler_raw_dev/floppy::fsync(). IMO not worth the effort is this
>> case.
>
>I agree.  I applied the patch.

Shouldn't this patch be a little more robust and check that you're getting
ERROR_INVALID_FUNCTION only for raw devices?

cgf

Reply via email to