From: Jens Axboe <jaxboe@fusionio.com>
To: Linux SCSI List <linux-scsi@vger.kernel.org>
Cc: James Smart <james.smart@emulex.com>,
"James.Bottomley@suse.de" <James.Bottomley@suse.de>
Subject: scsi_transport_fc.c:fc_bsg_remove()
Date: Fri, 4 Mar 2011 13:43:18 +0100 [thread overview]
Message-ID: <4D70DE66.8030201@fusionio.com> (raw)
Hi,
I came across this piece of code in the above mentioned function:
/* need the lock to fetch a request
* this may fetch the same reqeust as the previous pass
*/
req = blk_fetch_request(q);
/* save requests in use and starved */
counts = q->rq.count[0] + q->rq.count[1] +
q->rq.starved[0] + q->rq.starved[1];
WTF? First of all, each request is ended if non-NULL. So why would it be
returning the same request as the previous pass? Secondly, what is the
below sum hoping to accomplish? It's a gross layering violation.
--
Jens Axboe
reply other threads:[~2011-03-04 12:43 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=4D70DE66.8030201@fusionio.com \
--to=jaxboe@fusionio.com \
--cc=James.Bottomley@suse.de \
--cc=james.smart@emulex.com \
--cc=linux-scsi@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