Skip to contentSkip to conversation

scsi_transport_fc.c:fc_bsg_remove()

DISCUSSION Jens Axboe 1 participant 1 message Mar 4, 2011 SCSI

lore
Share & tools
lore

Jens Axboe

author
#0 lore 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.

Signature · 1 line
Jens Axboe