Where to get persistent-data headers?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
martijntje
Posts: 28
Joined: 2014-09-28 13:16
Been thanked: 1 time

Where to get persistent-data headers?

#1 Post by martijntje »

I'm trying to compile a kernel module that uses the persistent-data framework, but I'm having trouble identifying the package to install for it.

I'm running on Bookworm with kernel 6.11.5+bpo-amd64. I've of course installed the kernel headers. I can find the /usr/lib/modules/6.11.5+bpo-amd64/kernel/drivers/md/persistent-data/dm-persistent-data.ko.xz file, but I cannot find the accompanying header files for compilation. I've tried apt-file unsuccessfully.

Aki
Global Moderator
Global Moderator
Posts: 4056
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 113 times
Been thanked: 535 times

Re: Where to get persistent-data headers?

#2 Post by Aki »

Hello,

If I remember correctly, the linux-headers* source packages contains the linux kernel headers (from linux kernel source code) under the following directories:
  • ./ include/
  • ./arch
The headers you are interested in are under the directory:
  • ./drivers/md/persistent-data/
You can get the headers file you are interested in downloading the full linux source code tree:

Code: Select all

$ apt source linux-image-6.11.5+bpo-amd64-unsigned
$ find linux-6.11.5/ -type f -regex ".*persistent.*\.h"
linux-6.11.5/drivers/md/persistent-data/dm-bitset.h
linux-6.11.5/drivers/md/persistent-data/dm-block-manager.h
linux-6.11.5/drivers/md/persistent-data/dm-array.h
linux-6.11.5/drivers/md/persistent-data/dm-space-map.h
linux-6.11.5/drivers/md/persistent-data/dm-transaction-manager.h
linux-6.11.5/drivers/md/persistent-data/dm-btree.h
linux-6.11.5/drivers/md/persistent-data/dm-btree-internal.h
linux-6.11.5/drivers/md/persistent-data/dm-space-map-disk.h
linux-6.11.5/drivers/md/persistent-data/dm-persistent-data-internal.h
linux-6.11.5/drivers/md/persistent-data/dm-space-map-common.h
linux-6.11.5/drivers/md/persistent-data/dm-space-map-metadata.h
Hope this helps.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Alikmiankoli
Posts: 15
Joined: 2015-12-22 10:19
Been thanked: 1 time

Re: Where to get persistent-data headers?

#3 Post by Alikmiankoli »

That is why you may get the linux-headers-$(uname -r) package that should contain the matching kernel headers. If that doesn’t work, you could also try checking the libmodule or linux-modules package.

Aki
Global Moderator
Global Moderator
Posts: 4056
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 113 times
Been thanked: 535 times

Re: Where to get persistent-data headers?

#4 Post by Aki »

Hello @martijntje,

Did you make any progress ?

--
note: moved to "Programming" sub-forum.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply