diff options
author | Yang Shi <[email protected]> | 2022-02-10 14:52:22 -0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2022-02-11 10:00:16 -0700 |
commit | d5869fdc189f0f12a954a48d58a48104a2f5d044 (patch) | |
tree | 1a48848543d78cdc1a512d340a52ac7a172cbaef /lib/mpi/mpi-bit.c | |
parent | 3f607293b74d6acb06571a774a500143c1f0ed2c (diff) |
block: introduce block_rq_error tracepoint
Currently, rasdaemon uses the existing tracepoint block_rq_complete
and filters out non-error cases in order to capture block disk errors.
But there are a few problems with this approach:
1. Even kernel trace filter could do the filtering work, there is
still some overhead after we enable this tracepoint.
2. The filter is merely based on errno, which does not align with kernel
logic to check the errors for print_req_error().
3. block_rq_complete only provides dev major and minor to identify
the block device, it is not convenient to use in user-space.
So introduce a new tracepoint block_rq_error just for the error case.
With this patch, rasdaemon could switch to block_rq_error.
Since the new tracepoint has the similar implementation with
block_rq_complete, so move the existing code from TRACE_EVENT
block_rq_complete() into new event class block_rq_completion(). Then add
event for block_rq_complete and block_rq_err respectively from the newly
created event class per the suggestion from Chaitanya Kulkarni.
Cc: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Reviewed-by: Steven Rostedt <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Yang Shi <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions