[PATCH] blk-mq: Return invalid cookie if bio was split

2016-09-26 Thread Keith Busch
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 remaini

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-09-27 Thread Ming Lei
On Mon, 26 Sep 2016 19:00:30 -0400 Keith Busch wrote: > 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

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-09-27 Thread Keith Busch
On Tue, Sep 27, 2016 at 05:25:36PM +0800, Ming Lei wrote: > On Mon, 26 Sep 2016 19:00:30 -0400 > Keith Busch wrote: > > > 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 reaso

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-10-03 Thread Keith Busch
On Tue, Sep 27, 2016 at 05:25:36PM +0800, Ming Lei wrote: > On Mon, 26 Sep 2016 19:00:30 -0400 > Keith Busch wrote: > > > 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 reaso

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-10-04 Thread Ming Lei
On Tue, Oct 4, 2016 at 6:00 AM, Keith Busch wrote: > On Tue, Sep 27, 2016 at 05:25:36PM +0800, Ming Lei wrote: >> On Mon, 26 Sep 2016 19:00:30 -0400 >> Keith Busch wrote: >> >> > The only user of polling requires its original request be completed in >> > its entirety before continuing execution.

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-10-05 Thread Keith Busch
On Wed, Oct 05, 2016 at 11:19:39AM +0800, Ming Lei wrote: > But .poll() need to check if the specific request is completed or not, > then blk_poll() can set 'current' as RUNNING if it is completed. > > blk_poll(): > ... > ret = q->mq_ops->poll(hctx, blk_qc_t_to_tag(

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-10-06 Thread Ming Lei
Hi Keith, On Thu, Oct 6, 2016 at 12:51 AM, Keith Busch wrote: > On Wed, Oct 05, 2016 at 11:19:39AM +0800, Ming Lei wrote: >> But .poll() need to check if the specific request is completed or not, >> then blk_poll() can set 'current' as RUNNING if it is completed. >> >> blk_poll(): >>

Re: [PATCH] blk-mq: Return invalid cookie if bio was split

2016-10-06 Thread Keith Busch
On Fri, Oct 07, 2016 at 12:06:27AM +0800, Ming Lei wrote: > Hi Keith, > > On Thu, Oct 6, 2016 at 12:51 AM, Keith Busch wrote: > > On Wed, Oct 05, 2016 at 11:19:39AM +0800, Ming Lei wrote: > >> But .poll() need to check if the specific request is completed or not, > >> then blk_poll() can set 'cur