iowatcher: Fix up directory trace processing
authorAndrew Price <anprice@redhat.com>
Thu, 27 Mar 2014 21:59:38 +0000 (21:59 +0000)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:09 +0000 (12:02 -0700)
commitc1ab63ed17189cacf1247751e8633f589c977a00
treeb5d5f8ee2b440e3a159f8e668d51660fbba73e2a
parentff045fe73d4c1f84155e15ff8b228ee65f82373c
iowatcher: Fix up directory trace processing

Similar to the fix for spaces in file names in commit 5d845e3, this
patch fixes processing of directories with spaces in their names by
using posix_spawnp() to run the blkparse command instead of system(). In
doing so, combine_blktrace_devs() and match_trace() have been reworked
to use a list structure instead of doing a lot of strdup()ing and string
appending.

Also make sure that trailing slashes are removed from the directory name
before attempting to use it as the base of the .dump filename.

Update the -t entry in the manpage to mention directory behaviour, too.

Signed-off-by: Andrew Price <anprice@redhat.com>
iowatcher/blkparse.c
iowatcher/iowatcher.1
iowatcher/tracers.c
iowatcher/tracers.h