-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kernel_5.8 #229
kernel_5.8 #229
Conversation
Fixes allow to compile module on the kernel 5.8. But there is a problem. Since kernel 5.8 make_request_fn can be null.
@@ -931,13 +931,30 @@ static const struct seq_operations dattobd_seq_proc_ops = { | |||
.show = dattobd_proc_show, | |||
}; | |||
|
|||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The KERNEL_VERSION
comparison is not usable, because features can be backported. You need to add tests to src/configure-tests/feature-tests
to check for any changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I did it quickly so that it would compile.
I am concerned about a problem with the null make_request_fn.
[root@localhost tests]# ./test_snapshot.py
FFF
======================================================================
FAIL: test_modify_origin (__main__.TestSnapshot)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/dattobd/tests/./test_snapshot.py", line 39, in test_modify_origin
self.assertEqual(dattobd.setup(self.minor, self.device, self.cow_full_path), 0)
AssertionError: 22 != 0
======================================================================
FAIL: test_next_available_minor (__main__.TestSnapshot)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/dattobd/tests/./test_snapshot.py", line 78, in test_next_available_minor
self.assertEqual(dattobd.setup(0, self.device, self.cow_full_path), 0)
AssertionError: 22 != 0
======================================================================
FAIL: test_track_writes (__main__.TestSnapshot)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/dattobd/tests/./test_snapshot.py", line 56, in test_track_writes
self.assertEqual(dattobd.setup(self.minor, self.device, self.cow_full_path), 0)
AssertionError: 22 != 0
----------------------------------------------------------------------
Ran 3 tests in 0.327s
FAILED (failures=3)
[root@localhost tests]# dmesg | tail -40
[71924.486158] datto: checking block device is not already being traced
[71924.486158] datto: fetching the absolute pathname for the base device
[71924.486161] datto: calculating block device size and offset
[71924.486162] datto: bdev size = 524288, offset = 0
[71924.486163] datto: creating cow manager
[71924.486163] datto: allocating cow manager, seqid = 1
[71924.486164] datto: creating cow file
[71924.486212] datto: allocating cow manager array (16 sections)
[71924.486214] datto: allocating cow file (26843545 bytes)
[71924.486429] datto: finding cow file inode
[71924.486430] datto: getting relative pathname of cow file
[71924.486501] datto: allocating queue
[71924.486516] datto: setting up make request function
[71924.486517] datto: setting queue limits
[71924.486518] datto: allocating gendisk
[71924.486521] datto: initializing gendisk
[71924.486521] datto: naming gendisk
[71924.486522] datto: block device size: 524288
[71924.486523] datto: adding disk
[71924.487090] datto: starting mrf kernel thread
[71924.488296] datto: creating kernel cow thread
[71924.488405] datto: getting the base block device's make_request_fn
[71924.488406] datto: make_request_fn is null: -22
[71924.489153] datto: error setting up tracing: -22
[71924.489930] datto: error setting up tracer as active snapshot: -22
[71924.490643] datto: stopping cow thread
[71924.491842] datto: stopping mrf thread
[71924.491950] datto: freeing gendisk
[71924.492322] datto: freeing request queue
[71924.496350] datto: freeing cow path
[71924.496351] datto: destroying cow manager
[71924.496370] datto: freeing base block device path
[71924.496370] datto: freeing base block device
[71924.496373] datto: error during setup ioctl handler: -22
[71924.497217] datto: minor range = 23 - 0
[71924.531768] datto: module exit
[71924.531768] datto: unregistering control device
[71924.532255] datto: unregistering /proc file
[71924.532257] datto: destroying snap devices
[71924.532258] datto: unregistering device driver from the kernel
so dattobd will not work on >=5.8 kernels at the moment? |
Of course not. And it won't work because struct queue since v5.9 doesn't have a make_request_fn callback. I'm trying to suggest an alternative hook. The latest version was suggested by Hannes https://lwn.net/Articles/837944/, but so far without success. |
As Ubuntu 20.04 switched to kernel 5.8 I think this PR should get more attention |
"more attention" - Yeah. Exactly. |
anyway, I have applied your patch on Ubuntu 20.04 with 5.8 and built/installed the module. urbackup is able to successfully use it for backups, so thanks for it. |
Manjaro(ArchLinux) use 5.10 (5.11 for testing). |
@lacikaaa you mentioned you applied a patch Jan 15 provided by CodeImp. Can you provide the patch and details how to apply. Do I compile from source? I'm also trying to use this w/urbackup beta for linux. |
@silverspr the source after installing the package is under
unfortunately you have to do this every time you have a new kernel |
Fixes allow to compile module on the kernel 5.8.
But there is a problem. Since kernel 5.8 make_request_fn can be null.