2

I was reading through a couple of BtrFS articles online. Sometimes I saw statements like

Do not use BtrFS versions older than 0.20rc1.

How can I find out which version is in my Kernel?

5
  • i think that that version is related to the btrfs toolsuit, not the module. – user448115 Sep 24 '15 at 9:44
  • Is the toolsuit and btrfs-tools the same thing? – koloman Sep 24 '15 at 17:43
  • effectively, yes – user448115 Sep 24 '15 at 17:50
  • So the question for the BtrFS driver version is mainly a question for the kernel version? – koloman Sep 25 '15 at 12:55
  • @koloman Yes, definitely. BTRFS version is tightly coupled with kernel version during the development phase. Effectively there is no such thing as "btfs version". Or any other FS version except for file systems written on top of FUSE. – Adam Ryczkowski Sep 30 '15 at 10:14
3

TLDR

Starting at Linux kernel v2.6.32 (December 2009) the BTRFS module abandoned it own separate versioning scheme. The last version before that moment was v0.19 according to official changelog.

Original answer

There are two ways to implement a filesystem in Linux:

either merge the code into the kernel, or build it as a user-space application using a "Filesystem in Userspace" framework (FUSE).

File systems implemented in kernel have better efficiency than those on top of FUSE (but this difference diminishes in time, as FUSE becomes more and more mature).

BTRFS is implemented only in kernel as a kernel module named btrfs, so it's version is tightly coupled with the kernel version. And a BTRFS kernel team contributed a lot of generic code to kernel in the process of implementing their FS. Normally you would get version information of the btrfs kernel module using command modinfo btrfs | grep -i ver, but in my case (Ubuntu 14.04) this field does not exist for btrfs.

Yes, a lot of things are implemented in kernel. That's why Linux is said to have monolithic kernel. In GNU HURD you'd have btrfs as a separate service (something like "driver") if only GNU HURD would ever be production-ready.


It is not true, that the btrfs module version is the same as btrfs-tools. They usually coincide, but they not necessarily have to. (There was a time, where btrfs-tools shipped with Ubuntu was one year behind the latest version compatible with the kernel). Btrfs-tools is intended to be backward-compatible, so a newer version can be run on older kernels, perhaps with reduced functionality if some btrfs features are not present in the kernel yet.

Again, BTRFS version is tightly coupled with kernel version during the development phase. Effectively there is no such thing as "btrfs driver version" other than in kernel.btrfs git source code commits. Or any other FS version except for file systems written on top of FUSE.

1

Starting with Linux kernel v2.6.32 (December 2009) the BTRFS module abandoned it own separate versioning scheme.

Since then just use uname -r to get the kernel version.

The last version before that was v0.19 according to official changelog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.