aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/stat-cpi.py
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <[email protected]>2018-08-16 20:08:37 +0000
committerJens Axboe <[email protected]>2018-08-16 20:13:56 +0000
commit757d9140072054528b13bbe291583d9823cde195 (patch)
tree25f616b98243cd28586096340fc467c3aab55069 /tools/perf/scripts/python/stat-cpi.py
parentpktcdvd: fix setting of 'ret' error return for a few cases (diff)
downloadkernel-757d9140072054528b13bbe291583d9823cde195.tar.gz
kernel-757d9140072054528b13bbe291583d9823cde195.zip
tracing/blktrace: Fix to allow setting same value
Masami Hiramatsu reported: Current trace-enable attribute in sysfs returns an error if user writes the same setting value as current one, e.g. # cat /sys/block/sda/trace/enable 0 # echo 0 > /sys/block/sda/trace/enable bash: echo: write error: Invalid argument # echo 1 > /sys/block/sda/trace/enable # echo 1 > /sys/block/sda/trace/enable bash: echo: write error: Device or resource busy But this is not a preferred behavior, it should ignore if new setting is same as current one. This fixes the problem as below. # cat /sys/block/sda/trace/enable 0 # echo 0 > /sys/block/sda/trace/enable # echo 1 > /sys/block/sda/trace/enable # echo 1 > /sys/block/sda/trace/enable Link: http://lkml.kernel.org/r/[email protected] Cc: Ingo Molnar <[email protected]> Cc: Jens Axboe <[email protected]> Cc: [email protected] Cc: [email protected] Fixes: cd649b8bb830d ("blktrace: remove sysfs_blk_trace_enable_show/store()") Reported-by: Masami Hiramatsu <[email protected]> Tested-by: Masami Hiramatsu <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions