Failing a bio right

From: Tomer Margalit
Date: Thu Jan 19 2012 - 11:04:42 EST


Hi All,

I have a make_request function that blocks writes (by using
wait_event_interruptible on some event).
I want the user to be able to stop the function if it takes too long
(that's the reason for the interruptible version).
So when the call is interrupted I call bio_endio with the EINTR error
to signal the interruption.
Usually this works fine, but after a lot of writes, the system says
"lost page write due to I/O error on device".
At this point the process hangs.

Is this the right way to do what I'm trying to do?

Thanks,
   Tomer
--
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/