Skip to content
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

build fails w/linux-4.4+ due to renamed linux/nvme.h include #52

Closed
vapier opened this issue May 26, 2016 · 9 comments
Closed

build fails w/linux-4.4+ due to renamed linux/nvme.h include #52

vapier opened this issue May 26, 2016 · 9 comments

Comments

@vapier
Copy link

vapier commented May 26, 2016

starting with the linux-4.4 release, the linux/nvme.h header no longer exists. it's been renamed & stripped down to linux/nvme_ioctl.h. it seems like sedutil is using a bunch of constants that the kernel guys considered "not part of the ABI", so that'll need address too.

@r0m30
Copy link
Contributor

r0m30 commented May 26, 2016

O'joy, I'll have to look at this.

@JanLuca
Copy link
Contributor

JanLuca commented May 30, 2016

Sorry that I have created a second issue for the problem but there should be a fix for the problem in the pull request #56

@bcarmo-caio
Copy link

Hi everyone.

I've been reading the project for a while and recently I had to install another distro. That's pushed me into kernel 4.4.0-45 and now I am facing this issue too.

With the help from @JanLuca, I could compile the project on my machine but instead of adding the whole nvme.h file with structures and stuff, I realized that just including the file that comes with kernel headers suffices for it to compile so I wrote another approach to try to fix this issue. imho, doing like this we are always tied up to kernel headers and we don't need to keep our own copy of it updated.

@r0m30, is this solution acceptable for the project? Can you take a look at it please? If you judge that it is acceptable, we can open a pull request and merge it to sedutil.

Before leaving, I'd like to thank you and everyone on this project. Also JanLuca for making things clear for me to compile the project.

Here is the link of the proposed solution:
bcarmo-caio@f368172

Hope to hear soon from you.

@r0m30
Copy link
Contributor

r0m30 commented Nov 29, 2016

@bcarmo-caio your solution alters the makefile, I use the Netbeans IDE for my linux dev and it treats the makefiles as it's own and will replace them as the project is updated so I can't use any method that relies on changing the makefiles

@brianjmurrell
Copy link

So what is the solution here? Two solutions have been proposed and neither (nor any other) has been adopted for almost a year now.

@r0m30
Copy link
Contributor

r0m30 commented Jul 19, 2017

Fixed in v1.15

@r0m30 r0m30 closed this as completed Jul 19, 2017
@pmorici
Copy link

pmorici commented Oct 12, 2017

This is still a problem on CentOS 7 / Redhat. It appears the kernel change that moved nvme.h to nvme_ioctl.h was back ported to the 3.10.0 kernel so checking for kernel version 4.4 using macros breaks on these systems.

@brianjmurrell
Copy link

Ahhh yes. The pitfalls of using versions as capability gates. It's always much better to test for the actual capability rather than infer it from a version.

@pmorici
Copy link

pmorici commented Oct 13, 2017

Pull request #174 resolves this issue by using autoconf to check for the nvme header instead of relying on kernel versions.

metux added a commit to oss-qm/sedutil that referenced this issue Apr 19, 2019
 The header linux/nvme.h was replaced by linux/nvme_ioctl.h in kernel versions greater than 4.4: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154
 The needed structs and opcodes are copied into a new header file from nvme.h.

Author: Jan Luca Naumann <j.naumann@fu-berlin.de>
Origin: Drive-Trust-Alliance#56
Bug: Drive-Trust-Alliance#52
Forwarded: Drive-Trust-Alliance#56
Applied-Upstream: Drive-Trust-Alliance#56
Last-Update: 2016-06-01
metux added a commit to oss-qm/sedutil that referenced this issue May 8, 2019
 The header linux/nvme.h was replaced by linux/nvme_ioctl.h in kernel versions greater than 4.4: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154
 The needed structs and opcodes are copied into a new header file from nvme.h.

Author: Jan Luca Naumann <j.naumann@fu-berlin.de>
Origin: Drive-Trust-Alliance#56
Bug: Drive-Trust-Alliance#52
Forwarded: Drive-Trust-Alliance#56
Applied-Upstream: Drive-Trust-Alliance#56
Last-Update: 2016-06-01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants