From: Olivier Galibert <galibert@pobox.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]: jiffies wrap in ll_rw_blk.c
Date: Wed, 20 Nov 2002 17:20:54 -0500 [thread overview]
Message-ID: <20021120172054.D12712@zalem.puupuu.org> (raw)
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
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.
prev parent reply other threads:[~2002-11-20 22:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-20 20:44 Luben Tuikov
2002-11-20 21:06 ` Benjamin LaHaise
2002-11-20 21:18 ` Luben Tuikov
2002-11-20 21:19 ` Alan Cox
2002-11-20 21:00 ` Luben Tuikov
2002-11-20 21:31 ` Alan Cox
2002-11-20 21:15 ` Luben Tuikov
2002-11-20 22:20 ` Olivier Galibert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021120172054.D12712@zalem.puupuu.org \
--to=galibert@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®