diff --git a/fix_the_build.patch b/fix_the_build.patch new file mode 100644 index 0000000..32659a8 --- /dev/null +++ b/fix_the_build.patch @@ -0,0 +1,36 @@ +diff -Naur kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11.orig/vdo/bio.c kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11/vdo/bio.c +--- kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11.orig/vdo/bio.c 2022-03-04 15:55:42.000000000 -0500 ++++ kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11/vdo/bio.c 2022-06-28 16:19:04.181376685 -0400 +@@ -186,7 +186,7 @@ + unsigned int i; + #endif // >= 5.1.0 + +- bio_reset(bio); // Memsets most of the bio to reset most fields. ++ bio_reset(bio, bio->bi_bdev, bi_opf); // Memsets most of the bio to reset most fields. + vdo_set_bio_properties(bio, vio, callback, bi_opf, pbn); + if (data == NULL) { + return VDO_SUCCESS; +@@ -258,8 +258,8 @@ + { + // Use __bio_clone_fast() to copy over the original bio iovec + // information and opflags. +- bio_reset(bio); +- __bio_clone_fast(bio, user_bio); ++ bio_reset(bio, bio->bi_bdev, bi_opf); ++ bio_init_clone(user_bio->bi_bdev, bio, user_bio, GFP_KERNEL); + vdo_set_bio_properties(bio, vio, callback, bi_opf, pbn); + } + +diff -Naur kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11.orig/vdo/vdo.c kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11/vdo/vdo.c +--- kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11.orig/vdo/vdo.c 2022-03-04 15:55:42.000000000 -0500 ++++ kvdo-e209cfeb3fe1dfac03b34041a3deefdb077e3e11/vdo/vdo.c 2022-06-28 16:02:37.202376685 -0400 +@@ -207,7 +207,8 @@ + int result; + struct bio bio; + +- bio_init(&bio, 0, 0); ++ bio_init(&bio, get_vdo_backing_device(vdo), 0, 0, ++ REQ_OP_WRITE | REQ_PREFLUSH); + bio_set_dev(&bio, get_vdo_backing_device(vdo)); + bio.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; + submit_bio_wait(&bio); diff --git a/kmod-kvdo.spec b/kmod-kvdo.spec index 4a30b19..adcbf46 100644 --- a/kmod-kvdo.spec +++ b/kmod-kvdo.spec @@ -12,6 +12,7 @@ %define kmod_devel_package 0 Source0: https://github.com/dm-vdo/%{kmod_name}/archive/%{commit}/%{kmod_name}-%{shortcommit}.tar.gz +Patch1: fix_the_build.patch %define findpat %( echo "%""P" ) @@ -103,6 +104,7 @@ printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --dracut=/usr/bin/dracu %prep %setup -n %{kmod_name}-%{commit} +%patch1 -p1 %{nil} set -- * mkdir source @@ -151,6 +153,10 @@ install -m 644 -D source/greylist.txt $RPM_BUILD_ROOT/usr/share/doc/kmod-%{kmod_ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jun 28 2022 - Susan LeGendre-McGhee - 8.1.1.371-36 +- TEMPORARY FIX to correct build failures regarding bio_reset(), __bio_clone_fast(), and bio_init(). +- Related: rhbz#2060486 + * Tue Jun 28 2022 - Susan LeGendre-McGhee - 8.1.1.371-36 - Rebuilt for latest kernel. - Related: rhbz#2060486