On 3/19/17 11:00 AM, Ilan Schwarts wrote: > Hi, > sorry if this is a newbie question. I am newbie. > > In my kernel driver, I get device id by converting struct inode struct > to btrfs_inode, I use the code: > struct btrfs_inode *btrfsInode; > btrfsInode = BTRFS_I(inode); > > I usually download kernel-headers rpm package, this is not enough. it > fails to find the btrfs header files. > > I had to download them not via rpm package and declare: > #include "/data/kernel/linux-4.1.21-x86_64/fs/btrfs/ctree.h" > #include "/data/kernel/linux-4.1.21-x86_64/fs/btrfs/btrfs_inode.h" > > This is not good, why ctree.h and btrfs_inode.h are not in kernel headers? > Is there another package i need to download in order to get them, in > addition to kernel-headers? ? > > > I see they are not provided in kernel-header package, e.g: > https://rpmfind.net/linux/RPM/fedora/23/x86_64/k/kernel-headers-4.2.3-300.fc23.x86_64.html I don't know what Fedora package you'd use, but the core problem is that you're trying to use internal structures in an external module. We've properly exported the constants and structures required for userspace to interact with btrfs, but there are no plans to export internal structures. -Jeff -- Jeff Mahoney SUSE Labs