summaryrefslogtreecommitdiff
path: root/diskutil.c
diff options
context:
space:
mode:
authorAlan D. Brunelle <alan.brunelle@hp.com>2009-09-11 14:57:10 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-11 21:34:33 +0200
commitb06de82e3b075874733dd233571499c1c1ca453c (patch)
treed1774f628f6a78c3eb5ad37ad6ac591efbea53c2 /diskutil.c
parent0d5b625cd2f800c64948311cf0f51259d8a83533 (diff)
downloadfio-b06de82e3b075874733dd233571499c1c1ca453c.tar.gz
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> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'diskutil.c')
-rw-r--r--diskutil.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/diskutil.c b/diskutil.c
index cb15882f..62149d91 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);