xsysace: moving the end_that_request_last() call
Hi,
Is there any problem if end_that_request_last() in ace_fsm_dostate() is moved to ACE_FSM_STATE_REQ_TRANSFER state from ACE_FSM_STATE_REQ_COMPLETE state like the patch below?
BACKGROUND:
I'm working on refining request completion procedures like:
Before: 2 steps completion using "end_that_request_{first/chunk}"
and "end_that_request_last"
After: 1 step completion using generic block-layer helper
which I'm calling "blk_end_request"
"blk_end_request" works like calling "__end_that_request_first" and "end_that_request_last".
<http://marc.info/?l=linux-kernel&m=116846938806220&w=2>
However, while auditing various drivers, I found xsysace driver doesn't call end_that_request_first() and end_that_request_last() at a time. It makes implementation of blk_end_request complicated. So I'd like to move the end_that_request_last() call.
I think it's no problem because after the successful call to end_that_request_first() in ACE_FSM_STATE_REQ_TRANSFER, the state changes immediately to ACE_FSM_STATE_REQ_COMPLETE without interruption, where it calls end_that_request_last().
There is no other transition to ACE_FSM_STATE_REQ_COMPLETE state.
Thanks,
Kiyoshi Ueda
drivers/block/xsysace.c +4 -3
@@ -707,13 +707,14 @@ static void ace_fsm_dostate(struct ace_dbreak ; } +/* Complete the block request */ +blkdev_dequeue_request (ace->req); +end_that_request_last (ace->req,1 ); + ace->fsm_state =ACE_FSM_STATE_REQ_COMPLETE ;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 */