a7e2cc53c1
Related: rhbz#2060486 Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
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);
|