Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Linux 4.3 changes its include/linux/bio.h #110

Open
elmystico opened this issue Nov 24, 2015 · 13 comments
Open

Linux 4.3 changes its include/linux/bio.h #110

elmystico opened this issue Nov 24, 2015 · 13 comments

Comments

@elmystico
Copy link

I was trying to compile enhanceio on 4.3 without success.
There's problem caused by this commit on kernel (have a look at bio.h changes "block: add a bi_error field to struct bio")
also by this commit (bio.h also, "remove bio_get_nr_vecs()").
I couldn't fix it myself easly- few enhaceio source files are affected, it would be good someone experienced had a look.
Also, I'm not sure how this could be fixed without breaking older kernels support... fork?

@arddennis
Copy link

According to a mail conversation bio_get_nr_vecs was removed and now it is not necessary. At least from this words: "We can always fill up the bio now, no need to estimate the possible size based on queue parameters." I can assume that I can use something like BIO_MAX_PAGES (256) instead of bio_get_nr_vecs(). Also bio_get_nr_vecs found only several times in the code. So it should be not hard to replace.
Also, there are more errors shown when you compile against 4.3. For example, function misc_deregister currently void , but in code it tries to return its result as int.

int eio_delete_misc_device()
 {
       return misc_deregister(&eio_misc);
 }

Such coud be easy fixed by adding "return 1" and removing return from misc_deregister... I am not sure this is right way, but 10 minutes seach didn't give me an answer what this function returned before.

The same is with bio_endio which does not return any value and has only one argument...

I made changes to the code to correct compilation errors and managed to compie kernel modules for 4.3, but this simply not enough. Code needs to be checked thoughtfully. I get errors during cache creation:

[Errno 22] Invalid argument 

And this

enhanceio: Setting mode to write through get_policy: policy 2 found
enhanceio_lru: eio_lru_instance_init: created new instance of LRUenhanceio: Setting replacement policy to lru (2)
enhanceio: md_create: Could not read superblock sector 128 error 4096 for cache "*****"

@storcium
Copy link

Same here, unable to compile under 4.3.3

@flrichar
Copy link

flrichar commented Jan 6, 2016

Whom do we have to bribe to patch this? A truckload of beer isn't going to drink itself.

@qm3ster
Copy link

qm3ster commented Feb 3, 2016

@elmystico
Copy link
Author

Gentlemen @bhansaliakhil @deepenmehta85

Do you know anything about the future of this issue? Is there anyone working on it, any plans?

@storcium
Copy link

Is there anything we can do to help motivate this process? I can get some
company funds for Bountysource or whatever will help.

Alex Gorbachev
Storcium

On Fri, Feb 19, 2016 at 6:58 AM, elmystico [email protected] wrote:

Gentlemen @bhansaliakhil https://github.com/bhansaliakhil @deepenmehta85
https://github.com/deepenmehta85

Do you know anything about the future of this issue? Is there anyone
working on it, any plans?


Reply to this email directly or view it on GitHub
#110 (comment).

@sjlongland
Copy link

Just stumbled on this trying to build against kernel 4.4.6. I had a quick look at the repositories suggested by @qm3ster: one appears to be just targeted at fixing build issues under Red Hat, the other, not so sure.

Not looking forward to trying to patch this myself, but I will if I must.

@sjlongland
Copy link

Actually, scratch that: there's a patched version here:
https://github.com/lanconnected/EnhanceIO
and some further clean-ups here:
https://github.com/impossibleventures/EnhanceIO

@elmystico
Copy link
Author

@sjlongland have you used it? Everything's ok?

@sjlongland
Copy link

On 02/05/16 19:04, elmystico wrote:

@sjlongland https://github.com/sjlongland have you used it?
Everything's ok?

Not yet, but I will do so in the coming weeks. It compiles at least,
which is a big step forward in my book.

https://hackaday.io/project/10529-solar-powered-cloud-computing ← I'm
waiting on some parts for that project so I can run the cluster 24/7
with the charger connected, then I should be able to do some experiments

with EnhanceIO and dm-cache.

Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
...it's backed up on a tape somewhere.

@elmystico
Copy link
Author

to @sjlongland and others information
Hi!
Kernel part seems flawless- I'm using it for few weeks now with btrfs/raid/md without problem (linux 4.4/4.5/4.6) Userspace part was messy though.
I've just finished fixing eio_cli regarding udev and systemd, works fine.
I've lost few days for this damn thing but I'm satisfied.
As soon as I find some time I'll send patches.
Stay tuned.

@elmystico
Copy link
Author

@sjlongland
Works with linux 4.6 and systemd
https://github.com/elmystico/EnhanceIO

@raxip
Copy link

raxip commented Aug 31, 2016

@elmystico
I tried your git branch on ubuntu 16.04 with kernel 4.4.0-34 and it's broken. It compiled and installed, and allowed me to create a cache, but shortly thereafter it crashed. The filesystem became unresponsive, and it wouldn't let me delete the cache either.

I had to hard boot the server, and enhanceio could not load the cache on boot up.
[ 97.465486] enhanceio: module verification failed: signature and/or required key missing - tainting kernel
[ 97.704849] enhanceio: md_load: Cache superblock mismatch detected. (current: 3, ondisk: 0)
[ 97.704853] enhanceio: md_load: Can't enable cache . Either superblock version is invalid or cache has been deleted
[ 97.759607] enhanceio: Cache metadata loaded from disk with 0 valid 0 dirty blocks
[ 97.759618] enhanceio: Cache creation failed: Failed to reload cache.
[ 126.599099] enhanceio: Cache creation failed: get_device for cache device failed.
[ 126.685175] enhanceio: Cache creation failed: get_device for cache device failed.
[ 126.728092] enhanceio: Cache creation failed: get_device for cache device failed.
[ 126.767133] enhanceio: Cache creation failed: get_device for cache device failed.
[ 126.865539] enhanceio: Cache creation failed: get_device for cache device failed.

How do I either fix or completely remove enhanceio?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants