diff mbox series

[V5,5/5] f2fs: use block layer helper for show_bio_op macro

Message ID 20190620175919.3273-6-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series block: improve print_req_error | expand

Commit Message

Chaitanya Kulkarni June 20, 2019, 5:59 p.m. UTC
Adjust the f2fs tracing code to use newly introduced block layer
function blk_op_str() which converts the REQ_OP_XXX into the string
XXX.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 include/trace/events/f2fs.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Comments

Hannes Reinecke June 21, 2019, 7:39 a.m. UTC | #1
On 6/20/19 7:59 PM, Chaitanya Kulkarni wrote:
> Adjust the f2fs tracing code to use newly introduced block layer
> function blk_op_str() which converts the REQ_OP_XXX into the string
> XXX.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>  include/trace/events/f2fs.h | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
> index 53b96f12300c..e3dc031af7f5 100644
> --- a/include/trace/events/f2fs.h
> +++ b/include/trace/events/f2fs.h
> @@ -76,16 +76,7 @@ TRACE_DEFINE_ENUM(CP_TRIMMED);
>  #define show_bio_type(op,op_flags)	show_bio_op(op),		\
>  						show_bio_op_flags(op_flags)
>  
> -#define show_bio_op(op)							\
> -	__print_symbolic(op,						\
> -		{ REQ_OP_READ,			"READ" },		\
> -		{ REQ_OP_WRITE,			"WRITE" },		\
> -		{ REQ_OP_FLUSH,			"FLUSH" },		\
> -		{ REQ_OP_DISCARD,		"DISCARD" },		\
> -		{ REQ_OP_SECURE_ERASE,		"SECURE_ERASE" },	\
> -		{ REQ_OP_ZONE_RESET,		"ZONE_RESET" },		\
> -		{ REQ_OP_WRITE_SAME,		"WRITE_SAME" },		\
> -		{ REQ_OP_WRITE_ZEROES,		"WRITE_ZEROES" })
> +#define show_bio_op(op)		blk_op_str(op)
>  
>  #define show_bio_op_flags(flags)					\
>  	__print_flags(F2FS_BIO_FLAG_MASK(flags), "|",			\
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 53b96f12300c..e3dc031af7f5 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -76,16 +76,7 @@  TRACE_DEFINE_ENUM(CP_TRIMMED);
 #define show_bio_type(op,op_flags)	show_bio_op(op),		\
 						show_bio_op_flags(op_flags)
 
-#define show_bio_op(op)							\
-	__print_symbolic(op,						\
-		{ REQ_OP_READ,			"READ" },		\
-		{ REQ_OP_WRITE,			"WRITE" },		\
-		{ REQ_OP_FLUSH,			"FLUSH" },		\
-		{ REQ_OP_DISCARD,		"DISCARD" },		\
-		{ REQ_OP_SECURE_ERASE,		"SECURE_ERASE" },	\
-		{ REQ_OP_ZONE_RESET,		"ZONE_RESET" },		\
-		{ REQ_OP_WRITE_SAME,		"WRITE_SAME" },		\
-		{ REQ_OP_WRITE_ZEROES,		"WRITE_ZEROES" })
+#define show_bio_op(op)		blk_op_str(op)
 
 #define show_bio_op_flags(flags)					\
 	__print_flags(F2FS_BIO_FLAG_MASK(flags), "|",			\