summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2015-11-23 19:20:06 -0500
committerMike Snitzer <snitzer@redhat.com>2015-12-10 10:38:58 -0500
commit86bad0c7071c24efee0a395d8b622764bdd24320 (patch)
tree49fa95844e79ed05c16735dfa31cb6953683836d /drivers/of
parentf98c8f797021e78ba27143ecd39c51995c47aa8b (diff)
dm bufio: store stacktrace in buffers to help find buffer leaks
The option DM_DEBUG_BLOCK_STACK_TRACING is moved from persistent-data directory to device mapper directory because it will now be used by persistent-data and bufio. When the option is enabled, each bufio buffer stores the stacktrace of the last dm_bufio_get(), dm_bufio_read() or dm_bufio_new() call that increased the hold count to 1. The buffer's stacktrace is printed if the buffer was not released before the bufio client is destroyed. When DM_DEBUG_BLOCK_STACK_TRACING is enabled, any bufio buffer leaks are considered warnings - i.e. the kernel continues afterwards. If not enabled, buffer leaks are considered BUGs and the kernel with crash. Reasoning on this disposition is: if we only ever warned on buffer leaks users would generally ignore them and the problematic code would never get fixed. Successfully used to find source of bufio leaks fixed with commit fce079f63c3 ("dm btree: fix bufio buffer leaks in dm_btree_del() error path"). Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/of')
0 files changed, 0 insertions, 0 deletions