From: Christoph Hellwig Date: Thu, 23 Jan 2014 11:07:41 +0000 (+0100) Subject: scsi: fix the {host,target,device}_blocked counter mess X-Git-Tag: omap-for-v3.17/fixes-against-rc2~143^2~85 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd9070c9c512ff7995f9019392e0ae548df3a088;p=pandora-kernel.git scsi: fix the {host,target,device}_blocked counter mess Seems like these counters are missing any sort of synchronization for updates, as a over 10 year old comment from me noted. Fix this by using atomic counters, and while we're at it also make sure they are in the same cacheline as the _busy counters and not needlessly stored to in every I/O completion. With the new model the _busy counters can temporarily go negative, so all the readers are updated to check for > 0 values. Longer term every successful I/O completion will reset the counters to zero, so the temporarily negative values will not cause any harm. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Webb Scales Acked-by: Jens Axboe Tested-by: Bart Van Assche Tested-by: Robert Elliott --- Reading git-diff-tree failed