From: Chad Talbott <ctalbott@google.com>
To: "J.A. Magallon" <jamagallon@able.es>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ide-io.c, kernel 2.4.22 Fix for IO stats in /proc/partitions, was Re: sard/iostat disk I/O statistics/accounting for 2.5.8-pre3
Date: 23 Sep 2003 11:09:17 -0700 [thread overview]
Message-ID: <vfx7k3z2x82.fsf@sgi.com> (raw)
In-Reply-To: <20030921224753.GA4548@werewolf.able.es>
"J.A. Magallon" <jamagallon@able.es> writes:
> On 09.15, Chad Talbott wrote:
> > I found the cause of ide disks' ios_in_flight going negative in
> > /proc/partitions.
> [...]
[broken patch elided...]
> Did you ever built this ? req -> rq ?
Good catch. Not that patch, obviously. :) I don't know where I came
up with that one; even with the req -> rq change it includes the call
to req_finished_io, so it's exactly a no-op.
Here's the one that I compiled and tested. It makes /proc/partitions
report correctly.
Thanks,
Chad
--- linux-2.4.22-old/drivers/ide/ide-io.c 15 Sep 2003 17:41:32 -0000
+++ linux-2.4.22-new/drivers/ide/ide-io.c 23 Sep 2003 17:40:27 -0000
@@ -148,6 +148,7 @@
ide_hwif_t *hwif = HWIF(drive);
unsigned long flags;
struct request *rq;
+ struct completion *waiting;
spin_lock_irqsave(&io_request_lock, flags);
rq = HWGROUP(drive)->rq;
@@ -221,7 +222,12 @@
spin_lock_irqsave(&io_request_lock, flags);
blkdev_dequeue_request(rq);
HWGROUP(drive)->rq = NULL;
- end_that_request_last(rq);
+
+ waiting = rq->waiting;
+ blkdev_release_request(rq);
+ if (waiting)
+ complete(waiting);
+
spin_unlock_irqrestore(&io_request_lock, flags);
}
next prev parent reply other threads:[~2003-09-23 18:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-15 20:21 [PATCH] ide-io.c, kernel 2.4.22 Fix for IO stats in /proc/partitions, was Re: sard/iostat disk I/O statistics/accounting for 2.5.8-pre3 Chad Talbott
2003-09-21 22:47 ` J.A. Magallon
2003-09-23 18:09 ` Chad Talbott [this message]
[not found] <20030924092418.A28838@devserv.devel.redhat.com>
2003-09-24 14:15 ` Stephen C. Tweedie
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=vfx7k3z2x82.fsf@sgi.com \
--to=ctalbott@google.com \
--cc=jamagallon@able.es \
--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