]> git.baikalelectronics.ru Git - kernel.git/commit
Remove double removal of blktrace directory
authorAlan D. Brunelle <alan.brunelle@hp.com>
Fri, 7 Aug 2009 16:01:08 +0000 (12:01 -0400)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 12 Aug 2009 16:50:08 +0000 (18:50 +0200)
commit7d9752a8af784b5466665865cd6e570abe74ae01
tree70639084b6a04ce428cecbaa5fa30c2d71d5ff33
parente9d269f8f8df5e8c8847680bbc6d86f6a9b7cad2
Remove double removal of blktrace directory

commit e35976633b983207c84201309793c1ab904502fc
Author: Stefan Raspl <raspl@linux.vnet.ibm.com>
Date:   Tue May 19 09:59:08 2009 +0200

    blktrace: remove debugfs entries on bad path

added in an explicit invocation of debugfs_remove for bt->dir, in
blk_remove_buf_file_callback we are also getting the directory removed. On
occasion I am seeing memory corruption that I have bisected down to
this commit. [The testing involves a (long) series of I/O benchmarks
with blktrace invoked around the actual runs.] I believe that this
committed patch is correct, but the problem actually lies in the code
in blk_remove_buf_file_callback.

With this patch I am able to consistently get complete runs whereas
previously I could not get a single run to complete.

The first part of the patch simply moves the debugfs_remove below the
relay_close: the relay_close call will remove files under bt->dir, and
so we should not remove the directory until all the files we created
have been removed. (Note: This is not sufficient to fix the problem -
the file system code has ref counts on the directoy, so our invocation
does not cause the directory to actually be removed. Nonetheless, we
should not rely upon that feature.)

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
kernel/trace/blktrace.c