Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 20 Nov 2002 17:13:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 20 Nov 2002 17:13:53 -0500 Received: from 216-164-48-121.c3-0.gth-ubr1.lnh-gth.md.cable.rcn.com ([216.164.48.121]:37259 "EHLO zalem.puupuu.org") by vger.kernel.org with ESMTP id ; Wed, 20 Nov 2002 17:13:50 -0500 Date: Wed, 20 Nov 2002 17:20:54 -0500 From: Olivier Galibert To: Linux Kernel Mailing List Subject: Re: [PATCH]: jiffies wrap in ll_rw_blk.c Message-ID: <20021120172054.D12712@zalem.puupuu.org> Mail-Followup-To: Olivier Galibert , Linux Kernel Mailing List References: <3DDBF413.C06DAF2E@splentec.com> <1037827173.3267.78.camel@irongate.swansea.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1037827173.3267.78.camel@irongate.swansea.linux.org.uk>; from alan@lxorguk.ukuu.org.uk on Wed, Nov 20, 2002 at 09:19:33PM +0000 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 28 On Wed, Nov 20, 2002 at 09:19:33PM +0000, Alan Cox wrote: > On Wed, 2002-11-20 at 20:44, Luben Tuikov wrote: > > --- ll_rw_blk.c.old Wed Nov 20 15:32:50 2002 > > +++ ll_rw_blk.c Wed Nov 20 15:33:06 2002 > > @@ -2092,7 +2092,7 @@ > > complete(req->waiting); > > > > if (disk) { > > - unsigned long duration = jiffies - req->start_time; > > + unsigned long duration = (signed) jiffies - (signed) req->start_time; > > switch (rq_data_dir(req)) { > > It was right before. Your patch breaks it. Think about it in unsigned > maths > > 0x00000002 - 0xFFFFFFFF = 0x00000003 Signed vs. unsigned is actually irrelevant in two-complement systems as long as you don't compare. Only the int/long issue has an actual effect. OG. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/