2020-04-16 01:04:39

by Eric Whitney

[permalink] [raw]
Subject: [PATCH 2/2] ext4: translate a few more map flags to strings in tracepoints

As new ext4_map_blocks() flags have been added, not all have gotten flag
bit to string translations to make tracepoint output more readable.
Fix that, and go one step further by adding a translation for the
EXT4_EX_NOCACHE flag as well. The EXT4_EX_FORCE_CACHE flag can never
be set in a tracepoint in the current code, so there's no need to
bother with a translation for it right now.

Signed-off-by: Eric Whitney <[email protected]>
---
include/trace/events/ext4.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 40ff8a2fc763..280475c1cecc 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -45,7 +45,10 @@ struct partial_cluster;
{ EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \
{ EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \
{ EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \
- { EXT4_GET_BLOCKS_ZERO, "ZERO" })
+ { EXT4_GET_BLOCKS_CONVERT_UNWRITTEN, "CONVERT_UNWRITTEN" }, \
+ { EXT4_GET_BLOCKS_ZERO, "ZERO" }, \
+ { EXT4_GET_BLOCKS_IO_SUBMIT, "IO_SUBMIT" }, \
+ { EXT4_EX_NOCACHE, "EX_NOCACHE" })

/*
* __print_flags() requires that all enum values be wrapped in the
--
2.11.0


2020-04-22 16:16:19

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH 2/2] ext4: translate a few more map flags to strings in tracepoints

On Wed 15-04-20 16:31:40, Eric Whitney wrote:
> As new ext4_map_blocks() flags have been added, not all have gotten flag
> bit to string translations to make tracepoint output more readable.
> Fix that, and go one step further by adding a translation for the
> EXT4_EX_NOCACHE flag as well. The EXT4_EX_FORCE_CACHE flag can never
> be set in a tracepoint in the current code, so there's no need to
> bother with a translation for it right now.
>
> Signed-off-by: Eric Whitney <[email protected]>

Looks good to me. You can add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> include/trace/events/ext4.h | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
> index 40ff8a2fc763..280475c1cecc 100644
> --- a/include/trace/events/ext4.h
> +++ b/include/trace/events/ext4.h
> @@ -45,7 +45,10 @@ struct partial_cluster;
> { EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \
> { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \
> { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \
> - { EXT4_GET_BLOCKS_ZERO, "ZERO" })
> + { EXT4_GET_BLOCKS_CONVERT_UNWRITTEN, "CONVERT_UNWRITTEN" }, \
> + { EXT4_GET_BLOCKS_ZERO, "ZERO" }, \
> + { EXT4_GET_BLOCKS_IO_SUBMIT, "IO_SUBMIT" }, \
> + { EXT4_EX_NOCACHE, "EX_NOCACHE" })
>
> /*
> * __print_flags() requires that all enum values be wrapped in the
> --
> 2.11.0
>
--
Jan Kara <[email protected]>
SUSE Labs, CR

2020-05-14 14:43:54

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 2/2] ext4: translate a few more map flags to strings in tracepoints

On Wed, Apr 22, 2020 at 06:14:13PM +0200, Jan Kara wrote:
> On Wed 15-04-20 16:31:40, Eric Whitney wrote:
> > As new ext4_map_blocks() flags have been added, not all have gotten flag
> > bit to string translations to make tracepoint output more readable.
> > Fix that, and go one step further by adding a translation for the
> > EXT4_EX_NOCACHE flag as well. The EXT4_EX_FORCE_CACHE flag can never
> > be set in a tracepoint in the current code, so there's no need to
> > bother with a translation for it right now.
> >
> > Signed-off-by: Eric Whitney <[email protected]>
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <[email protected]>

Applied, thanks.

- Ted