From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: fio@vger.kernel.org
Subject: Re: Bug in fio: infinite loop when using two volumes crafted from one MD?
Date: Fri, 11 Sep 2009 15:03:40 -0400 [thread overview]
Message-ID: <1252695820.5814.31.camel@cail> (raw)
In-Reply-To: <20090911163539.GK14984@kernel.dk>
[-- Attachment #1: Type: text/plain, Size: 323 bytes --]
Well, the attached patch appears to fix the problem: When looking to add
an underlying device we first check to see if its in the list of current
devices. If so, we skip this add.
As I know next to nothing about the innards of fio, I'd be a little
leery of taking this in, but at least it allows me to proceed! :-)
Alan
[-- Attachment #2: 0001-Bug-fix-handles-disk-device-used-multiple-times.patch --]
[-- Type: text/x-patch, Size: 1169 bytes --]
From 199a61fe53340c3ebd93567d22e16a95cca3aaeb Mon Sep 17 00:00:00 2001
From: Alan D. Brunelle <alan.brunelle@hp.com>
Date: Fri, 11 Sep 2009 14:57:10 -0400
Subject: [PATCH] Bug fix: handles disk device used multiple times
There were issues in having the same underlying device being referenced
multiple times (via different paths) when reporting storage I/O
statistics. As an example: having two (or more) LVM2/DM volumes crafted
out of the same MD array.
This patch simply skips over any devices previously seen.
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
diskutil.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/diskutil.c b/diskutil.c
index cb15882..62149d9 100644
--- a/diskutil.c
+++ b/diskutil.c
@@ -221,6 +221,13 @@ static void find_add_disk_slaves(struct thread_data *td, char *path,
return;
}
+ /*
+ * See if this maj,min already exists
+ */
+ slavedu = disk_util_exists(majdev, mindev);
+ if (slavedu)
+ continue;
+
sprintf(temppath, "%s/%s", slavesdir, slavepath);
__init_per_file_disk_util(td, majdev, mindev, temppath);
slavedu = disk_util_exists(majdev, mindev);
--
1.6.0.4
next prev parent reply other threads:[~2009-09-11 19:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 15:59 Bug in fio: infinite loop when using two volumes crafted from one MD? Alan D. Brunelle
2009-09-11 16:35 ` Jens Axboe
2009-09-11 19:03 ` Alan D. Brunelle [this message]
2009-09-11 19:34 ` Jens Axboe
2009-09-11 20:16 ` Alan D. Brunelle
2009-09-11 20:23 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2009-10-23 3:12 Glen Ogilvie
2009-10-23 4:23 ` Jens Axboe
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=1252695820.5814.31.camel@cail \
--to=alan.brunelle@hp.com \
--cc=fio@vger.kernel.org \
--cc=jens.axboe@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.