From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: grant.likely@secretlab.ca, linux-kernel@vger.kernel.org
Cc: j-nomura@ce.jp.nec.com, k-ueda@ct.jp.nec.com
Subject: [QUESTION] xsysace: moving the end_that_request_last() call
Date: Thu, 09 Aug 2007 17:42:14 -0400 (EDT) [thread overview]
Message-ID: <20070809.174214.35657111.k-ueda@ct.jp.nec.com> (raw)
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
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
--- 2.6.23-rc1-mm1/drivers/block/xsysace.c 2007-07-25 15:12:05.000000000 -0400
+++ xsysace/drivers/block/xsysace.c 2007-08-09 16:40:34.000000000 -0400
@@ -707,13 +707,14 @@ static void ace_fsm_dostate(struct ace_d
break;
}
+ /* 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 */
reply other threads:[~2007-08-09 21:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070809.174214.35657111.k-ueda@ct.jp.nec.com \
--to=k-ueda@ct.jp.nec.com \
--cc=grant.likely@secretlab.ca \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®