On Tue, Sep 27, 2016 at 05:25:36PM +0800, Ming Lei wrote:
On Mon, 26 Sep 2016 19:00:30 -0400
Keith Busch [off-list ref] wrote:
quoted
The only user of polling requires its original request be completed in
its entirety before continuing execution. If the bio needs to be split
and chained for any reason, the direct IO path would have waited for just
that split portion to complete, leading to potential data corruption if
the remaining transfer has not yet completed.
The issue looks a bit tricky because there is no per-bio place for holding
the cookie, and generic_make_request() only returns the cookie for the
last bio in the current bio list, so maybe we need the following patch too.
Also seems merge case need to take care of too.
Yah, I think you're right. I'll try to work out a test case that more
readily exposes the problem so I can better verify the fix.