* [PATCH 20/30] blk_end_request: changing xsysace (take 4) @ 2007-12-11 22:49 Kiyoshi Ueda 2007-12-11 22:59 ` Grant Likely 2007-12-12 9:09 ` Boaz Harrosh 0 siblings, 2 replies; 5+ messages in thread From: Kiyoshi Ueda @ 2007-12-11 22:49 UTC (permalink / raw) To: jens.axboe Cc: linux-kernel, linux-scsi, linux-ide, dm-devel, j-nomura, k-ueda, grant.likely This patch converts xsysace to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. xsysace is a little bit different from "normal" drivers. xsysace driver has a state machine in it. It calls end_that_request_first() and end_that_request_last() from different states. (ACE_FSM_STATE_REQ_TRANSFER and ACE_FSM_STATE_REQ_COMPLETE, respectively.) However, those states are consecutive and without any interruption inbetween. So we can just follow the standard conversion rule (b) mentioned in the patch subject "[PATCH 01/30] blk_end_request: add new request completion interface". Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> --- drivers/block/xsysace.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: 2.6.24-rc4/drivers/block/xsysace.c =================================================================== --- 2.6.24-rc4.orig/drivers/block/xsysace.c +++ 2.6.24-rc4/drivers/block/xsysace.c @@ -703,7 +703,7 @@ static void ace_fsm_dostate(struct ace_d /* bio finished; is there another one? */ i = ace->req->current_nr_sectors; - if (end_that_request_first(ace->req, 1, i)) { + if (__blk_end_request(ace->req, 0, i)) { /* dev_dbg(ace->dev, "next block; h=%li c=%i\n", * ace->req->hard_nr_sectors, * ace->req->current_nr_sectors); @@ -718,9 +718,6 @@ static void ace_fsm_dostate(struct ace_d break; case ACE_FSM_STATE_REQ_COMPLETE: - /* Complete the block request */ - blkdev_dequeue_request(ace->req); - end_that_request_last(ace->req, 1); ace->req = NULL; /* Finished request; go to idle state */ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 20/30] blk_end_request: changing xsysace (take 4) 2007-12-11 22:49 [PATCH 20/30] blk_end_request: changing xsysace (take 4) Kiyoshi Ueda @ 2007-12-11 22:59 ` Grant Likely 2007-12-12 9:09 ` Boaz Harrosh 1 sibling, 0 replies; 5+ messages in thread From: Grant Likely @ 2007-12-11 22:59 UTC (permalink / raw) To: Kiyoshi Ueda Cc: jens.axboe, linux-kernel, linux-scsi, linux-ide, dm-devel, j-nomura On 12/11/07, Kiyoshi Ueda <k-ueda@ct.jp.nec.com> wrote: > This patch converts xsysace to use blk_end_request interfaces. > Related 'uptodate' arguments are converted to 'error'. > > xsysace is a little bit different from "normal" drivers. > xsysace driver has a state machine in it. > It calls end_that_request_first() and end_that_request_last() > from different states. (ACE_FSM_STATE_REQ_TRANSFER and > ACE_FSM_STATE_REQ_COMPLETE, respectively.) > > However, those states are consecutive and without any interruption > inbetween. > So we can just follow the standard conversion rule (b) mentioned in > the patch subject "[PATCH 01/30] blk_end_request: add new request > completion interface". > > Cc: Grant Likely <grant.likely@secretlab.ca> > Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> > Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 20/30] blk_end_request: changing xsysace (take 4) 2007-12-11 22:49 [PATCH 20/30] blk_end_request: changing xsysace (take 4) Kiyoshi Ueda 2007-12-11 22:59 ` Grant Likely @ 2007-12-12 9:09 ` Boaz Harrosh 2007-12-12 17:06 ` Kiyoshi Ueda 1 sibling, 1 reply; 5+ messages in thread From: Boaz Harrosh @ 2007-12-12 9:09 UTC (permalink / raw) To: Kiyoshi Ueda Cc: jens.axboe, linux-kernel, linux-scsi, linux-ide, dm-devel, j-nomura, grant.likely Kiyoshi Ueda wrote: > This patch converts xsysace to use blk_end_request interfaces. > Related 'uptodate' arguments are converted to 'error'. > > xsysace is a little bit different from "normal" drivers. > xsysace driver has a state machine in it. > It calls end_that_request_first() and end_that_request_last() > from different states. (ACE_FSM_STATE_REQ_TRANSFER and > ACE_FSM_STATE_REQ_COMPLETE, respectively.) > > However, those states are consecutive and without any interruption > inbetween. > So we can just follow the standard conversion rule (b) mentioned in > the patch subject "[PATCH 01/30] blk_end_request: add new request > completion interface". > > Cc: Grant Likely <grant.likely@secretlab.ca> > Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> > Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> > --- > drivers/block/xsysace.c | 5 +---- > 1 files changed, 1 insertion(+), 4 deletions(-) > > Index: 2.6.24-rc4/drivers/block/xsysace.c > =================================================================== > --- 2.6.24-rc4.orig/drivers/block/xsysace.c > +++ 2.6.24-rc4/drivers/block/xsysace.c > @@ -703,7 +703,7 @@ static void ace_fsm_dostate(struct ace_d > > /* bio finished; is there another one? */ > i = ace->req->current_nr_sectors; > - if (end_that_request_first(ace->req, 1, i)) { > + if (__blk_end_request(ace->req, 0, i)) { end_that_request_first() took sectors __blk_end_request() now takes bytes > /* dev_dbg(ace->dev, "next block; h=%li c=%i\n", > * ace->req->hard_nr_sectors, > * ace->req->current_nr_sectors); > @@ -718,9 +718,6 @@ static void ace_fsm_dostate(struct ace_d > break; > > case ACE_FSM_STATE_REQ_COMPLETE: > - /* Complete the block request */ > - blkdev_dequeue_request(ace->req); > - end_that_request_last(ace->req, 1); > ace->req = NULL; > > /* Finished request; go to idle state */ > - > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Boaz ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 20/30] blk_end_request: changing xsysace (take 4) 2007-12-12 9:09 ` Boaz Harrosh @ 2007-12-12 17:06 ` Kiyoshi Ueda 2007-12-12 18:12 ` Boaz Harrosh 0 siblings, 1 reply; 5+ messages in thread From: Kiyoshi Ueda @ 2007-12-12 17:06 UTC (permalink / raw) To: jens.axboe, bharrosh Cc: linux-kernel, linux-scsi, linux-ide, dm-devel, j-nomura, k-ueda, grant.likely Hi, On Wed, 12 Dec 2007 11:09:12 +0200, Boaz Harrosh <bharrosh@panasas.com> wrote: > > Index: 2.6.24-rc4/drivers/block/xsysace.c > > =================================================================== > > --- 2.6.24-rc4.orig/drivers/block/xsysace.c > > +++ 2.6.24-rc4/drivers/block/xsysace.c > > @@ -703,7 +703,7 @@ static void ace_fsm_dostate(struct ace_d > > > > /* bio finished; is there another one? */ > > i = ace->req->current_nr_sectors; > > - if (end_that_request_first(ace->req, 1, i)) { > > + if (__blk_end_request(ace->req, 0, i)) { > > end_that_request_first() took sectors __blk_end_request() now takes > bytes Thank you for pointing it out! And I'm very sorry for the bug. I have checked all conversions between sectors and bytes through all patches again, and I found no other miss conversions. Below is the revised patch for xsysace. Thanks, Kiyoshi Ueda Subject: [PATCH 20/30] blk_end_request: changing xsysace (take 4) This patch converts xsysace to use blk_end_request interfaces. Related 'uptodate' arguments are converted to 'error'. xsysace is a little bit different from "normal" drivers. xsysace driver has a state machine in it. It calls end_that_request_first() and end_that_request_last() from different states. (ACE_FSM_STATE_REQ_TRANSFER and ACE_FSM_STATE_REQ_COMPLETE, respectively.) However, those states are consecutive and without any interruption inbetween. So we can just follow the standard conversion rule (b) mentioned in the patch subject "[PATCH 01/30] blk_end_request: add new request completion interface". In ace_fsm_dostate(), the variable 'i' was used only for passing sector size of the request to end_that_request_first(). So I removed it and changed the code to pass the size in bytes directly to __blk_end_request(). Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> --- drivers/block/xsysace.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) Index: 2.6.24-rc4/drivers/block/xsysace.c =================================================================== --- 2.6.24-rc4.orig/drivers/block/xsysace.c +++ 2.6.24-rc4/drivers/block/xsysace.c @@ -483,7 +483,6 @@ static void ace_fsm_dostate(struct ace_d u32 status; u16 val; int count; - int i; #if defined(DEBUG) dev_dbg(ace->dev, "fsm_state=%i, id_req_count=%i\n", @@ -688,7 +687,6 @@ static void ace_fsm_dostate(struct ace_d } /* Transfer the next buffer */ - i = 16; if (ace->fsm_task == ACE_TASK_WRITE) ace->reg_ops->dataout(ace); else @@ -702,8 +700,8 @@ static void ace_fsm_dostate(struct ace_d } /* bio finished; is there another one? */ - i = ace->req->current_nr_sectors; - if (end_that_request_first(ace->req, 1, i)) { + if (__blk_end_request(ace->req, 0, + blk_rq_cur_bytes(ace->req))) { /* dev_dbg(ace->dev, "next block; h=%li c=%i\n", * ace->req->hard_nr_sectors, * ace->req->current_nr_sectors); @@ -718,9 +716,6 @@ static void ace_fsm_dostate(struct ace_d break; case ACE_FSM_STATE_REQ_COMPLETE: - /* Complete the block request */ - blkdev_dequeue_request(ace->req); - end_that_request_last(ace->req, 1); ace->req = NULL; /* Finished request; go to idle state */ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 20/30] blk_end_request: changing xsysace (take 4) 2007-12-12 17:06 ` Kiyoshi Ueda @ 2007-12-12 18:12 ` Boaz Harrosh 0 siblings, 0 replies; 5+ messages in thread From: Boaz Harrosh @ 2007-12-12 18:12 UTC (permalink / raw) To: Kiyoshi Ueda Cc: jens.axboe, linux-kernel, linux-scsi, linux-ide, dm-devel, j-nomura, grant.likely On Wed, Dec 12 2007 at 19:06 +0200, Kiyoshi Ueda <k-ueda@ct.jp.nec.com> wrote: > Hi, > > On Wed, 12 Dec 2007 11:09:12 +0200, Boaz Harrosh <bharrosh@panasas.com> wrote: >>> Index: 2.6.24-rc4/drivers/block/xsysace.c >>> =================================================================== >>> --- 2.6.24-rc4.orig/drivers/block/xsysace.c >>> +++ 2.6.24-rc4/drivers/block/xsysace.c >>> @@ -703,7 +703,7 @@ static void ace_fsm_dostate(struct ace_d >>> >>> /* bio finished; is there another one? */ >>> i = ace->req->current_nr_sectors; >>> - if (end_that_request_first(ace->req, 1, i)) { >>> + if (__blk_end_request(ace->req, 0, i)) { >> end_that_request_first() took sectors __blk_end_request() now takes >> bytes > > Thank you for pointing it out! And I'm very sorry for the bug. > I have checked all conversions between sectors and bytes through > all patches again, and I found no other miss conversions. > > Below is the revised patch for xsysace. > > Thanks, > Kiyoshi Ueda > > NP, I know how it is, after you rebased your work for the "who's counting" times, you become blind. You need fresh eyes to look at it. Thanks for doing all this. Boaz ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-12 18:14 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-12-11 22:49 [PATCH 20/30] blk_end_request: changing xsysace (take 4) Kiyoshi Ueda 2007-12-11 22:59 ` Grant Likely 2007-12-12 9:09 ` Boaz Harrosh 2007-12-12 17:06 ` Kiyoshi Ueda 2007-12-12 18:12 ` Boaz Harrosh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).