blktrace: avoid device duplication
authorEdward Shishkin <edward@redhat.com>
Tue, 15 Dec 2009 17:47:47 +0000 (18:47 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 20 Apr 2010 07:51:52 +0000 (09:51 +0200)
commit4b747a4016573e7f2510b6ab767783a2708d1e55
treea91415b4cb1a7b857ab8d71c88392398f4a7248f
parent014b0ea19762341e217d463308710c3662d50e9c
blktrace: avoid device duplication

Fixup for bz 501457.

Problem:
If the device list file contains the same device
as supplied on the command line, blktrace stops
immediately and further I/O tracing is impossible.

Bug: device duplication in the devpaths ends with
programm termination (BLKTRACESETUP ioctl returns
error) while resources (open files in debugfs) are
not released.

Solution:
Make sure devices are not duplicated in devpaths
pool.

Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blktrace.c