public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* scsi_transport_fc.c:fc_bsg_remove()
@ 2011-03-04 12:43 Jens Axboe
  0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2011-03-04 12:43 UTC (permalink / raw)
  To: Linux SCSI List; +Cc: James Smart, James.Bottomley@suse.de

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-04 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 12:43 scsi_transport_fc.c:fc_bsg_remove() Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox