Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2138266

Summary: Remove bdevname usage to correct latest kernel snapshot build failure
Product: Red Hat Enterprise Linux 9 Reporter: Susan LeGendre-McGhee <slegendr>
Component: kmod-kvdoAssignee: sclafani
Status: CLOSED ERRATA QA Contact: Filip Suba <fsuba>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: awalsh, cwei, fsuba
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:14:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Susan LeGendre-McGhee 2022-10-27 20:05:55 UTC
Description of problem:
The latest kernel snapshot removed bdevname() (see https://www.spinics.net/lists/raid/msg70941.html). As such, the kmod-kvdo code needs to be corrected to remove its usage, as well.


Version-Release number of selected component (if applicable):


How reproducible: 100%


Steps to Reproduce:
1.  

Actual results:
Building kmod-kvdo against the latest kernel snapshot fails with compilation errors regarding bdevname().


Expected results: 
Building kmod-kvdo against the latest kernel snapshot succeeds.


Additional info:
--- Build Failure Text ---
2022-10-26 13:14:24.303136 | cloud-host | DEBUG:   gcc -Wp,-MMD,/builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/.dm-vdo-target.o.d -I /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/include -I /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/include/uapi -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu11 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-address-of-packed-member -O2 -fno-allow-store-data-races -Wframe-larger-than=2048 -fstack-protector-strong -Wimplicit-fallthrough=5 -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-stack-clash-protection -g -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-alloc-size-larger-than -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wno-packed-not-aligned -std=gnu99 -fno-builtin-memset -Werror -Wframe-larger-than=400 -DCURRENT_VERSION=\"8.2.0.18\" -I/builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo  -DMODULE  -DKBUILD_BASENAME='"dm_vdo_target"' -DKBUILD_MODNAME='"kvdo"' -D__KBUILD_MODNAME=kmod_kvdo -c -o /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.o /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.c  ; ./tools/objtool/objtool orc generate  --module  --no-fp   --retpoline  --rethunk  --uaccess   /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.o
2022-10-26 13:14:24.580014 | cloud-host | DEBUG: In file included from /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/device-config.h:8,
2022-10-26 13:14:24.580097 | cloud-host | DEBUG:                  from /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/vdo.h:21,
2022-10-26 13:14:24.580193 | cloud-host | DEBUG:                  from /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/vio.h:18,
2022-10-26 13:14:24.580247 | cloud-host | DEBUG:                  from /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/io-submitter.h:13,
2022-10-26 13:14:24.580313 | cloud-host | DEBUG:                  from /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.c:16:
2022-10-26 13:14:24.580383 | cloud-host | DEBUG: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.c: In function 'vdo_status':
2022-10-26 13:14:24.580558 | cloud-host | DEBUG: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.c:147:24: error: implicit declaration of function 'bdevname'; did you mean 'dev_name'? [-Werror=implicit-function-declaration]
2022-10-26 13:14:24.580635 | cloud-host | DEBUG:   147 |                        bdevname(vdo_get_backing_device(vdo), name_buffer),
2022-10-26 13:14:24.580748 | cloud-host | DEBUG:       |                        ^~~~~~~~
2022-10-26 13:14:24.580820 | cloud-host | DEBUG: ./include/linux/device-mapper.h:604:67: note: in definition of macro 'DMEMIT'
2022-10-26 13:14:24.580888 | cloud-host | DEBUG:   604 |                           0 : scnprintf(result + sz, maxlen - sz, x))
2022-10-26 13:14:24.580955 | cloud-host | DEBUG:       |                                                                   ^
2022-10-26 13:14:24.581028 | cloud-host | DEBUG: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.c:146:24: error: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Werror=format=]
2022-10-26 13:14:24.581094 | cloud-host | DEBUG:   146 |                 DMEMIT("/dev/%s %s %s %s %s %llu %llu",
2022-10-26 13:14:24.581160 | cloud-host | DEBUG:       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-10-26 13:14:24.581227 | cloud-host | DEBUG:   147 |                        bdevname(vdo_get_backing_device(vdo), name_buffer),
2022-10-26 13:14:24.581293 | cloud-host | DEBUG:       |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-10-26 13:14:24.581359 | cloud-host | DEBUG:       |                        |
2022-10-26 13:14:24.581425 | cloud-host | DEBUG:       |                        int
2022-10-26 13:14:24.581491 | cloud-host | DEBUG: ./include/linux/device-mapper.h:604:67: note: in definition of macro 'DMEMIT'
2022-10-26 13:14:24.581556 | cloud-host | DEBUG:   604 |                           0 : scnprintf(result + sz, maxlen - sz, x))
2022-10-26 13:14:24.581621 | cloud-host | DEBUG:       |                                                                   ^
2022-10-26 13:14:24.581715 | cloud-host | DEBUG: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.c:146:31: note: format string is defined here
2022-10-26 13:14:24.581783 | cloud-host | DEBUG:   146 |                 DMEMIT("/dev/%s %s %s %s %s %llu %llu",
2022-10-26 13:14:24.581849 | cloud-host | DEBUG:       |                              ~^
2022-10-26 13:14:24.581915 | cloud-host | DEBUG:       |                               |
2022-10-26 13:14:24.581980 | cloud-host | DEBUG:       |                               char *
2022-10-26 13:14:24.582044 | cloud-host | DEBUG:       |                              %d
2022-10-26 13:14:24.694798 | cloud-host | DEBUG: cc1: all warnings being treated as errors
2022-10-26 13:14:24.698604 | cloud-host | DEBUG: make[2]: *** [scripts/Makefile.build:295: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo/dm-vdo-target.o] Error 1
2022-10-26 13:14:24.698706 | cloud-host | DEBUG: make[1]: *** [scripts/Makefile.build:574: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/./vdo] Error 2
2022-10-26 13:14:24.698924 | cloud-host | DEBUG: make: *** [Makefile:1915: /builddir/build/BUILD/kvdo-6077a128b887100e478048f67e6b8734cddd0ec7/obj/.] Error 2
2022-10-26 13:14:24.699030 | cloud-host | DEBUG: make: Leaving directory '/usr/src/kernels/5.14.0-178.el9.x86_64'
2022-10-26 13:14:24.699335 | cloud-host | DEBUG: error: Bad exit status from /var/tmp/rpm-tmp.cUbPlU (%build)
2022-10-26 13:14:24.699442 | cloud-host | DEBUG: RPM build errors:
2022-10-26 13:14:24.699540 | cloud-host | DEBUG:     Bad exit status from /var/tmp/rpm-tmp.cUbPlU (%build)
2022-10-26 13:14:24.702881 | cloud-host | DEBUG: Child return code was: 1

Comment 6 Filip Suba 2023-01-09 10:02:42 UTC
Verified with kmod-kvdo-8.2.1.3-66.el9.

Comment 8 errata-xmlrpc 2023-05-09 08:14:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (kmod-kvdo bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2461