From: Joe Eykholt Date: Wed, 1 Dec 2010 00:20:18 +0000 (-0800) Subject: [SCSI] libfc: fix statistics for FCP input/output megabytes X-Git-Tag: v2.6.38-rc1~27^2~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f0e385fdafb7d6c8ded6464fa6421c735d96caf;p=pandora-kernel.git [SCSI] libfc: fix statistics for FCP input/output megabytes The statistics for InputMegabytes and OutputMegabytes are misnamed. They're accumulating bytes, not megabytes. The statistic returned via /sys must be in megabytes, however, which is what the HBA-API wants. The FCP code needs to accumulate it in bytes and then divide by 1,000,000 (not 2^20) before it presented via sysfs. This affects fcoe.ko only, not fnic. The fnic driver correctly by accumulating bytes and then converts to megabytes. I checked that libhbalinux is using the /sys file directly without conversion. BTW, qla2xxx does divide by 2^20, which I'm not fixing here. Signed-off-by: Joe Eykholt Signed-off-by: Robert Love Signed-off-by: James Bottomley --- Reading git-diff-tree failed