Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix zio_flag_t print format #14100

Merged
merged 1 commit into from
Oct 28, 2022
Merged

Conversation

youzhongyang
Copy link
Contributor

Signed-off-by: Youzhong Yang [email protected]

Motivation and Context

buildbot/Kernel.org failed with errors like the following:

In file included from ./include/trace/define_trace.h:102:0,
                 from ./include/zfs/os/linux/zfs/sys/trace_arc.h:385,
                 from fs/zfs/os/linux/zfs/trace.c:43:
./include/zfs/os/linux/zfs/sys/trace_arc.h: In function ‘trace_raw_output_zfs_l2arc_rw_class’:
./include/zfs/os/linux/zfs/sys/trace_arc.h:138:12: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 15 has type ‘zio_flag_t {aka long long unsigned int}’ [-Werror=format=]
  TP_printk("vdev { id %llu guid %llu state %llu } "
            ^
./include/trace/trace_events.h:203:27: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  trace_event_printf(iter, print);    \
                           ^~~~~
./include/zfs/os/linux/zfs/sys/trace_arc.h:138:2: note: in expansion of macro ‘TP_printk’
  TP_printk("vdev { id %llu guid %llu state %llu } "
  ^~~~~~~~~
In file included from ./include/zfs/os/linux/zfs/sys/trace_arc.h:38:0,
                 from fs/zfs/os/linux/zfs/trace.c:43:
./include/zfs/os/linux/zfs/sys/trace_common.h:95:12: note: format string is defined here
  "flags 0x%x stage 0x%x pipeline 0x%x orig_flags 0x%x "  \
           ~^
           %llx

It is likely caused by commit 4938d01db7 which changed zio_flag from enum to uint64_t.

Description

Use the suggested format %llx.

How Has This Been Tested?

No, buildbot will tell.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Signed-off-by: Youzhong Yang <[email protected]>
Copy link
Contributor

@ryao ryao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youzhongyang You beat me to this. I had caught this late yesterday and promised @behlendorf that I would tackle it this morning.

Your solution should work.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Oct 28, 2022
@behlendorf behlendorf merged commit 5d0fd84 into openzfs:master Oct 28, 2022
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 29, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Oct 29, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
shodanshok pushed a commit to shodanshok/zfs that referenced this pull request Oct 30, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
shodanshok pushed a commit to shodanshok/zfs that referenced this pull request Nov 3, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
shodanshok pushed a commit to shodanshok/zfs that referenced this pull request Nov 3, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 9, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 10, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
andrewc12 pushed a commit to andrewc12/openzfs that referenced this pull request Nov 10, 2022
Follow up for 4938d01 which changed zio_flag from enum to uint64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Youzhong Yang <[email protected]>
Closes openzfs#14100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants