Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-35753

Adapt kvdo to deprecation of blkdev_get_by_dev, blkdev_get_by_path, and blkdev_put

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • rhel-9.5
    • rhel-9.5
    • kmod-kvdo
    • None
    • kmod-kvdo-8.2.4.10-130.el9
    • None
    • Important
    • rhel-sst-logical-storage
    • ssg_filesystems_storage_and_HA
    • 14
    • 16
    • 3
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      What were you trying to do that didn't work?
      Rebuild of kmod-kvdo against the latest RHEL-9.5 kernel (5.14.0-446.el9) failed with mock build failures.

      Please provide the package NVR for which bug is seen:
      kmod-kvdo-8.2.3.3-122.el9

      How reproducible: Always

      Steps to reproduce
      1. Set up a host with kernel-5.14.0-446.el9
      2. Obtain the kmod-kvdo sources and spec file
      3. Build kmod-kvdo against kernel-5.14.0-446.el9

      Expected results
      Build succeeds without errors.

      Actual results
      Build failure when compiling io-factory.c.

      DEBUG:   gcc -Wp,-MMD,/builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/.io-factory.o.d -I /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/include -I /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/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 -mharden-sls=all -fpatchable-function-entry=16,16 -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 -Wno-main -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 -falign-functions=16 -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than "-Wimplicit-fallthrough=5" -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.3.3\" -I/builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo  -DMODULE  -DKBUILD_BASENAME='"io_factory"' -DKBUILD_MODNAME='"kvdo"' -D__KBUILD_MODNAME=kmod_kvdo -c -o /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.o /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c  ; ./tools/objtool/objtool  --hacks=jump_label  --hacks=noinstr  --hacks=skylake    --orc  --retpoline  --rethunk  --sls   --static-call  --uaccess   --module   --prefix=16  /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.o
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c: In function 'get_block_device_from_name':
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c:67:25: error: implicit declaration of function 'blkdev_get_by_dev'; did you mean 'blkdev_get_no_open'? [-Werror=implicit-function-declaration]
      DEBUG:    67 |                 *bdev = blkdev_get_by_dev(device, BLK_FMODE, NULL, &hops);
      DEBUG:       |                         ^~~~~~~~~~~~~~~~~
      DEBUG:       |                         blkdev_get_no_open
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c:67:23: error: assignment to 'struct block_device *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
      DEBUG:    67 |                 *bdev = blkdev_get_by_dev(device, BLK_FMODE, NULL, &hops);
      DEBUG:       |                       ^
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c:73:25: error: implicit declaration of function 'blkdev_get_by_path'; did you mean 'blkdev_get_no_open'? [-Werror=implicit-function-declaration]
      DEBUG:    73 |                 *bdev = blkdev_get_by_path(name, BLK_FMODE, NULL, &hops);
      DEBUG:       |                         ^~~~~~~~~~~~~~~~~~
      DEBUG:       |                         blkdev_get_no_open
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c:73:23: error: assignment to 'struct block_device *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
      DEBUG:    73 |                 *bdev = blkdev_get_by_path(name, BLK_FMODE, NULL, &hops);
      DEBUG:       |                       ^
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c: In function 'make_uds_io_factory':
      DEBUG: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.c:102:17: error: implicit declaration of function 'blkdev_put'; did you mean 'bdev_fput'? [-Werror=implicit-function-declaration]
      DEBUG:   102 |                 blkdev_put(bdev, NULL);
      DEBUG:       |                 ^~~~~~~~~~
      DEBUG:       |                 bdev_fput
      DEBUG: cc1: all warnings being treated as errors
      DEBUG: make[2]: *** [scripts/Makefile.build:300: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo/io-factory.o] Error 1
      DEBUG: make[1]: *** [scripts/Makefile.build:588: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/./vdo] Error 2
      DEBUG: make: *** [Makefile:1935: /builddir/build/BUILD/kvdo-c6254c6db5cfa02ecf5bbb4db2c5728f23aa3b2a/obj/.] Error 2
      DEBUG: make: Leaving directory '/usr/src/kernels/5.14.0-446.el9.x86_64'
      

              slegendr@redhat.com Susan LeGendre McGhee
              slegendr@redhat.com Susan LeGendre McGhee
              Filip Suba
              Susan LeGendre McGhee Susan LeGendre McGhee
              Filip Suba Filip Suba
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: