Coder Social home page Coder Social logo

Comments (5)

hbouma avatar hbouma commented on August 21, 2024

Switching to the 5.4 kernel on the elrepo also got it to compile so I dug deeper. It looks like linux changed the part_stat_lock in the kernel 2 years ago to use the preempt enable/disable macros instead and redhat has backported it already into their 4.18 kernel. The normal 5.4 kernel is older than this so it doesn't have the new macros. The new macro doesn't like it when you have cpu = part_stat_lock() . I just removed the cpu = and its fine again. (I don't program every day right now so silly stuff like this evades me longer than it should lol).

from btier-2.x.

mruijter avatar mruijter commented on August 21, 2024

Switching to the 5.4 kernel on the elrepo also got it to compile so I dug deeper. It looks like linux changed the part_stat_lock in the kernel 2 years ago to use the preempt enable/disable macros instead and redhat has backported it already into their 4.18 kernel. The normal 5.4 kernel is older than this so it doesn't have the new macros. The new macro doesn't like it when you have cpu = part_stat_lock() . I just removed the cpu = and its fine again. (I don't program every day right now so silly stuff like this evades me longer than it should lol).

I assume that it all works now. Distros that port kernels changes from newer to older kernels can be problematic. I don't have the time to test all combinations. For now a close to 5.4 kernel (Ubuntu, SuSE) are the best choice. I still need to test with Ubuntu 22.04 and the latest vanilla kernels.

from btier-2.x.

hbouma avatar hbouma commented on August 21, 2024

Yeah, I mean this will be a future problem for you as more distros start using these mainline kernel changes from 2020. The cpu = part_stat_lock will error because they changed the underlining macros.

from btier-2.x.

hbouma avatar hbouma commented on August 21, 2024

Also, FYI, I had to change the kernel check the line below the part_stat_lock from the 5.x to 4,18 for RHEL 8

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
part_stat_inc(&dev->gd->part0, ios[rw]);

I also had to change revalidate_disk to be revalidate_disk_size in register_new_device_size in btier_main.c

Double FYI, mainline kernel has factored out genhd.h as well in January so it no longer exists.

I can create a RHEL define like you did with ubuntu and make these changes and submit them if you want. I also just wanted to say, I don't know if you remember my posts on sourceforge in 2016 from when I started using btier, but its been totally rock solid this whole time so thank you so much for writing this. Well, 1.3.11 has been solid, I'm hoping 2.x will be great this time around as I finally get off RHEL 6 for 8. I haven't had any file system corruption this whole time even when my servers crash. I am still surprised that there still isn't anything like this out there. But thanks again for writing this!

from btier-2.x.

mruijter avatar mruijter commented on August 21, 2024

Should be working now when you define RHEL86

from btier-2.x.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.