Btrfs source repositories
Since 2.6.29-rc1, Btrfs has been included in the mainline kernel.
Warning, Btrfs evolves very quickly do not test it unless:
- You have good backups and you have tested the restore capability
- You have a backup installation that you can switch to when something breaks
- You are willing to report any issues you find
- You can apply patches and compile the latest btrfs code against your kernel (quite easy with git and dkms, see below)
- You acknowledge that btrfs may eat your data
- Backups! Backups! Backups!
Everyone tests with the latest btrfs code from git. Even the latest Linus kernel probably doesn't have the latest, so if you're really interested in using and testing btrfs, get btrfs from git. Distributions usually offer a way to install a kernel built from git.
The git repositories that are not normally used for development but rather for the final pull requests that go to Linus:
- https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git -- pull requests, branch for-next gets pulled to the linux-next tree
- https://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git -- pull requests
The following git repositories are used for development and are updated with patches from the mailinglist:
http://repo.or.cz/linux-2.6/btrfs-unstable.git-- not used anymore
Branches are usually pushed to both repositories, either can be used.
- topic branches, eg. from a patchset
- queue with patches for current release cycle (the name has the version, eg for-4.15 or misc-4.15).
- queue with patches for next development cycle (branch name misc-next),
- snapshots of for-next, that contain all of the above
Note that the branches get rebased. The base point for patches depend on the development phase. See Developer's_FAQ#Development_schedule. Independent changes can be based on the linus/master branch, changes that could depend on patches that have been added to one of the queues should use that as a base.
btrfs-progs git repository
The sources of the userspace utilities can be obtained from these repositories:
- git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git (gitweb access) -- release repisotiry, not for development
The master branch contains the latest released version and is never rebased.
Development git repositories:
- git://github.com/kdave/btrfs-progs.git (web access)
- git://gitlab.com/kdave/btrfs-progs.git (web access)
git://repo.or.cz/btrfs-progs-unstable/devel.git (web access)-- not used anymore
For build dependencies and installation instructions please see 
The latest development branch is called devel. Contains patches that are reviewed or tested and on the way to the next release. When a patch is added to the branch, a mail notification is sent as a reply to the patch.
The git repositories on kernel.org are not used for development or integration branches.
Integration branches collect patches that may need public testing and are provided for convenience to developers or users willing to test unstable version. The patches in these branches are not guaranteed to be merged. The branches are assembled from scratch and serve more like a snapshots than stable bases for other development.
where YYYYMMDD is the date of the branch.
To check out this repository, and select the latest branch, use:
git clone git://github.com/kdave//btrfs-progs.git cd btrfs-progs git checkout integration-YYYYMMDD
Note that this branch can be rebased when there's good reason for that (adding Reported-by/Reviewed-by tags to the middle of the patch series) or if there's a change needed down the patch stack in general. The point is to keep the git history clean.
Note to GitHub users
The pull requests will not be accepted directly, the preferred way is to send patches to the mailinglist instead. You can link to a branch in any git repository if the mails do not make it to the mailinglist or for convenience.
The development model of btrfs-progs shares a lot with the kernel model. The github way is different in some ways. We, the upstream community, expect that the patches meet some criteria (often lacking in github contributions):
- proper subject line: eg. prefix with btrfs-progs: subpart, ... , descriptive yet not too long
- proper changelog: the changelogs are often missing or lacking explanation why the change was made, or how is something broken, what are user-visible effects of the bug or the fix, how does an improvement help or the intended usecase
- the Signed-off-by line: this document who authored the change, you can read more about the The Developer's Certificate of Origin here (chapter 11)
- one logical change per patch: eg. not mixing bugfixes, cleanups, features etc., sometimes it's not clear and will be usually pointed out during reviews
Administration and support tools
There is a separate repository of useful scripts for common administrative tasks on btrfs. This is at:
Patches sent to mailinglist
A convenient interface to get an overview of patches and the related mail discussions can be found at https://patchwork.kernel.org/project/linux-btrfs/list/ .
It is possible to directly apply a patch by pasting the mbox link from the patch page to the command
$ wget -O - 'https://patchwork.kernel.org/patch/123456/mbox' | git am -
you may want to add --reject, or decide otherwise what to do with the patch.