From: Robert Read <rread@datarithm.net>
To: linux-kernel@vger.kernel.org
Subject: [patch] set kiobuf io_count once, instead of increment
Date: Tue, 27 Feb 2001 16:22:22 -0800 [thread overview]
Message-ID: <20010227162222.A6389@tenchi.datarithm.net> (raw)
Currently in brw_kiovec, iobuf->io_count is being incremented as each
bh is submitted, and decremented in the bh->b_end_io(). This means
io_count can go to zero before all the bhs have been submitted,
especially during a large request. This causes the end_kio_request()
to be called before all of the io is complete.
This suggested patch against 2.4.2 sets io_count to the total amount
before the bhs are submitted, although there is probably a better way
to determine the io_count than this.
robert
diff -ru linux/fs/buffer.c linux-rm/fs/buffer.c
--- linux/fs/buffer.c Mon Jan 15 12:42:32 2001
+++ linux-rm/fs/buffer.c Tue Jan 30 11:41:57 2001
@@ -2085,6 +2085,7 @@
offset = iobuf->offset;
length = iobuf->length;
iobuf->errno = 0;
+ atomic_set(&iobuf->io_count, length/size);
for (pageind = 0; pageind < iobuf->nr_pages; pageind++) {
map = iobuf->maplist[pageind];
@@ -2119,8 +2120,6 @@
bh[bhind++] = tmp;
length -= size;
offset += size;
-
- atomic_inc(&iobuf->io_count);
submit_bh(rw, tmp);
/*
next reply other threads:[~2001-02-28 0:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-28 0:22 Robert Read [this message]
2001-02-28 1:50 ` Marcelo Tosatti
2001-02-28 17:18 ` Robert Read
2001-03-02 18:46 ` Stephen C. Tweedie
2001-03-02 18:43 ` 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=20010227162222.A6389@tenchi.datarithm.net \
--to=rread@datarithm.net \
--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®