ocfs2: Add the trace_ocfs2_read_blocks_end
PATCH 1/1 ocfs2: Add the trace_ocfs2_read_blocks_end
Missing the trace_ocfs2_read_blocks_end when reading blocks fails.
--- fs/ocfs2/buffer_head_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ocfs2/buffer_head_io.c +1 -2
@@ -395,11 +395,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, }ocfs2_metadata_cache_io_unlock (ci); +bail:trace_ocfs2_read_blocks_end ((unsigned long long )block, nr, flags, ignore_cache); -bail: -return status; }
Signature · 1 line
2.17.1
Joseph Qi
maintainerPATCH 1/1 ocfs2: Add the trace_ocfs2_read_blocks_end
Quoted 1 line · Zhang Qilong
Missing the
trace_ocfs2_read_blocks_endwhen reading blocks fails.>
Why do you need the trace in case error?
In general, it will log an error message if fail.
Thanks,
Joseph
Quoted 23 lines
Signed-off-by Zhang Qilong <[email protected]>--- fs/ocfs2/buffer_head_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)fs/ocfs2/buffer_head_io.c +1
-2@@ -395,11 +395,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, }ocfs2_metadata_cache_io_unlock (ci); +bail:trace_ocfs2_read_blocks_end ((unsigned long long )block, nr, flags, ignore_cache); -bail: -return status; }
Hi, Joseph
I think it makes sense, the 'begin' trace entry will always be paired with 'end'. For the post processing the trace, it would be easier to reconstruct such reading block operation and mark immediately as 'not sent' (avoiding to bother about entries which only have 'begin'). Logging an error message could help locate problems quickly in case error.
It looks good to me, so feel free to add it.
Best wish, thanks,
Zhang Qilong
Quoted 42 lines
-----????-----
???: Joseph Qi [mailto:joseph.qi at linux.alibaba.com] ????: 2020?10?19? 15:46
???: zhangqilong <[email protected]>; mark at fasheh.com; jlbec at evilplan.org
??: ocfs2-devel at oss.oracle.com
??: Re: [patch -next] ocfs2: Add thetrace_ocfs2_read_blocks_endQuoted 1 line · Zhang Qilong
Missing the
trace_ocfs2_read_blocks_endwhen reading blocks fails.>Why do you need the trace in case error?
In general, it will log an error message if fail.Thanks,
Josephfs/ocfs2/buffer_head_io.c int ocfs2_read_blocks(struct ocfs2_caching_info
Quoted 10 lines
Signed-off-by Zhang Qilong <[email protected]>--- fs/ocfs2/buffer_head_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)fs/ocfs2/buffer_head_io.c +0
-0@@ -395,11 +395,10 @@ int ocfs2_read_blocks(struct ocfs2_caching_info*ci, u64 block, int nr,
Quoted 13 lines
fs/ocfs2/buffer_head_io.c +1
-2}ocfs2_metadata_cache_io_unlock (ci); +bail:trace_ocfs2_read_blocks_end ((unsigned long long )block, nr, flags, ignore_cache); -bail: -return status; }