-
Notifications
You must be signed in to change notification settings - Fork 418
Linux 4.4 build failure. #215
Comments
/var/lib/dkms/flashcache/1.0-238-gca7a593606ea/build/flashcache_subr.c: В функции «flashcache_bio_endio»: |
it's due to the API change in 4.3 My driver fixed this problem as I suppose flash cache can fix this issue too
On Sat, Jan 23, 2016 at 7:23 PM, Alexander Babenko <notifications@github.com
Akira Hayakawa |
I will note that the fix proposed here fixes the second simpler issue with flashcache against 4.4. The ioctl issue remains. A quick look at the change in the kernel implies they have removed the ioctl interface for DM devices, only allowing pass through of ioctls to disks underneath. That appears to preclude adding additional ioctls at the dm level. |
I did start an upstream conversation on this. They appear uninterested in this use case: https://lkml.org/lkml/2016/1/28/414 |
Ok, we had some further discussion upstream about how this is "meant" to be done. It seems there is a target message system for this kind of thing, essentially an existing ioctl which can carry data to and from the target. I attempted to convert the existing support over to this and have (frankly) bodged the existing user space tooling to use this via a call out to "dmsetup message". I am sure this is not the final form of the fix, but hope it at least sparks development in the right direction. I have uploaded flashcache into Ubuntu with this change. I will also proposed a merge-request with this change. |
…anipulation In mainline 4.4 the ioctl() callback in the DM target has been removed in favour of a prepare_ioctl() which selects the underlying device, all ioctls are assume to apply to that. In discussions with upstream on resolving this it was suggested that the correct mechanism for this kind of target focussed ioctl is actually DM target messages. This patch converts the blacklist/whitelist manipulation over to these DM target messages. It also adds rather primative support to the flashcache_setioctl helper to switch to DM target messages when the existing ioctls are not supported (ENOTTY). This is handled by calling out to dmsetup which offers a message command to form these requests. I would envisage it would be possible to reduce flashcache_setioctl to a simple shell script in the future once there is no possibility of these tools being used with a kernel supporting the ioctl only. This should fix the hard parts of issue facebookarchive#215. fixes: facebookarchive#215 Signed-off-by: Andy Whitcroft <apw@ubuntu.com>
Well that did not quite work as expected. #216 is the pull request for the originally reported issue in this bug. The bio_end part is straight forward. |
…anipulation In mainline 4.4 the ioctl() callback in the DM target has been removed in favour of a prepare_ioctl() which selects the underlying device, all ioctls are assume to apply to that. In discussions with upstream on resolving this it was suggested that the correct mechanism for this kind of target focussed ioctl is actually DM target messages. This patch converts the blacklist/whitelist manipulation over to these DM target messages. It also adds rather primative support to the flashcache_setioctl helper to switch to DM target messages when the existing ioctls are not supported (ENOTTY). This is handled by calling out to dmsetup which offers a message command to form these requests. I would envisage it would be possible to reduce flashcache_setioctl to a simple shell script in the future once there is no possibility of these tools being used with a kernel supporting the ioctl only. This should fix the hard parts of issue facebookarchive#215. fixes: facebookarchive#215 Signed-off-by: Andy Whitcroft <apw@ubuntu.com>
Fixed for my Gentoo 4.4.39 in the next way:
Then, disabled module signing control and rebuilt the kernel. Works like a charm. P.S. The code with patches are cloned from Debian upstream flashcache packages. |
…anipulation In mainline 4.4 the ioctl() callback in the DM target has been removed in favour of a prepare_ioctl() which selects the underlying device, all ioctls are assume to apply to that. In discussions with upstream on resolving this it was suggested that the correct mechanism for this kind of target focussed ioctl is actually DM target messages. This patch converts the blacklist/whitelist manipulation over to these DM target messages. It also adds rather primative support to the flashcache_setioctl helper to switch to DM target messages when the existing ioctls are not supported (ENOTTY). This is handled by calling out to dmsetup which offers a message command to form these requests. I would envisage it would be possible to reduce flashcache_setioctl to a simple shell script in the future once there is no possibility of these tools being used with a kernel supporting the ioctl only. This should fix the hard parts of issue facebookarchive#215. fixes: facebookarchive#215 Signed-off-by: Andy Whitcroft <apw@ubuntu.com>
flashcache does not build with Linux 4.4.
CC [M] flashcache/src/flashcache_conf.o
flashcache/src/flashcache_conf.c:1718:2: error: unknown field ‘ioctl’ specified in initializer
.ioctl = flashcache_ioctl,
^
The build failure is introduced with Linux 4.4-rc1 commit e56f81e0b01ef4e45292d8c1e19edd4d09724e14 "dm: refactor ioctl handling".
commit e56f81e0b01ef4e45292d8c1e19edd4d09724e14
Author: Christoph Hellwig hch@lst.de
Date: Thu Oct 15 14:10:50 2015 +0200
The text was updated successfully, but these errors were encountered: