Message ID | 1479386367-63443-1-git-send-email-jthumshirn@suse.de (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 11/17/2016 04:39 AM, Johannes Thumshirn wrote: > Commit 540eb1eef 'scsi: libfc: fix seconds_since_last_reset calculation' > removed the use of 'struct timespec' from fc_get_host_stats(). This broke the > output of 'fcoeadm -s' after kernel 4.8-rc1. Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>> "Johannes" == Johannes Thumshirn <jthumshirn@suse.de> writes:
Johannes> Commit 540eb1eef 'scsi: libfc: fix seconds_since_last_reset
Johannes> calculation' removed the use of 'struct timespec' from
Johannes> fc_get_host_stats(). This broke the output of 'fcoeadm -s'
Johannes> after kernel 4.8-rc1.
Applied to 4.9/scsi-fixes.
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 04ce7cf..50c7167 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -308,7 +308,7 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost) fc_stats = &lport->host_stats; memset(fc_stats, 0, sizeof(struct fc_host_statistics)); - fc_stats->seconds_since_last_reset = (lport->boot_time - jiffies) / HZ; + fc_stats->seconds_since_last_reset = (jiffies - lport->boot_time) / HZ; for_each_possible_cpu(cpu) { struct fc_stats *stats;
Commit 540eb1eef 'scsi: libfc: fix seconds_since_last_reset calculation' removed the use of 'struct timespec' from fc_get_host_stats(). This broke the output of 'fcoeadm -s' after kernel 4.8-rc1. Fixes: 540eb1eef ('scsi: libfc: fix seconds_since_last_reset calculation') Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> --- drivers/scsi/libfc/fc_lport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)