veeam / veeamsnap

Veeam Agent for Linux kernel module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to patch Linux Kernel 5.10.24 on debian 10

Raptor039 opened this issue · comments

Hello,

I'm trying to bypass the problematic encountered by veeam with Linux kernel > 5.8.

I downloaded Linux kernel sources on debian and when I want to patch the kernel by following your instructions, an error occurs with the patch v5-0003-block-add-blk_interposer.patch and genhd.c source file.

Below the log output from patch command :

root@debian-vm:~/linux/linux-source-5.10# patch -p1 <../v5-0002-block-add-blk_mq_is_queue_frozen.patch
patching file block/blk-mq.c
Hunk #1 succeeded at 159 (offset -2 lines).
patching file include/linux/blk-mq.h
Hunk #1 succeeded at 524 (offset -1 lines).
root@debian-vm:~/linux/linux-source-5.10# patch -p1 <../v5-0003-block-add-blk_interposer.patch
patching file block/bio.c
patching file block/blk-core.c
Hunk #1 succeeded at 1031 (offset -1 lines).
Hunk #2 succeeded at 1084 (offset -1 lines).
patching file block/genhd.c
Hunk #1 FAILED at 30.
Hunk #2 succeeded at 2367 (offset 218 lines).
1 out of 2 hunks FAILED -- saving rejects to file block/genhd.c.rej
patching file include/linux/blk_types.h
Hunk #1 succeeded at 207 (offset -20 lines).
Hunk #2 succeeded at 284 (offset -20 lines).
Hunk #3 succeeded at 304 (offset -20 lines).
patching file include/linux/genhd.h
Hunk #1 succeeded at 164 (offset 30 lines).
Hunk #2 succeeded at 195 (offset 30 lines).
Hunk #3 succeeded at 417 (offset 63 lines).
root@debian-vm:~/linux/linux-source-5.10# 

I also tried with a mainstream kernel from kernel.org (5.11.16, latest stable) and it works fine.

Can you help me to debug and solve this issue ?

Thanks a lot for your help.

I apologize for the delay in answering.
I'll take a look.

Hi.
Check please https://github.com/veeam/veeamsnap/tree/experimental/blk_interposer/patch-v5_for_v5.11.11.
It's should work on the latest stable and lts kernels.
There were no changes, just had to rebuild the patch due to changes in gendisk. c.

@CodeImp, I just finished to build the kernel and it works like a charm! No more issue when patches were applied to kernel sources which didn't work before.

I'm really greatful to you to permit me to restore veeam capabilities as my main OS backup solution for my NAS and PC!

image

Have a nice weekend!