Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-17 Thread Johannes Thumshirn
On Wed, Nov 16, 2016 at 05:58:14PM +0100, Arnd Bergmann wrote: > On Tuesday, November 15, 2016 4:05:31 PM CET Johannes Thumshirn wrote: > > On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > > > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: > > > > On Tue, Nov 08,

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-16 Thread Arnd Bergmann
On Tuesday, November 15, 2016 4:05:31 PM CET Johannes Thumshirn wrote: > On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: > > > On Tue, Nov 08, 2016 at 03:04:43PM +, Bart Van Assche wrote: > > > > I think the

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: > > On Tue, Nov 08, 2016 at 03:04:43PM +, Bart Van Assche wrote: > > > I think the above code will miscalculate seconds_since_last_reset > > > if  > > > 'jiffies'

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-15 Thread Bart Van Assche
On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: > On Tue, Nov 08, 2016 at 03:04:43PM +, Bart Van Assche wrote: > > I think the above code will miscalculate seconds_since_last_reset > > if  > > 'jiffies' wraps around after an lport has been created and before  > >

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 08, 2016 at 03:04:43PM +, Bart Van Assche wrote: [...] > Hello Johannes, > > I think the above code will miscalculate seconds_since_last_reset if > 'jiffies' wraps around after an lport has been created and before > seconds_since_last_reset is computed. Shouldn't

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-08 Thread Bart Van Assche
On 11/08/16 00:45, 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 as lport->boot_time - jiffies > could become

[PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-08 Thread Johannes Thumshirn
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 as lport->boot_time - jiffies could become negative as in this example: $ cat