pax_global_header 0000666 0000000 0000000 00000000064 14771053764 0014530 g ustar 00root root 0000000 0000000 52 comment=5ad147c9ec00e657393c85b195c9bcc0f4c35a54
btrfs-progs-6.14/ 0000775 0000000 0000000 00000000000 14771053764 0013732 5 ustar 00root root 0000000 0000000 btrfs-progs-6.14/.codespellrc 0000664 0000000 0000000 00000000442 14771053764 0016232 0 ustar 00root root 0000000 0000000 [codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*,*.svg,*.css,.codespellrc,fsck-tests
check-hidden = true
ignore-regex = \b(Yann Collet|TOI)\b
# annote - used as a noun
# iput - function name
ignore-words-list = annote,annotes,iput,uptodate
btrfs-progs-6.14/.editorconfig 0000664 0000000 0000000 00000000234 14771053764 0016406 0 ustar 00root root 0000000 0000000 [*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
indent_size = 8
[*.py]
indent_size = 4
btrfs-progs-6.14/.github/ 0000775 0000000 0000000 00000000000 14771053764 0015272 5 ustar 00root root 0000000 0000000 btrfs-progs-6.14/.github/workflows/ 0000775 0000000 0000000 00000000000 14771053764 0017327 5 ustar 00root root 0000000 0000000 btrfs-progs-6.14/.github/workflows/artifacts-static-build.yml 0000664 0000000 0000000 00000003366 14771053764 0024424 0 ustar 00root root 0000000 0000000 # Build static binaries (published as artifacts)
# - btrfs.static - the main tool
# - btrfs.box.static - all-in-one tool (functionality selected by file name)
name: Static binaries
run-name: Static binaries
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation
- name: Make static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' static
- name: Make box.static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' btrfs.box.static
- name: Strip binaries
run: strip btrfs.static btrfs.box.static
- name: Calculate SHA256 checksums
run: |
sha256sum btrfs.static | tee btrfs.static.sha256
sha256sum btrfs.box.static | tee btrfs.box.static.sha256
- name: Save artifacts - btrfs.static
uses: actions/upload-artifact@v4
with:
name: btrfs.static
path: btrfs.static
- name: Save artifacts - btrfs.static.sha256
uses: actions/upload-artifact@v4
with:
name: btrfs.static.sha256
path: btrfs.static.sha256
- name: Save artifacts - btrfs.box.static
uses: actions/upload-artifact@v4
with:
name: btrfs.box.static
path: btrfs.box.static
- name: Save artifacts - btrfs.box.static.sha256
uses: actions/upload-artifact@v4
with:
name: btrfs.box.static.sha256
path: btrfs.box.static.sha256
btrfs-progs-6.14/.github/workflows/ci-build-test.yml 0000664 0000000 0000000 00000012606 14771053764 0022524 0 ustar 00root root 0000000 0000000 # Backward compatibility build tests on various distros
#
# - all compatibility docker image build tests (no local build)
# - images are not rebuilt when the workflow runs but are pulled from docker hub
# and can be slightly out of date
name: CI image tests
run-name: CI image tests
on:
push:
branches:
- "ci/**"
- devel
- release-test
- master
jobs:
check-centos7:
name: CI Centos 7
runs-on: ubuntu-24.04
steps:
- name: CI Centos7
run: sudo docker run kdave/ci-centos-7-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-libudev
check-centos8:
name: CI Centos 8
runs-on: ubuntu-24.04
steps:
- name: CI Centos8
run: sudo docker run kdave/ci-centos-8-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-zoned --disable-libudev
check-rockylinux9:
name: CI RockyLinux 9
runs-on: ubuntu-24.04
steps:
- name: CI RockyLinux 9
run: sudo docker run kdave/ci-rockylinux-9-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation
check-leap153:
name: CI Leap 15.3
runs-on: ubuntu-24.04
steps:
- name: CI Leap 15.3
run: sudo docker run kdave/ci-opensuse-leap-15.3-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-zoned
check-leap156:
name: CI Leap 15.6
runs-on: ubuntu-24.04
steps:
- name: CI Leap 15.6
run: sudo docker run kdave/ci-opensuse-leap-15.6-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-zoned
check-musl:
name: CI Musl
runs-on: ubuntu-24.04
steps:
- name: CI Musl
run: sudo docker run kdave/ci-musl-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev
- name: CI Musl (experimental)
run: sudo docker run kdave/ci-musl-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev --enable-experimental
check-musl-32bit:
name: CI Musl (32bit)
# Pin the version, on 24.04 it fails:
# make: *** pselect jobs pipe: Function not implemented. Stop.
# make: *** Waiting for unfinished jobs....
runs-on: ubuntu-22.04
steps:
- name: CI Musl (32bit)
run: sudo docker run kdave/ci-musl-i386 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev
- name: CI Musl (32bit) (experimental)
run: sudo docker run kdave/ci-musl-i386 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev --enable-experimental
check-tumbleweed:
name: CI Tumbleweed
runs-on: ubuntu-24.04
steps:
- name: CI Tumbleweed
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation
- name: CI Tumbleweed (experimental)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --enable-experimental
check-tumbleweed-libgcrypt:
name: CI Tumbleweed (libgcrypt)
runs-on: ubuntu-24.04
steps:
- name: CI Tumbleweed (libgcrypt)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=libgcrypt
- name: CI Tumbleweed (libgcrypt) (experimental)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=libgcrypt --enable-experimental
check-tumbleweed-libsodium:
name: CI Tumbleweed (libsodium)
runs-on: ubuntu-24.04
steps:
- name: CI Tumbleweed (libsodium)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=libsodium
- name: CI Tumbleweed (libsodium) (experimental)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=libsodium --enable-experimental
check-tumbleweed-libkcapi:
name: CI Tumbleweed (libkcapi)
runs-on: ubuntu-24.04
steps:
- name: CI Tumbleweed (libkcapi)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=libkcapi
- name: CI Tumbleweed (libkcapi) (experimental)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=libkcapi --enable-experimental
check-tumbleweed-botan:
name: CI Tumbleweed (Botan)
runs-on: ubuntu-24.04
steps:
- name: CI Tumbleweed (Botan)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=botan
- name: CI Tumbleweed (Botan) (experimental)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=botan --enable-experimental
check-tumbleweed-openssl:
name: CI Tumbleweed (OpenSSL)
runs-on: ubuntu-24.04
steps:
- name: CI Tumbleweed (OpenSSL)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=openssl
- name: CI Tumbleweed (OpenSSL) (experimental)
run: sudo docker run kdave/ci-opensuse-tumbleweed-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --with-crypto=openssl --enable-experimental
btrfs-progs-6.14/.github/workflows/codeql.yml 0000664 0000000 0000000 00000005225 14771053764 0021325 0 ustar 00root root 0000000 0000000 # CodeQL security checks (Advanced)
#
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# - https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# - https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
# - https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
#
# Queries:
# - https://docs.github.com/en/code-security/code-scanning/managing-your-code-scanning-configuration/c-cpp-built-in-queries
name: "CodeQL (Advanced)"
run-name: "CodeQL (Advanced)"
on:
push:
branches: [ "devel", "master" ]
pull_request:
branches: [ "devel" ]
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
# (Add any setup steps before running the `github/codeql-action/init` action.)
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# (Custom queries)
queries: security-extended,security-and-quality
- name: Update package cache
run: sudo apt-get update -qqq
- name: Add more build dependencies
run: sudo apt-get install -y liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev
- if: matrix.build-mode == 'manual'
shell: bash
run: |
./autogen.sh
./configure --disable-documentation --enable-experimental
make -j 4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
btrfs-progs-6.14/.github/workflows/codespell.yml 0000664 0000000 0000000 00000001372 14771053764 0022027 0 ustar 00root root 0000000 0000000 # Check for typos on devel and pull rquests
# - codespell configuration is within .codespellrc
# - the workflow can be run separately from other workflows that trigger on
# ci/* branches, use codespell/* as the prefix
name: Codespell
run-name: Codespell
on:
push:
branches:
- devel
- 'ci/**'
- 'codespell/**'
pull_request:
branches:
- devel
- 'ci/**'
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
btrfs-progs-6.14/.github/workflows/coverage.yml 0000664 0000000 0000000 00000004406 14771053764 0021651 0 ustar 00root root 0000000 0000000 # Code coverage when running all the tests, lcov published as artifacts
name: Code coverage tests
run-name: Code coverage tests
on:
push:
branches:
- coverage-test
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq lcov
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation
- name: Make
run: make V=1 D=gcov
- name: Tests cli
run: sudo make D=gcov TEST_LOG=dump test-cli
- name: Tests mkfs
run: sudo make D=gcov TEST_LOG=dump test-mkfs
- name: Tests check
run: sudo make D=gcov TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make D=gcov TEST_LOG=dump test-check-lowmem
- name: Tests misc
run: sudo make D=gcov TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make D=gcov TEST_LOG=dump test-fuzz
- name: Tests convert
run: sudo make D=gcov TEST_LOG=dump test-convert
- name: Test internal APIs
run: make D=gcov test-api
- name: Libbtrfsutil test
run: make D=gcov test-libbtrfsutil
- name: Libbtrfs build test
run: make D=gcov library-test
- name: Tests hash (correctness)
run: make D=gcov hash-vectest && ./hash-vectest
- name: Generate lcov results
run: |
lcov -c -d . -o lcov-info
genhtml --rc geninfo_unexecuted_blocks=1 -o lcov-out lcov-info
- name: Save lcov results
uses: actions/upload-artifact@v4
with:
name: lcov-out
path: lcov-out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/lcov-info
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "tests/*-results.txt"
if-no-files-found: ignore
btrfs-progs-6.14/.github/workflows/devel.yml 0000664 0000000 0000000 00000017334 14771053764 0021161 0 ustar 00root root 0000000 0000000 # Workflow for testing branch 'devel'
# - build tests
# - various runtime tests
name: Devel build and tests
run-name: Devel build and tests
on:
push:
branches:
- devel
- 'ci/**'
- 'CI/**'
jobs:
build-simple:
name: Simple build tests, manual page build test
strategy:
matrix:
compiler: [ gcc, clang ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx sphinx-rtd-theme-common python3-sphinx-rtd-theme
- name: Configure
run: ./autogen.sh && CC=${{ matrix.compiler }} ./configure --enable-experimental
- name: Documentation
run: make V=1 -C Documentation
- name: Generate manual pages preview (html)
if: ${{ matrix.compiler == 'gcc' }}
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed, generate preview to summary"
Documentation/html-preview.sh "$file" >> $GITHUB_STEP_SUMMARY
done
- run: echo '
' >> $GITHUB_STEP_SUMMARY
- name: Generate manual pages preview (man)
if: ${{ matrix.compiler == 'gcc' }}
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed, generate preview to summary"
Documentation/man-preview.sh "$file" >> $GITHUB_STEP_SUMMARY
done
- name: Make static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' static
- name: Make box.static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' btrfs.box.static
build-musl:
name: Build test on musl
runs-on: ubuntu-24.04
steps:
- name: Musl build
run: sudo docker run kdave/ci-musl-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev
test-quick:
name: Quick tests
strategy:
matrix:
compiler: [ gcc, clang ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && CC=${{ matrix.compiler }} ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
- name: Test internal APIs
run: make test-api
- name: Libbtrfsutil test
run: make test-libbtrfsutil
- name: Libbtrfs build test
run: make library-test
- name: Libbtrfs build test (static)
run: make library-test.static
- name: Tests ioctl
run: make ioctl-test
- name: Tests hash (speed)
run: make hash-speedtest && ./hash-speedtest 1
- name: Tests hash (correctness)
run: make hash-vectest && ./hash-vectest
test-mkfs:
name: Test mkfs.btrfs
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
- name: Tests mkfs
run: sudo make TEST_LOG=dump test-mkfs
- name: Save logs to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: mkfs-tests-results.txt
path: tests/mkfs-tests-results.txt
if-no-files-found: ignore
test-check:
name: Test btrfs check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
- name: Tests check
run: sudo make TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make TEST_LOG=dump test-check-lowmem
- name: Save logs to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: fsck-tests-results.txt
path: tests/fsck-tests-results.txt
if-no-files-found: ignore
test-misc:
name: Test misc
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
- name: Tests misc
run: sudo make TEST_LOG=dump test-misc
- name: Save logs to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: misc-tests-results.txt
path: tests/misc-tests-results.txt
if-no-files-found: ignore
test-convert:
name: Test btrfs-convert
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
- name: Tests convert
run: sudo make TEST_LOG=dump test-convert
- name: Save logs to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: convert-tests-results.txt
path: tests/convert-tests-results.txt
if-no-files-found: ignore
test-other:
name: Test cli, fuzz
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
- name: Tests cli
run: sudo make TEST_LOG=dump test-cli
- name: Save logs to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: cli-tests-results.txt
path: tests/cli-tests-results.txt
if-no-files-found: ignore
- name: Tests fuzz
run: sudo make TEST_LOG=dump test-fuzz
- name: Save logs to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: fuzz-tests-results.txt
path: tests/fuzz-tests-results.txt
if-no-files-found: ignore
btrfs-progs-6.14/.github/workflows/extended-build.yml 0000664 0000000 0000000 00000001117 14771053764 0022747 0 ustar 00root root 0000000 0000000 # Build tests of various combinations of configure options
# (pre-release tests)
name: Extended build tests
run-name: Extended build tests
on:
push:
branches:
- release-test
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr ccache
- name: Run tests/build-tests.sh
run: ./tests/build-tests.sh --ccache
btrfs-progs-6.14/.github/workflows/pull-request.yml 0000664 0000000 0000000 00000003631 14771053764 0022517 0 ustar 00root root 0000000 0000000 # Workflow for testing pull request against branches 'devel' or 'master'
#
# Derived from CI workflow for 'devel' but simplified to only the most common
# tests, more problems could be caught by other workflows after merge.
#
# - build tests
# - various runtime tests
name: Pull request build and tests
run-name: Pull request build and tests
on:
pull_request:
branches: [ "devel", "master" ]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1
# - name: Musl build
# run: sudo docker run kdave/ci-musl-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev
- name: Make static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' static
- name: Make box.static
run: make V=1 EXTRA_CFLAGS='-march=x86-64' btrfs.box.static
- name: Tests cli
run: sudo make TEST_LOG=dump test-cli
- name: Tests mkfs
run: sudo make TEST_LOG=dump test-mkfs
- name: Tests check
run: sudo make TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make TEST_LOG=dump test-check-lowmem
- name: Tests misc
run: sudo make TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make TEST_LOG=dump test-fuzz
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "tests/*-results.txt"
if-no-files-found: ignore
btrfs-progs-6.14/.github/workflows/sanitize.yml 0000664 0000000 0000000 00000012413 14771053764 0021701 0 ustar 00root root 0000000 0000000 # Run tests with sanitizers enabled
# - UBSAN - undefined behaviour (default)
# - ASAN - memory leaks etc
# - TSAN - multi-threading issues
name: Sanitizer checks
run-name: Sanitizer checks
on:
push:
branches:
- devel
- sanitize-test
- master
jobs:
build-ubsan:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1 D=ubsan
- name: Tests cli
run: sudo make D=ubsan TEST_LOG=dump test-cli
- name: Tests mkfs
run: sudo make D=ubsan TEST_LOG=dump test-mkfs
- name: Tests check
run: sudo make D=ubsan TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make D=ubsan TEST_LOG=dump test-check-lowmem
- name: Tests misc
run: sudo make D=ubsan TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make D=ubsan TEST_LOG=dump test-fuzz
- name: Tests convert
run: sudo make D=ubsan TEST_LOG=dump test-convert
- name: Test internal APIs
run: make D=ubsan test-api
- name: Libbtrfsutil test
run: make D=ubsan test-libbtrfsutil
- name: Libbtrfs build test
run: make D=ubsan library-test
- name: Tests hash (correctness)
run: make D=ubsan hash-vectest && ./hash-vectest
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "tests/*-results.txt"
if-no-files-found: ignore
build-asan:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1 D=asan
- name: Tests cli
run: sudo make D=asan TEST_LOG=dump test-cli
- name: Tests mkfs
run: sudo make D=asan TEST_LOG=dump test-mkfs
- name: Tests check
run: sudo make D=asan TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make D=asan TEST_LOG=dump test-check-lowmem
- name: Tests misc
run: sudo make D=asan TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make D=asan TEST_LOG=dump test-fuzz
- name: Tests convert
run: sudo make D=asan TEST_LOG=dump test-convert
- name: Test internal APIs
run: make D=asan test-api
# Temporary: the library or python bindings are not linked with ASAN and test cannot be run
# - name: Libbtrfsutil test
# run: make D=asan test-libbtrfsutil
# - name: Libbtrfs build test
# run: make D=asan library-test
- name: Tests hash (correctness)
run: make D=asan hash-vectest && ./hash-vectest
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "tests/*-results.txt"
if-no-files-found: ignore
build-tsan:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev attr jq
- name: Configure
run: ./autogen.sh && ./configure --disable-documentation --enable-experimental
- name: Make
run: make V=1 D=tsan
- name: Tests cli
run: sudo make D=tsan TEST_LOG=dump test-cli
- name: Tests mkfs
run: sudo make D=tsan TEST_LOG=dump test-mkfs
- name: Tests check
run: sudo make D=tsan TEST_LOG=dump test-check
- name: Tests check (lowmem)
run: sudo make D=tsan TEST_LOG=dump test-check-lowmem
- name: Tests misc
run: sudo make D=tsan TEST_LOG=dump test-misc
- name: Tests fuzz
run: sudo make D=tsan TEST_LOG=dump test-fuzz
- name: Tests convert
run: sudo make D=tsan TEST_LOG=dump test-convert
- name: Test internal APIs
run: make D=tsan test-api
# Temporary: the library or python bindings are not linked with TSAN and test cannot be run
# - name: Libbtrfsutil test
# run: make D=tsan test-libbtrfsutil
# - name: Libbtrfs build test
# run: make D=tsan library-test
- name: Tests hash (correctness)
run: make D=tsan hash-vectest && ./hash-vectest
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results
path: "tests/*-results.txt"
if-no-files-found: ignore
btrfs-progs-6.14/.github/workflows/test.yml 0000664 0000000 0000000 00000001674 14771053764 0021041 0 ustar 00root root 0000000 0000000 # Testing workflow for CI developments, reacts to push of branch 'devel-ci'
name: Testing CI build
run-name: Testing CI
on:
push:
branches:
- devel-ci
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: uname -a
- run: sudo modprobe btrfs
- run: cat /proc/filesystems
- run: gcc --version
- run: df -HT
- run: sudo apt-get update -qqq
- run: sudo apt-get install -y pkg-config gcc liblzo2-dev libzstd-dev libblkid-dev uuid-dev zlib1g-dev libext2fs-dev e2fsprogs libudev-dev python3-sphinx libaio-dev liburing-dev
- name: Configure
run: ./autogen.sh && ./configure
- name: Make
run: make V=1
- name: Musl build
run: sudo docker run kdave/ci-musl-x86_64 ./test-build $GITHUB_REF_NAME --disable-documentation --disable-backtrace --disable-libudev
- name: Tests cli
run: echo sudo make TEST_LOG=dump test-cli
btrfs-progs-6.14/.gitignore 0000664 0000000 0000000 00000002272 14771053764 0015725 0 ustar 00root root 0000000 0000000 *.o
*.static.o
*.o.d
/.cc-defines.h
/libbtrfs/version.h
/btrfs
/btrfs.static
/btrfs-map-logical
/btrfs-map-logical.static
/btrfsck
/mkfs.btrfs
/mkfs.btrfs.static
/btrfs-convert
/btrfs-convert.static
/btrfs-find-root
/btrfs-find-root.static
/btrfs-image
/btrfs-image.static
/btrfs-corrupt-block
/btrfs-corrupt-block.static
/btrfs-select-super
/btrfs-select-super.static
/btrfs-crc
/btrfstune
/btrfstune.static
/btrfs-sb-mod
/mktables
/libbtrfs.a
/libbtrfs.so*
/library-test
/library-test-static
/libbtrfsutil.so*
/libbtrfsutil.a
/libbtrfsutil/libbtrfsutil.pc
/fsstress
/fssum
/testsuite-id
/tests/*-tests-results.txt
/tests/test-console.txt
/tests/test.img
/tests/mnt/
*.restored
/ioctl-test
/send-test
/quick-test
/json-formatter-test
/hash-speedtest
/aclocal.m4
/autom4te.cache
/config.cache
/include/config.h
/include/config.h.in
/include/config.h.in~
/config/config.guess
/config/config.sub
/config/install-sh
/config.log
/config.status
/configure
/Makefile.inc
/tags
/TAGS
/cscope.out
/cscope.files
/cscope.in.out
/cscope.po.out
.*
!.editorconfig
!.github
!.readthedocs.yaml
!.codespellrc
/ci/images/*/devel.tar.gz
/Documentation/Makefile
/Documentation/_build
/Documentation/contents.rst
*.patch
btrfs-progs-6.14/.readthedocs.yaml 0000664 0000000 0000000 00000000266 14771053764 0017165 0 ustar 00root root 0000000 0000000 version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
sphinx:
configuration: Documentation/conf.py
python:
install:
- requirements: Documentation/requirements.txt
btrfs-progs-6.14/64-btrfs-dm.rules 0000664 0000000 0000000 00000000603 14771053764 0016752 0 ustar 00root root 0000000 0000000 SUBSYSTEM!="block", GOTO="btrfs_end"
KERNEL!="dm-[0-9]*", GOTO="btrfs_end"
ACTION!="add|change", GOTO="btrfs_end"
ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end"
# Once the device mapper symlink is created, tell btrfs about it
# so we get the friendly name in /proc/mounts (and tools that read it)
ENV{DM_NAME}=="?*", RUN{builtin}+="btrfs ready /dev/mapper/$env{DM_NAME}"
LABEL="btrfs_end"
btrfs-progs-6.14/64-btrfs-zoned.rules 0000664 0000000 0000000 00000000532 14771053764 0017472 0 ustar 00root root 0000000 0000000 SUBSYSTEM!="block", GOTO="btrfs_end"
ACTION!="add|change", GOTO="btrfs_end"
ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end"
# Zoned btrfs needs an IO scheduler that supports zone write locking and
# currently mq-deadline is the only scheduler capable of this.
ATTR{queue/zoned}=="host-managed", ATTR{queue/scheduler}="mq-deadline"
LABEL="btrfs_end"
btrfs-progs-6.14/CHANGES 0000664 0000000 0000000 00000252257 14771053764 0014742 0 ustar 00root root 0000000 0000000 btrfs-progs-6.13 (2025-03-26)
-----------------------------
* mkfs:
* allow --sectorsize to be 2K for testing purposes of subpage mode (needs
the same block size supported by kernel)
* fix false error when no compression is requested and lzo is not compiled in
* convert: support 2K block size in the source filesystem
* defrag: new parameter -L/--level to specify compression levels (kernel 6.15),
also supports the realtime levels
* subvol delete: show names of recursively deleted child subvolumes
* qgroup show: use sysfs to detect up to date consistency status
* zoned mode: support zone capacity tracking
* other:
* CI new and updated workflows
* documentation updates
btrfs-progs-6.13 (2025-02-15)
-----------------------------
* mkfs:
* new option to enable compression
* updated summary (subvolumes, compression)
* completely remove option --leafsize, deprecated long ago
* btrfstune: add option to remove squota
* scrub:
* start: new option --limit to set the bandwidth limit for the duration of the run
* status: fix printing of Rate unit suffix (SI/IEC)
* qgroup clean-stale: check if quotas are enabled before starting filesystem sync()
* print builtin features and options in --version output (mkfs, convert, image, btrfstune)
* build:
* Botan minimum version is now 3.x
* target to build compile_commands.json (for LSP)
* other:
* a bit more optimized crc32c code
* sync some headers from kernel code
* command help updates and fixes
* build warning fixes
* error message updates
* cleanups and refactoring
* updated tests
* lots of documentation updates
btrfs-progs-6.12 (2024-11-29)
-----------------------------
* subvolume delete: add new option to do recursive subvolume deletion (for
regular user delete only accessible subvolumes)
* mkfs:
* new option --subvol to create subvolumes in given paths, read-write,
read-only and default
* add hard link detection support for --rootdir option
* fixes:
* receive: message verbosity fixes
* check: fix false positive report of missing checksum for extent holes
* check: handle compressed extents when checking tree log
* when asking Y/N user questions, flush the terminal so the question is
displayed (e.g. btrfstune -S)
* other
* code refactoring, error handling
* python packaging fixes
* documentation updates
* new tests
btrfs-progs-6.11 (2024-09-17)
-----------------------------
* check:
* check items in tree-log
* detect invalid file extent items for symlinks
* properly detect inode cache and suggest removal by 'clear-ino-cache'
* convert: fix symlink length checks
* fi show: remove stray newline at the end of the output
* fixes:
* open devices in write-exclusive mode in most commands, prevent
concurrent mount by other programs
* rescue clear-ino-cache: fix subvolume iteration that can fail in some cases
* map-logical: fix first extent searching condition
* fi resize: warn if new size is below 256M
* tree-checker:
* slightly stricter file type validation
* verify device extent items
* other:
* documentation updates
* ship btrfs-ioctl manual page (incomplete)
btrfs-progs-6.10 (2024-07-30)
-----------------------------
* inspect:
* list-chunks: new command to print information about chunks (i.e.
the physical chunks as stored on devices), sortable; requires root as
it's using SEARCH_TREE ioctl
* tree-stats:
* new option -t to print only the given tree
* add long options for size units
* filesystem df: with increased verbosity print per-type information from sysfs
* version: print a line with built-in features or options (+FEATURE1 -FEATURE2)
* image: document option -s and its potential problems
* fixes:
* scrub status: user selected base for Rate values
* receive: escape special characters in paths and xattrs
* dump-tree: escape special characters in paths and xattrs
* image: sanitizing filenames did not work properly in all cases
* convert: fix displayed restored image path on rollback
* tune change csum: do conversion in smaller batches
* other:
* CI workflows updates (sanitizers, code spelling, manual page preview)
* build fixes for uClibc
* build fix for python 3.13
* documentation updates
btrfs-progs-6.10.1 (2024-08-15)
"""""""""""""""""""""""""""""""
* mkfs: rework --rootdir traversal, skip hardlinks and create new inodes
instead, also warn about them, this did not work as expected and will be
fixed in the future
* receive: search in older trees for UUIDs when detecting clone sources
* libbtrfsutil: bindings available at https://pypi.org/project/btrfsutil
* libbtrfs:
* patchlevel version update 0.1.4
* cleanup in headers, removed unused definitions, no functional changes
* don't ship list.h and rbtree.h
* other:
* documentation updates
btrfs-progs-6.9 (2024-06-07)
----------------------------
* mkfs:
* if --force used, don't continue if the mount status cannot be
determined (e.g. due to permissions)
* fix minimum size calculation on zoned devices, make it work with option -b
* check:
* option --clear-ino-cache removed (functionality still provided in
'rescue' command group)
* detect and repair wrong file extent item ram_bytes value
* qgroup clear-stale:
* sync the filesystem before search to read the up to date state
* handle cases where qgroup cannot be deleted due to uncleaned subvolume
or when squota is enabled
* qgroup show: display status of qgroup regarding the cleaning of the
subvolume or if it's squota
* receive: fix stream parsing on strict alignment hosts (e.g. ARM v5 or v6)
* tune change-csum: fix check of dev-replace status item, continue if no
dev-replace in progress
* dump-tree: print contents of dev-replace status item
* convert: fix extent iteration to handle prealloc/unwritten extents
* libbtrfsutil:
* patchlevel version update 1.3.1
* fix potentially unaligned access to send stream
* create library links to all version levels
* libbtrfs:
* patchlevel version update 0.1.3
* fix potentially unaligned access to send stream
* create library links to all version levels
* build:
* fix compatibility with e2fsprogs 1.47.1
* fix header file dependency tracking
* -O2 by default
* other:
* new and updated tests
* ASAN and UBSAN test coverage in CI
* documentation updates
btrfs-progs-6.9.1 (2024-06-24)
""""""""""""""""""""""""""""""
* fix detection of intermediate super block flags (e.g. csum change and
other conversions)
* raid-stripe-tree support (still experimental):
* moved under experimental build flags (mkfs, convert)
* format change, removed encoding type; backward incompatible
* receive dump: escape special chars in xattr names and values, and clone
source path
* tune change csum: fix reservation size when starting a transaction
* other:
* new and updated tests
* updated CI images, new reference build targets
* cleanups and refactoring
btrfs-progs-6.9.2 (2024-06-27)
""""""""""""""""""""""""""""""
* subvol list: fix accidental trimming of subvolume name
* check: revert checking file extent item 'ram_bytes'
* libbtrfsutil:
* patchlevel version update 1.3.2
* fix accidentally closing fd passed to subvolume iterator
btrfs-progs-6.8 (2024-03-26)
----------------------------
* fix --enqueue option timeout handling
* subvolume: remove support for undocumented options -c and -x,
functionality disabled in kernel
* libbtrfsutil:
* version 0.1.3, backward compatible
* add aliases for all existing functions with unified naming scheme
* updated header definitions for recently added kernel features
* send: v3 supported in experimental mode
* other:
* docs: manual page references, graphs, enhancements, clarifications
* error handling fixes
* cleanups and refactoring
btrfs-progs-6.8.1 (2024-05-02)
""""""""""""""""""""""""""""""
* mkfs: fix writing on zoned device when block-group-tree is selected
* tune: fix writing on zoned device with option --convert-to-block-group-tree
* check:
* more progress and error messages
* unify handling of unknown command line options with other commands
* subvolume delete: remove options --delete-qgroup and --no-delete-qgroup
(added in 6.6.3), qgroup deletion does not always work due to delayed
background processing of subvolume or set value in
sysfs:ggroup/drop_subtree_threshold
* other:
* misc refactoring
* error handling fixes reported by gcc -fanalyzer
* documentation updates
* new and updated tests
btrfs-progs-6.7 (2024-01-22)
----------------------------
* mkfs: make 4k sectorsize default, recommended minimum kernel for that is
6.1 and requires subpage support on architectures with page size > 4k
* subvolume create: return correct error code when a target already exists
* tree-checker: dump tree block on error (btrfs-convert, ...)
* scrub limit: fix reporting of a limit set while there's none
* fi usage: fix reporting of unallocated data or raid56 profile without root
privs due to lack of that information
* convert:
* align data block group lengths to 64K
* fix conversion of a large filesystem when there are partial inode items
present due to caching
* other:
* build fixes
* updated documentation
* new and updated tests
btrfs-progs-6.7.1 (2024-02-14)
""""""""""""""""""""""""""""""
* convert: raid-stripe-tree can be now enabled for the target filesystem
* mkfs:
* handle lifetime of open file descriptors so it does not trigger udev
that could miss to create the UUID symlinks in /dev
* update warning when CPU page size does not match sector size
* merge features in summary, no more distinction of incompat and runtime
to match the semantics of option -O
* fi show: fix recognizing raw device mapper paths
* other:
* CI updates, build images updates
* minor cleanups
* minor sync with kernel
* documentation updates, fix links to labels in included directories
btrfs-progs-6.6 (2023-11-03)
----------------------------
* new global option --dry-run, now implemented for 'subvolume delete'
* fi defrag: new option --step to defragment files in steps, report progress
* balance: removed support for obsolete short syntax 'btrfs balance /path'
* mkfs: print zone count for each device in the overview
* check:
* verify inline ref ordering
* deprecate --clear-space-cache, moved to the 'rescue' group
* rescue clear-space-cache: new command moved from 'btrfs check' implementing
the same as option --clear-space-cache (to be deprecated and removed in the
future)
* dump-tree: output sequence number for inline refs
* fixes:
* fi resize: fallback to lowest devid when 1 does not exist, previously the
command would fail with "No such device"
* fi usage: fix "devices 0 != 1" message and broken output on multi-device
filesystem
* open files in non-blocking mode when reading fsid, this could hang when
trying to open fifo files or some special character devices, was observed
with 'prop set/get'
* experimental:
* mkfs: parametric zone size for emulated zoned mode
* other:
* cleanups refactoring
* new and updated tests
* CI updates
* documentation updates
btrfs-progs-6.6.1 (2023-11-05)
""""""""""""""""""""""""""""""
* fix device scanning ioctl definition, accidental change to the 'forget' ioctl
that breaks mounting multi-device filesystems
btrfs-progs-6.6.2 (2023-11-15)
""""""""""""""""""""""""""""""
* squota: change key number of EXTENT_OWNER_REF_KEY, sync with kernel 6.7-rc1
* property set/get: completely skip char devices, trying to set properties
and open /dev/watchdog* causes a reboot
* other: build warnings, test updates, documentation updates
btrfs-progs-6.6.3 (2023-12-14)
""""""""""""""""""""""""""""""
* subvol create: accept multiple arguments
* subvol delete: print the subvolume id in the output
* subvol sync: check if the filesystems is still writeable so it does not
wait indefinitely
* device delete: add a timeout and warning when deleting multiple devices
* scrub status: report limit if set in sysfs/../scrub_speed_max
* scrub limit: new command to show or set the per-device scrub limits
* scrub start: report the limit if set
* build:
* fix CPU feature detection on aarch64
* support Botan and OpenSSL (3.2+) as crypto backends
* other:
* documentation updates, RTD config update
* new and updated tests
* CI updates
btrfs-progs-6.5 (2023-09-01)
----------------------------
* crc32c implementation speedup (3x)
* btrfstune:
* be more strict about option combinations and refuse changing
features from incompatible groups
* metadata_uuid changes fixes
* libbtrfs: fix ABI breakage introduced in 6.3.1, revert struct subvol_info
and subvol_uuid_search changes
* CI updates
* pull request build tests enabled
* published static binaries built with backward compatibility (-march=x86-64)
* other
* documentation updates
* new and updated tests
* experimental feature updates (json, list-chunks, checksum switch)
* code refactoring
* remove btrfs-fragments
btrfs-progs-6.5.1 (2023-09-13)
""""""""""""""""""""""""""""""
* build fixes:
* crc32c if PIE or relro is enabled
* detect if PCLMUL feature is recognized by compiler and also detect that
at runtime
* check: verify metadata item level when skinny-metadata is enabled
* other: minor build and docs updates
btrfs-progs-6.5.2 (2023-10-03)
""""""""""""""""""""""""""""""
* new feature support:
* raid-stripe-tree, new tree to track extent mapping for raid profiles,
allows raid1*, raid0 and raid10 on zoned devices (kernel 6.7)
* simple quotas, simplified accounting that does not track exclusive and
shared extents (kernel 6.7)
* mkfs with duplicate UUID on a single device, temp-fsid (kernel 6.7)
* metadata_uuid: enhanced capabilities to repair partially updated fsid on
multiple devices
* other:
* updated tests and CI
* sync sources with kernel
btrfs-progs-6.5.3 (2023-10-21)
""""""""""""""""""""""""""""""
* mkfs:
* add short aliases for -O specification, block-group-tree (bgt),
free-space-tree (fst), raid-stripe-tree (rst)
* don't try to resize the image (namely when backed by file) when --rootdir
contains sparse file larger than the image
* also copy xattr/permissions/ugid/timestamps of the top --rootdir directory
* add new option --device-uuid to let user specify exact uuid of the
device item (only for single device filesystems)
* check:
* on zoned devices, use correct super block offsets when repairing
* check inline extent refs order
* subvolume create: add new option --parent to create missing path
components of the given path (like mkdir -p)
* rescue clear-ino-cache: new command moved from 'btrfs check' implementing
the same as option --clear-ino-cache (to be deprecated and removed in the
future)
* dump-tree: allow '-' in tree identifier names for option -t
* btrfstune:
* drop short option and add long option to enable squota
* tune space reservation and batch size for block-group-tree conversion
* scrub status: print correct value of "Bytes scrubbed" for unfinished runs
* qgroup show: fix crash when attempting to print path of stale qgroups
* experimental features:
* move build of raid-stripe-tree out for testing but it's still considered
experimental
* other:
* shell completion updates
* sync raid-stripe-tree code with kernel
* build fixes
* new and updated tests
btrfs-progs-6.4 (skipped)
-------------------------
btrfs-progs-6.3 (2023-04-27)
----------------------------
* mkfs: option -R deprecated, options unified in -O (-R still works)
* mkfs: fix potential race with udev leading to EBUSY due to repeatedly
opened file descriptors
* block-group-tree is out of experimental mode
* available as 'mkfs.btrfs -O block-group-tree'
* btrfstune can do in-place conversion to/from (use with care)
* balance: fix recognizing old and new syntax
* subvol snapshot: specific error if a failure is caused by an active swapfile
* tree-stats: rephrase warning when run on a mounted filesystem
* completion: 'filesystem du' also completes files
* check: fix docs, help text and warning that --force + --repair works on a
mounted filesystem
* build: fix static build when static libudev is available
* documentation:
* more updates from wiki, developer docs, changelogs
* reformatting
* updates and fixes
* other:
* test updates and fixes
* CI cleanups and old files removed
* integration with Github actions
btrfs-progs-6.3.1 (2023-05-29)
""""""""""""""""""""""""""""""
* convert: fix checksum of a block relocated from 0-1M range
* qgroup show: fix formatting of limit values in json output
* receive: report parent subvol UUID on errors
* btrfstune: new option --convert-to-free-space-tree to convert from
block-group-tree back to extent tree for block group tracking
* mkfs: make option --rootdir more verbose and report start when filling
from the given directory starts
* experimental:
* btrfstune: checksum switch logic reimplemented, conversion of all
metadata and data now works, resume from various states also supported
* other:
* more CI github actions test coverage
* more kernel/userspace source code sync
* warning fixes
* code cleanups
* documentation updates
btrfs-progs-6.3.2 (2023-06-15)
""""""""""""""""""""""""""""""
* fix mkfs and others on big endian hosts
* mkfs: don't print changed defaults notice with --quiet
* scrub: fix wrong stats of processed bytes in background and foreground mode
* convert: actually create free-space-tree instead of v1 space cache
* print-tree: recognize and print CHANGING_FSID_V2 flag (for the
metadata_uuid change in progress)
* other: documentation updates
btrfs-progs-6.3.3 (2023-07-27)
""""""""""""""""""""""""""""""
* add btrfs-find-root to btrfs.box
* replace: properly enqueue if there's another replace running
* other:
* CI updates, more tests enabled, code coverage, badges
* documentation updates
* build warning fixes
btrfs-progs-6.2 (2023-02-28)
----------------------------
* receive: fix a corruption when decompressing zstd extents
* subvol sync: print total number and deletion progress
* accelerated hash algorithm implementations in fallback mode on x86_64
* fi mkswapfile: new option --uuid
* new global option --log=level to set the verbosity level directly
* other:
* experimental: update checksum conversion (not usable yet)
* build actually requires -std=gnu11
* refactor help option formatting, auto wrap long lines
btrfs-progs-6.2.1 (2023-02-03)
""""""""""""""""""""""""""""""
* fix build with crypto libraries
* CI images updated, build tests extended
btrfs-progs-6.2.2 (2023-03-25)
""""""""""""""""""""""""""""""
* fix build on old x86 architectures with builtin crypto
* device stats: fix printing wrong values in tabular output
* qgroup show: fix qgroup id formatting in json output
* restore: fix restoring xattrs on directories
* restore: don't modify metadata in dry-run mode
* balance: fix some cases wrongly parsed as old syntax
* balance: warn when deprecated syntax is used
* seeding: fall back to old way if sysfs device fsid is not available
* convert: handle orphan file ext4 feature
* other:
* sync ioctl definitions
* enable github CI
* update documentation
btrfs-progs-6.1 (2022-12-22)
----------------------------
* NOTE: this version breaks build of applications using ctree.h and qgroup items
* filesystem df: add json output
* qgroup show: add json output
* new command: 'inspect-internal map-swapfile' to check swapfile and its
swapfile_offset value used for hibernation
* corrupt-block: fix parsing of option --root argument
* experimental (interfaces not finalized):
* new command 'inspect-internal list-chunks'
* new group reflink, command clone
* other:
* synchronize some files with kernel versions
* docs updates
* build: use gnu11
btrfs-progs-6.1.1 (2023-01-03)
""""""""""""""""""""""""""""""
* subvol list: fix printing of UUID
* revert changes to ctree.h regarding qgroup items, breaks build of several
applications
* hide __init definition in kerncompat.h, may break build
btrfs-progs-6.1.2 (2023-01-05)
""""""""""""""""""""""""""""""
* revert libbtrfs changes to v6.0.2, fix remaining build problems
btrfs-progs-6.1.3 (2023-01-25)
""""""""""""""""""""""""""""""
* fi mkswapfile: fix setting size
* mkfs: check zoned support of libblkid
* check: improve error messages for mismatched references
* other:
* pass CFLAGS to static build
* documentation updates
btrfs-progs-6.0 (2022-10-11)
----------------------------
* fi usage: in tabular output, print total size and slack size
* mkfs:
* option -O now accepts values from -R to unify the interface (-R will
continue to work)
* zone reset and discard is done in parallel on all devices
* removed option --leafsize, deprecated long time ago
* corrupt-block: recalculate checksum when changing generation
* fixes:
* convert: fix reserved range detection and overlaps
* mkfs: fix creating files with reserved inode numbers with --rootdir
* receive: escape filenames in command attributes
* fix extent buffer leaks after transaction abort
* experimental:
* mkfs: support for block-group-tree (kernel 6.1)
* fsverity in send (protocol v3, WIP)
* btrfstune -b converts to block-group-tree
* other:
* cleanups, refactoring
* new and updated tests
* update documentation
btrfs-progs-6.0.1 (2022-11-04)
""""""""""""""""""""""""""""""
* send: minor speed up for v2 due to increased buffer size
* resize: invalid command line options fail with error code
* quota rescan:
* add long options --status and --wait
* new option to wait but don't start rescan
* qgroup show: print path by default, updated format
* qgroup: new subcommand clear-stale, remove qgroups without their subvolumes
* experimental:
* add warnings to commands that have it enabled (mkfs, image, btrfstune)
* other:
* documentation, help text, error message updates
btrfs-progs-6.0.2 (2022-11-24)
""""""""""""""""""""""""""""""
* fixes:
* resize cancel did not work in some cases
* fix fileattr stream command format and add workaround when it cannot be applied
* properly handle degraded raid56 reads
* fi defrag: fix verbosity, don't print file names by default
* receive: fix silent data loss after fall back from encoded write
* fi mkswapfile: new command to create a formatted swapfile in one go
btrfs-progs-5.19 (2022-08-16)
-----------------------------
* send: support protocol version 2
* fi show: print all missing devices
* device stats: add tabular output
* replace: add alias to device group (device replace)
* check: validate free space tree items
* fixes:
* convert: support large filesystems (block count > 32bit)
* recognize filesystems with verity enabled
* mkfs and DUP could write out of order, fix it for zoned mode
* build:
* optional support for LZO and ZSTD in receive
* compatibility with glibc 2.36 (mount.h)
* add fallbacks for new GCC builtins
* other:
* corrupt-block: target specific items, offsets
* documentation updates, new pages from wiki
* new tests
btrfs-progs-5.19.1 (2022-09-12)
"""""""""""""""""""""""""""""""
* fix memory leaks (extent buffer, path)
* check: verify block device size vs item
* rescue fix-device-size: allow to shrink device item
* receive: fix crash on wrong pointer free()
* other:
* experimental: support for block-group-tree
* documentation updates
* new tests
btrfs-progs-5.18 (2022-05-25)
-----------------------------
* fixes:
* dump-tree: don't print trailing zeros in checksums
* recognize paused balance as exclusive operation state, allow to start
device add
* convert: properly initialize target filesystem label
* mkfs: don't create free space bitmaps for empty filesystem
* restore: make lzo support build-time configurable, print supported
compression in help text
* update kernel-lib sources
* other:
* documentation updates, finish conversion to RST, CHANGES and INSTALL
could be included into RST
* fix build detection of experimental mode
* new tests
btrfs-progs-5.18.1 (2022-06-06)
"""""""""""""""""""""""""""""""
* fixes:
* convert: fix self reference of toplevel directory
* build: make kernel lib headers compatible with C++
* zoned mode: verify minimum zone size 4MiB
* libbtrfs: cleanups, merge headers and remove declarations of unexported
symbols
* other: documentation updates
btrfs-progs-5.17 (2022-04-26)
-----------------------------
* check:
* repair wrong num_devices in superblock
* recognize overly long xattr names
* fix wrong total bytes check for seed device
* auto-repair on read on RAID56
* property set: unify handling of empty value to mean default, changed meaning
for property 'compression' to allow reset to default and to set NOCOMPRESS,
since kernel 5.14
* fixes:
* dump-tree: print fs-verity items
* fix location of system chunk on zoned filesystem
* do not allow setting seeding flag on a filesystem with dirty log
* mkfs and subpage support: use sectorsize as nodesize fallback for mixed
profiles
* preparatory work for extent tree v2, global roots
* experimental feature (unstable interface, not built by default,
do not use for production)
* btrfstune: option --csum to switch checksum algorithm
* other:
* cleanups, refactoring
* update documentation build, remove asciidoc leftovers
* update fssum to consider xattrs
* add fsstress
btrfs-progs-5.16 (2022-01-12)
-----------------------------
* rescue: new subcommand clear-uuid-tree to fix failed mount due to bad uuid
subvolume keys, caught by tree-checker
* fi du: skip inaccessible files
* prop: properly resolve to symlink targets
* send, receive: fix crash after parent subvolume lookup errors
* build:
* fix build on 5.12+ kernels due to changes in linux/kernel.h
* fix build on musl with old kernel headers
* other:
* error handling fixes, cleanups, refactoring
* extent tree v2 preparatory work
* lots of RST documentation updates (last release with asciidoc sources),
https://btrfs.readthedocs.io
btrfs-progs-5.16.1 (2022-02-04)
"""""""""""""""""""""""""""""""
* mkfs: support DUP on metadata on zoned devices
* subvol delete: drop warning for root when search ioctl fails
* check:
* fix --init-csum-tree to not create checksums for extents that are not
supposed to have them
* add check for metadata item levels
* add udev rule for zoned devices as they require mq-deadline
* build: fix redefinition of ALIGN on mixed old/new kernel/userspace (5.11)
* other:
* typo fixes
* new tests
* CI targets updated
btrfs-progs-5.16.2 (2022-02-16)
"""""""""""""""""""""""""""""""
* mkfs: fix detection of profile type for zoned mode when creating DUP
* build:
* add missing stub for zoned mode helper when zoned mode not enabled
* fix 64bit types on MIPS and PowerPC
* improved zoned mode support autodetection, for systems with existing
blkzone.h header but missing support for zone capacity
* other:
* doc updates
* test updates
btrfs-progs-5.15 (2021-11-05)
-----------------------------
* mkfs: new defaults!
* no-holes
* free-space-tree
* DUP for metadata unconditionally
* libbtrfsutil
* add missing profile defines
* libbtrfs
* minimize its impact on the other code, refactor and separate implementation
where needed, cleanup afterwards, reduced header exports
* documentation
* introduce sphinx build and RST versions of manual pages, will become the
new format and replace asciidoc
* fixes:
* fix warning regarding v1 space cache when only v2 (free space tree) is
enabled
* other
* lots of cleanups and refactoring
* zoned mode uses direct io for file backed images
* new and updated tests
btrfs-progs-5.15.1 (2021-11-22)
"""""""""""""""""""""""""""""""
* fixes:
* fi usage: fix wrongly reported space of used or unallocated space
* fix detection of block device discard capability
* check: add more sanity checks for checksum items
* build: make sphinx optional backend for documentation
btrfs-progs-5.14 (2021-09-10)
-----------------------------
* convert:
* new option --uuid to copy, generate or set a given uuid
* improve output
* mkfs:
* allow to create degenerate raid0 (on 1 device) and raid10 (on 2 devices)
* image:
* improved error messages
* fix some alignment of restored image
* subvol delete: allow to delete by id when path is not resolvable
* check:
* require alignment of nodesize for 64k page systems
* detect and fix invalid block groups
* libbtrfs (deprecated):
* remove most exported symbols, leave only a few that are used by snapper
* no version change (still 0.1)
* remove btrfs-list.h, btrfsck.h
* fixes:
* reset generation of space v1 if v2 is used
* fi us: don't wrongly report missing device size when partition is not readable
* other:
* build: experimental features
* build: better detection of 64bit timestamp support for ext4
* corrupt-block: block group items
* new and updated tests
* refactoring
* experimental features:
* new image dump format, with data
btrfs-progs-5.14.1 (2021-09-20)
"""""""""""""""""""""""""""""""
* fixes:
* defrag: fix parsing of compression (option -c)
* add workaround for old kernels when reading zone sizes
* let only check and restore open the fs with transid failures, namely
preventing btrfstune to do so
* convert: --uuid copy does not fail on duplicate uuids
btrfs-progs-5.14.2 (2021-10-08)
"""""""""""""""""""""""""""""""
* fixes
* zoned mode
* properly detect non-zoned devices in emulation mode
* properly create quota tree
* raid1c3/4 also excluded from unsupported profiles
* use sysfs-based detection of device discard capability, fix mkfs-time trim
for non-standard devices
* mkfs: fix creation of populated filesystem with free space tree
* detect multipath devices (needs libudev)
* replace start: add option -K/--nodiscard, similar to what mkfs or device add has
* dump-tree: print complete root_item
* mkfs: add option --verbose
* sb-mod: better help, no checksum calculation on read-only actions
* subvol show:
* print more information (regarding send and receive)
* print warning if read-write subvolume has received_uuid set
* property set:
* add parameter -f to force changes
* changing ro->rw switch now needs -f if subvolume has received_uuid set,
(see documentation)
* build
* optional libudev (on by default)
* other
* remove deprecated support for CREATE_ASYNC bit for subvolume ioctl
* CI updates
* new and updated tests
btrfs-progs-5.13 (2021-07-13)
-----------------------------
* restore: remove loop checks for extent count and directory scan
* inspect dump-tree: new options to print node (--csum-headers) and data
checksums (--csum-items)
* fi usage:
* print stripe count for striped profiles
* print zoned information: size, total unusable
* mkfs: print note about sha256 accelerated module loading issue
* check: ability to reset dev_item::bytes_used
* fixes
* detect zoned kernel support at run time too
* exclusive op running check return value
* fi resize: support cancel (kernel 5.14)
* device remove: support cancel (kernel 5.14)
* documentation about general topics
* compression
* zoned mode
* storage model
* hardware considerations
* other
* libbtrfsutil API overview
* help text fixes and updates
* hash speedtest measure time, cycles using perf and print throughput
btrfs-progs-5.13.1 (2021-07-30)
"""""""""""""""""""""""""""""""
* build: fix build on musl libc due to missing definition of NAME_MAX
* check:
* batch more work into one transaction when clearing v1 free space inodes
* detect directories with wrong number of links
* libbtrfsutil: fix race between subvolume iterator and deletion
* mkfs: be more specific about supported profiles for zoned device
* other:
* documentation updates
btrfs-progs-5.12 (2021-05-10)
-----------------------------
* libbtrfsutil: relicensed to LGPL v2.1+
* mkfs: zoned mode support (kernel 5.12+)
* fi df: show zone_unusable per profile type in zoned mode
* fi usage: show total amount of zone_unusable
* fi resize: fix message for exact size
* image: fix warning and enlarge output file if necessary
* core
* refactor chunk allocator for more modes
* implement zoned mode support: allocation and writes, sb log
* crypto/hash refactoring and cleanups
* refactoring and cleanups
* other
* test updates
* CI updates
* travis-ci integration disabled
* docker images updated, more coverage
* incomplete build support for Android removed
* doc updates
* chattr mode m for 'NOCOMPRESS"
* swapfile used from fstab
* how to add a new export to libbtrfsutil
* update status of mount options since 5.9
btrfs-progs-5.12.1 (2021-05-13)
"""""""""""""""""""""""""""""""
* build: fix missing symbols in libbtrfs
* mkfs: check for minimal number of zones
* check: fix warning about cache generation when free space tree is enabled
* fix superblock write in zoned mode on 16K pages
btrfs-progs-5.11 (2021-03-05)
-----------------------------
* fix device path canonicalization for device mapper devices
* receive: remove workaround for setting capabilities, all stable kernels
have been patched
* receive: fix duplicate mount path detection
* rescue: new subcommand create-control-device
* device stats: minor fix for plain text format output
* build: detect if e2fsprogs support 64bit timestamps
* build: drop libmount, required functionality has been reimplemented
* mkfs: warn when raid56 is used
* balance convert: warn when raid56 is used
* other
* new and updated tests
* documentation updates
* seeding device
* raid56 status
* CI updates
* docker images for various distros
btrfs-progs-5.11.1 (2021-03-24)
"""""""""""""""""""""""""""""""
* properly format checksums when a mismatch is reported
* check: fix false alert on tree block crossing 64K page boundary
* convert:
* refuse to convert filesystem with 'needs_recovery'
* update documentation to require fsck before conversion
* balance convert: fix raid56 warning when converting other profiles
* fi resize: improved summary
* other
* build: fix checks and autoconf defines
* fix symlink paths for CI support scripts
* updated tests
btrfs-progs-5.10 (2021-01-18)
-----------------------------
* scrub status:
* print percentage of progress
* add size unit options
* fi usage: also print free space from statfs
* convert: copy full 64 bit timestamp from ext4 if available
* check:
* add ability to repair extent item generation
* new option to remove leftovers from inode number cache (-o inode_cache)
* check for already running exclusive operation (balance, device add/...)
when starting one
* preliminary json output support for 'device stats'
* fixes:
* subvolume set-default: id 0 correctly falls back to toplevel
* receive: align internal buffer to allow fast CRC calculation
* logical-resolve: distinguish -o subvol and bind mounts
* build: new dependency libmount
* other
* doc fixes and updates
* new tests
* ci on gitlab temporarily disabled
* debugging output enhancements
btrfs-progs-5.10.1 (2021-02-05)
"""""""""""""""""""""""""""""""
* static build works again
* other:
* add a way to test static binaries with the testsuite
* clarify scrub docs
* update dependencies, minimum version for libmount is 2.24, this may
change in the future
btrfs-progs-5.9 (2020-10-23)
----------------------------
* mkfs:
* switch default to single profile for multi-device filesystem, up to
now it was raid0 that may not be simple to convert to some other profile
as raid0 needs a workspace on all device for that
* new option -R for run-time options (eg. mount time enabled), now
understands free-space-tree
* subvolume delete:
* refuse to delete the default subvolume (kernel will not allow that but
the error reason is not obvious)
* warn on EPERM, eg. if send is on progress on the subvolume
* convert:
* fix 32bit overflows on large filesystems
* improved error handling and error messages
* check free space taking fragmentation into account
* check:
* detect and repair wrong inode generation
* minor improvement in error reporting on roots
* libbtrfsutils: follow main package versioning (5.9)
* add pkg-config file definitions
* python-btrfsutil: follow main package versioning (5.9)
* inspect tree-stats: print node counts for each level, fanout
* other:
* docs:
* remove obsolete mount options (alloc_start, subvolrootid)
* deleting default subvolume is not permitted
* updated or fixed tests
* .editorconfig updates
* move files to kernel-shared/
* CI:
* updated to use zstd 1.4.5
* fix reiserfs build
* more builds with asan, ubsan
* sb-mod updates
* build:
* print .so versions of libraries in configure summary
btrfs-progs-5.8 (skipped)
-------------------------
btrfs-progs-5.7 (2020-07-02)
----------------------------
* mkfs:
* new option to enable features otherwise enabled at runtime, now
implemented for quotas, 'mkfs.btrfs -R quota'
* fix space accounting for small image, DUP and --rootdir
* option -A removed
* check: detect ranges with overlapping csum items
* fi usage: report correct numbers when plain RAID56 profiles are used
* convert: ensure the data chunks size never exceed device size
* libbtrfsutil: update documentation regarding subvolume deletion
* build: support libkcapi as implementation backend for cryptographic
primitives
* core: global options for verbosity (-v, -q), subcommands -v or -q are
aliases and will continue to work but are considered deprecated,
current command output is preserved to keep scripts working
* other:
* block group code cleanups
* build warning fixes
* more files moved to kernel-shared
* btrfs-debugfs ported to python 3
* documentation updates
* new tests
btrfs-progs-5.6 (2020-04-05)
----------------------------
* inspect logical-resolve: support LOGICAL_INO_V2 as new option '-o',
helps advanced dedupe tools
* inspect: user larger buffer (64K) for results
* subvol delete: support deletion by id (requires kernel 5.7+)
* libbtrfsutil:
* support subvolume deletion by id
* bump version to 1.2
* library symbols are now versioned
* dump-tree: new option --hide-names, replace any names (file, directory,
subvolume, xattr) in the output with stubs
* convert: warn if the filesystem is not mountable on the machine
* fixes:
* restore: proper mirror iteration on decompression error
* restore: make symlink messages less noisy
* check: handle holes at the beginning or end of file
* fix xxhash output on big endian machines
* receive: fix lookup of subvolume by uuid in case it was already
received before
* other:
* new and updated tests
* add missing binaries in exported testsuite
* docs updates
* remove obsolete files
* move files to more appropriate directories
* fixes reported by valgrind
* many typos fixed
btrfs-progs-5.6.1 (2020-05-07)
""""""""""""""""""""""""""""""
* print warning when multiple block group profiles exist, update 'fi usage'
summary, add docs to manual page explaining the situation
* build: optional support for libgcrypt or libsodium, providing hash
implementations
* other:
* fixed, updated and new tests
* cleanups
* updated docs
btrfs-progs-5.5 (skipped)
-------------------------
btrfs-progs-5.4 (2019-12-03)
----------------------------
* support new hash algorithms (kernel 5.5):
* mkfs.btrfs and btrfs-convert with --csum, crc32c, xxhash, sha256, blake2
* mkfs: support new raid1c3 and raid1c4 block group profiles (kernel 5.5)
* check:
* --repair delays start with a warning, can be skipped using --force
* enhanced detection of inode types from partial data, more options for
repair
* receive: fix quiet option
* image: speed up chunk loading
* fi usage:
* sort devices by id
* print ratio of used/total per block group type
* rescue zero-log: reset the log pointers directly, avoid reading some other
potentially damaged structures
* new make target install-static to install only static binaries/libraries
* other
* docs updates
* new tests
* cleanups and refactoring
btrfs-progs-5.4.1 (2020-01-09)
""""""""""""""""""""""""""""""
* build: fix docbook5 build
* check: do extra verification of extent items, inode items and chunks
* qgroup: return ENOTCONN if quotas not running (needs updated kernel)
* other: various test fixups
btrfs-progs-5.3 (2019-10-21)
----------------------------
* mkfs:
* new option to specify checksum algorithm (only crc32c)
* fix xattr enumeration
* dump-tree: BFS (breadth-first) traversal now default
* libbtrfsutil: remove stale BTRFS_DEV_REPLACE_ITEM_STATE_x defines
* ci: add support for gitlab
* other:
* preparatory work for more checksum algorithms
* docs update
* switch to docbook5 backend for asciidoc
* fix build on uClibc due to missing backtrace()
* lots of printf format fixups
btrfs-progs-5.3.1 (2019-10-25)
""""""""""""""""""""""""""""""
* libbtrfs: fix link breakage due to missing symbols
btrfs-progs-5.2 (2019-07-05)
----------------------------
* subvol show: print qgroup information when available
* scrub:
* status: show ETA, revamp the whole output
* fix reading/writing of last position on resume/cancel, potentially
skipping part of the filesystem on next resume
* dump-tree: add new option --noscan to use only devices given on the
command line
* all-in-one binary (busybox style) with mkfs.btrfs, btrfs-image,
btrfs-convert, btrfstune
* image: fix hang when there are more than 32 cpus online and compression is
requested
* convert: fix some false ENOSPC errors when --rootdir is used
* build: fix gcc9 warnings
* core changes
* command handling cleanups
* dead code removal
* cmds-* files moved to cmds/
* other shared userspace files moved to common/
* utils.c split into more files
* preparatory work for more output formats
* libbtrfsutil: fix unaligned access
* other
* new and updated tests
* fix tests so CI passes again
* sb-mod can modify more superblock items
btrfs-progs-5.2.1 (2019-07-26)
""""""""""""""""""""""""""""""
* scrub status: fix ETA calculation after resume
* check: fix crash when using -Q
* restore: fix symlink owner restoration
* mkfs: fix regression with mixed block groups
* core: fix commit to process all delayed refs
* other:
* minor cleanups
* test updates
btrfs-progs-5.2.2 (2019-09-05)
""""""""""""""""""""""""""""""
* check:
* fix false report of wrong byte count for orphan inodes
* option -E was not handled correctly
* new check and repair for root item generation
* balance: check for full-balance before background fork
* mkfs: check that total device size does not overflow 16EiB
* dump-tree: print DEV_STATS key type
* other:
* new and updated tests
* doc fixups and updates
btrfs-progs-5.1 (2019-05-17)
----------------------------
* (version 5.0 skipped)
* check:
* repair: flush/FUA support to avoid breaking metadata COW
* file extents repair no longer relies on data in extent tree
* lowmem: fix false error reports about gaps between extents
* add inode mode check and repair for various objects
* add check for invalid combination of nocow/compressed extents
* device scan: new option to forget scanned devices
* mkfs: use same chunk size as kernel for initial creation
* dev-replace: better report when other exclusive operation is running
* help: for syntax errors on command line, print only the relevant messages,
not the whole help text
* receive:
* new option for quiet mode
* on -vv print information about written ranges
* fix endless loop with --dump on an invalid stream
* defrag: able open files in RO mode (needs kernel support to work)
* dump-tree: --block can be specified multiple times
* libbtrfsutil: fix: don't close fd on error in btrfs_util_subvolume_id_fd
* core:
* add sync before superblock write
* better error handling on the transaction commit path
* try to find best copy when reading tree blocks
* update backup roots on commit transaction
* other:
* fuzz tests pass and are enabled in CI
* cleanups
* new tests
btrfs-progs-5.1.1 (2019-06-11)
""""""""""""""""""""""""""""""
* convert and mkfs will try to use optimized crc32c
* fi show: accept a file-backed image
* fi show: fix possible crash when device is deleted in parallel
* build:
* support extra flags for python bindings
* separate LDFLAGS for libbtrfsutil
* other:
* space reservation fixes or debugging improvements
* V0 extent code removed
* more tests and cleanups
btrfs-progs-4.x (2019-02-25)
----------------------------
btrfs-progs-4.20 (2019-01-19)
"""""""""""""""""""""""""""""
* new feature: metadata uuid
* lightweight change of UUID without rewriting all metadata
(incompatible change)
* done by btrfstune -m/-M
* needs kernel support, 5.0+
* image:
* fix block groups when restoring from multi-device image
* only enlarge result image if it's a regular file
* check
* more device extent checks and fixes
* can repair dir item with mismatched hash
* mkfs: uuid tree created with proper contents
* fix mount point detection due to partial prefix match
* other:
* new tests
* libbtrfsutil: fix tests if kernel lacks support for new subvolume ioctls
* build fixes
* doc fixes
btrfs-progs-4.20.1 (2019-01-23)
* libbtrfs: fix build of external tools due to missing symbols
* ci: enable library test
btrfs-progs-4.20.2 (2019-02-25)
* ci: use newer distro for builds
* dump-super: minor output fixup
* revert fix for prefix detection of receive path, this is temporary and
unbreaks existing user setups
btrfs-progs-4.19 (2018-11-03)
"""""""""""""""""""""""""""""
* check: support repair of fs with free-space-tree feature
* core:
* port delayed ref infrastructure from kernel
* support write to free space tree
* dump-tree: new options for BFS and DFS enumeration of b-trees
* quota: rescan is now done automatically after 'assign'
* btrfstune: incomplete fix to uuid change
* subvol: fix 255 char limit checks
* completion: complete block devices and now regular files too
* docs:
* ship uncompressed manual pages
* btrfsck uses a manual page link instead of symlink
* other
* improved error handling
* docs
* new tests
btrfs-progs-4.19.1 (2018-12-05)
* build fixes
* big-endian builds fail due to bswap helper clashes
* 'swap' macro is too generic, renamed to prevent build failures
* libbtrfs
* minor version update to 1.1.0
* fix default search to top=0 as documented
* rename 'async' to avoid future python binding problems
* add support for unprivileged subvolume listing ioctls
* added tests, API docs
* other
* lot of typos fixed
* warning cleanups
* doc formatting updates
* CI tests against zstd 1.3.7
btrfs-progs-4.18 (skipped)
""""""""""""""""""""""""""
btrfs-progs-4.17 (2018-06-14)
"""""""""""""""""""""""""""""
* check
* many lowmem mode improvements
* properly report qgroup mismatch errors
* check symlinks with append/immutable flags
* fi usage
* correctly calculate allocated/unallocated for raid10
* minor output updates
* mkfs
* detect ENOSPC on thinly provisioned devices
* fix spurious EEXIST during directory traversal
* restore: fix relative path for restore target
* dump-tree: print symbolic tree names for backrefs
* send: fix regression preventing send -p with subvolumes mounted on "/"
* corrupt-tree: refactoring and command line updates
* build
* make it work with e2fsprogs < 1.42 again
* restore support for autoconf 2.63
* detect if -std=gnu90 is supported
* other
* new tests
* cleanups
btrfs-progs-4.17.1 (2018-08-06)
* check:
* add ability to fix wrong ram_bytes for compressed inline files
* beautify progress output
* btrfstune: allow to continue uuid change after unclean interruption
* several fuzz fixes:
* detect overlapping chunks
* chunk loading error handling
* don't crash with unexpected root refs to extents
* relax option parsing again to allow mixing options and non-options
arguments
* fix qgroup rescan status reporting
* build:
* drop obsolete dir-test
* new configure option to disable building of tools
* add compatibility options --disable-static and --disable-shared
* other:
* cleanups and preparatory work
* new test images
btrfs-progs-4.16 (2018-04-06)
"""""""""""""""""""""""""""""
* libbtrfsutil - new LGPL library to wrap userspace functionality
* several 'btrfs' commands converted to use it:
* properties
* filesystem sync
* subvolume set-default/get-default/delete/show/sync
* python bindings, tests
* build
* use configured pkg-config path
* CI: add python, musl/clang, built dependencies caching
* convert: build fix for e2fsprogs 1.44+
* don't install library links with wrong permissions
* fixes
* prevent incorrect use of subvol_strip_mountpoint
* dump-super: don't verify csum for unknown type
* convert: fix inline extent creation condition
* check:
* lowmem: fix false alert for 'data extent backref lost for snapshot'
* lowmem: fix false alert for orphan inode
* lowmem: fix false alert for shared prealloc extents
* mkfs:
* add UUID and otime to root of FS_TREE - with the uuid, snapshots will
be now linked to the toplevel subvol by the parent UUID
* don't follow symlinks when calculating size
* pre-create the UUID tree
* fix --rootdir with selinux enabled
* dump-tree: add option to print only children nodes of a given block
* image: handle missing device for RAID1
* other
* new tests
* test script cleanups (quoting, helpers)
* tool to edit superblocks
* updated docs
btrfs-progs-4.16.1 (2018-04-24)
* remove obsolete tools: btrfs-debug-tree, btrfs-zero-log, btrfs-show-super,
btrfs-calc-size
* sb-mod: new debugging tool to edit superblock items
* mkfs: detect if thin-provisioned device does not have enough space
* check: don't try to verify checksums on metadata dump images
* build: fail documentation build if xmlto is not found
* build: fix build of btrfs.static
btrfs-progs-4.15 (2018-02-01)
"""""""""""""""""""""""""""""
* mkfs --rootdir reworked, does not minimize the final image but can be still
done using a new option --shrink
* fix allocation of system chunk, don't allocate from the reserved area
* other
* new and updated tests
* cleanups, refactoring
* doc updates
btrfs-progs-4.15.1 (2018-02-16)
* build
* fix build on musl
* support asciidoctor for doc generation
* cleanups
* sync some code with kernel
* check: move code to own directory, split to more files
* tests
* more build tests in travis
* tests now pass with asan and ubsan
* testsuite can be exported and used separately
btrfs-progs-4.14 (2017-11-16)
"""""""""""""""""""""""""""""
* build: libzstd now required by default
* check: more lowmem mode repair enhancements
* subvol set-default: also accept path
* prop set: compression accepts no/none, same as ""
* filesystem usage: enable for filesystem on top of a seed device
* rescue: new command fix-device-size
* other
* new tests
* cleanups and refactoring
* doc updates
btrfs-progs-4.14.1 (2018-01-05)
* dump-tree: print times of root items
* check: fix several lowmem mode bugs
* convert: fix rollback after balance
* other
* new and updated tests, enabled lowmem mode in CI
* docs updates
* fix travis CI build
* build fixes
* cleanups
btrfs-progs-4.13 (2017-09-08)
"""""""""""""""""""""""""""""
* convert: reiserfs support
* check: new option --force to allow check of a mounted filesystem (no repair)
* mkfs: --rootdir will now copy special files
* dump-tree: minor output changes
* inspect rootid: accept file as argument
* dev usage: don't calculate slack space for missing devices
* fi du: don't print error on EMPTY_SUBVOL (inode number 2)
* build:
* fixed support for sanitization features on gcc (tsan, asan, ubsan)
* fix PIE build
* other:
* misc cleanups and stability fixes
* travis CI enhancements
* new tests, fuzzed images
* testsuite cleanups
btrfs-progs-4.13.1 (2017-09-25)
* image: speed up generating the sanitized names, do not generate unprintable chars
* completion: add missing commands, better mount point detection
* restore: add zstd support; libzstd detected automatically, will be
requested by default in the future, or can be configured out
* other:
* misc fixes found by sparse
* doc enhancements, ioctl manual page started
* updated and new tests
* build fixes
btrfs-progs-4.13.2 (2017-10-06)
* subvol list:
* don't list toplevel subvolume among deleted (broken since 4.8.3)
* minor adjustments of uuid print format
* subvol delete:
* fix swapped behaviour of --commit-each and --commit-after
* fix potentially lost sync if subvolumes are from different filesystems
* check: add cache for metadata blocks, should improve performance
* other:
* new tests, testsuite updates
* doc updates
* cleanups
btrfs-progs-4.13.3 (2017-10-16)
* check: fix --force, wrong check for a mounted block device
* build: fix --with-convert parsing
* subvol list: don't list TOPLEVEL
* other: update tests
btrfs-progs-4.12 (2017-07-26)
"""""""""""""""""""""""""""""
* subvol show: new options --rootid, --uuid to show subvol by the given spec
* convert: progress report fixes, found by tsan
* image: progress report fixes, found by tsan
* fix infinite looping in find-root, or when looking for free extents
* other:
* code refactoring
* docs updates
* build: ThreadSanitizer support
* tests: stricter checks for mounted filesystem
btrfs-progs-4.12.1 (2017-08-25)
* build:
* fix cross-compilation
* use gnu90 explicitly
* dump-tree: more relaxed checks so -b can print block on a damaged fs
* convert: fix the 1MB range exclusion
* check: more dir_item hash checks
* other
* added missing getopt spec for some options
* doc fixes
* cleanups
* test updates
btrfs-progs-4.11 (2017-05-18)
"""""""""""""""""""""""""""""
* receive: fix handling empty stream with -e (multi-stream)
* send dump: fix printing long file names
* stability fixes for: dump-super, print-tree, check
* option parser updates: global options are parsed before the subcommand name
(old xfstests will fail)
* new and updated tests
* documentation updates
btrfs-progs-4.11.1 (2017-06-30)
* image: restoring from multiple devices
* dev stats: make --check option work
* check: fix false alert with extent hole on a NO_HOLE filesystem
* check: lowmem mode, fix false alert in case of mixed inline and compressed
extent
* convert: work with large filesystems (many TB)
* convert: fix overwriting of eb header flags
* convert: do not clear NODATASUM flag in inodes when run with --no-datasum
* docs updates
* build: sync Android.mk with Makefile
* tests:
* new tests
* fix 008 and 009, shell quotation mistake
btrfs-progs-4.10 (2017-03-08)
"""""""""""""""""""""""""""""
* send: dump output fixes: missing newlines
* check: several fixes for the lowmem mode, improved error reporting
* build
* removed some library deps for binaries that not use them
* ctags, cscope
* split Makefile to the autotool generated part and the rest, not needed
to autogen.sh after adding a file
* shared code: sync easy parts with kernel sources
* other
* lots of cleanups
* source file reorganization: convert, mkfs, utils
* lots of spelling fixes in docs, other updates
* more tests
btrfs-progs-4.10.1 (2017-03-17)
* receive: handle subvolume in path clone
* convert: rollback fixed (rewrite was needed to address previous design issues)
* build: fix build of 3rd party tools, missing
* dump-tree: print log trees
* other
* new and updated tests
btrfs-progs-4.10.2 (2017-03-31)
* check: lowmem mode fix for false alert about lost backrefs
* convert: minor bugfix
* library: fix build, missing symbols, added tests
btrfs-progs-4.9 (2016-12-23)
""""""""""""""""""""""""""""
* check: many lowmem mode updates
* send: use splice syscall to copy buffer from kernel
* receive: new option to dump the stream in textual form
* convert:
* move sources to own directory
* prevent accounting of blocks beyond end of the device
* make it work with 64k sectorsize
* mkfs: move sources to own directory
* defrag: warns if directory used without -r
* dev stats:
* new option to check stats for non-zero values
* add long option for -z
* library: version bump to 0.1.2, added subvol_uuid_search2
* other:
* cleanups
* docs updates
btrfs-progs-4.9.1 (2017-01-27)
* check:
* use correct inode number for lost+found files
* lowmem mode: fix false alert on dropped leaf
* size reports: negative numbers might appear in size reports during device
deletes (previously in EiB units)
* mkfs: print device being trimmed
* defrag: v1 ioctl support dropped
* quota: print message before starting to wait for rescan
* qgroup show: new option to sync before printing the stats
* other:
* corrupt-block enhancements
* backtrace and co. cleanups
* doc fixes
btrfs-progs-4.8 (2016-10-05)
""""""""""""""""""""""""""""
* error handling improvements all over the place
* new fuzzed images, test updates
* doc fixups
* minor cleanups and improvements
* kernel library helpers moved to own directory
* qgroup: fix regression leading to incorrect status after check,
introduced in 4.7
btrfs-progs-4.8.1 (2016-10-12)
* 32bit builds fixed
* build without backtrace support fixed
btrfs-progs-4.8.2 (2016-10-26)
* convert: also convert file attributes
* convert: fix wrong tree block alignment for unaligned block group
* check: quota verify fixes, handle reloc tree
* build: add stub for FIEMAP_EXTENT_SHARED, compiles on ancient kernels
* build: add stub for BUILD_ASSERT when ioctl.h is included
* dump-tree: don't crash on unrecognized tree id for -t
* tests:
* add more ioctl tests
* convert: more symlink tests, attribute tests
* quota verify for reloc tree
* other cleanups
btrfs-progs-4.8.3 (2016-11-11)
* check:
* support for clearing space cache (v1)
* size reduction of inode backref structure
* send:
* fix handling of multiple snapshots (-p and -c options)
* transfer buffer increased (should reduce number of context switches)
* reuse existing file for output (-f), eg. when root cannot create files (NFS)
* dump-tree:
* print missing items for various structures
* new: dev stats, balance status item
* sync key names with kernel (the persistent items)
* subvol show: now able to print the toplevel subvolume -- the creation time
might be wrong though
* mkfs:
* store the creation time of toplevel root inode
* print UUID in the summary
* build: travis CI for devel
* other:
* lots of cleanups and refactoring
* switched to on-stack path structure
* fixes from coverity, asan, ubsan
* new tests
* updates in testing infrastructure
* fixed convert test 005
btrfs-progs-4.8.4 (2016-11-25)
* check: support for clearing space cache v2 (free-space-tree)
* send:
* more sanity checks (with tests), cleanups
* fix for fstests/btrfs/038 and btrfs/117 failures
* build:
* fix compilation of standalone ioctl.h, pull NULL definition
* fix library link errors introduced in 4.8.3
* tests:
* add more fuzzed images from bugzilla
* add bogus send stream checks
* fixups and enhancements for CI environment builds
* misc refinements and updates of testing framework
* other:
* move sources for btrfs-image to own directory
* deprecated and not build by default: btrfs-calc-size, btrfs-show-super
* docs updates
btrfs-progs-4.8.5 (2016-11-30)
* receive: fix detection of end of stream (error reported even for valid
streams)
* other:
* added test for the receive bug
* fix linking of library-test
btrfs-progs-4.7 (2016-07-29)
""""""""""""""""""""""""""""
* convert: fix creating discontig extents
* check: speed up traversing heavily reflinked extents within a file
* check: verify qgroups of higher levels
* check: repair can now fix wrong qgroup numbers
* balance: new option to run in the background
* defrag: default extent target size changed to 32MiB
* du: silently skip non-btrfs dirs/files
* documentation updates: btrfs(5), btrfs(8), balance, subvolume, scrub,
filesystem, convert
* bugfixes:
* unaligned access (reported for sparc64) in raid56 parity calculations
* use /bin/bash
* other stability fixes and cleanups
* more tests
btrfs-progs-4.7.1 (2016-08-25)
* check:
* new optional mode: optimized for low memory usage (memory/io tradeoff)
* --mode=lowmem, not default, still considered experimental
* does not work with --repair yet
* convert: regression fix, ext2_subvol/image rw permissions
* mkfs/convert:
* two-staged creation, partially created filesystem will not be recognized
* improved error handling (fewer BUG_ONs)
* convert: preparation for more filesystems to convert from
* documentation updates: quota, qgroup
* other
* message updates
* more tests
* more build options, enhanced debugging
btrfs-progs-4.7.2 (2016-09-05)
* check:
* urgent fix: false report of backref mismatches; do not --repair
last unaffected version 4.6.1 (code reverted to that state)
* fuzzing and fixes
* added more sanity checks for various structures
* testing images added
* build: udev compatibility: do not install .rules on version < 190
* other:
* dump-super: do not crash on garbage value in csum_type
* minor improvements in messages and help strings
* documentation:
* filesystem features
btrfs-progs-4.7.3 (2016-09-21)
* fixed free space tree compat status
* check: low-mem mode: handle partially dropped snapshots
* dump-super: consolidate options for superblock copy
* tree-stats: check mount status
* subvol delete: handle verbosity option
* defrag: print correct error string
* mkfs: fix reading rotational status
* other:
* UBSAN build option
* documentation updates
* enhanced tests: convert, fuzzed images, more tools to run on fuzzed
images
btrfs-progs-4.6 (2016-06-10)
""""""""""""""""""""""""""""
* convert - major rewrite:
* fix a long-standing bug that led to mixing data blocks into metadata block
groups
* the workaround was to do full balance after conversion, which was
recommended practice anyway
* explicitly set the lowest supported version of e2fstools to 1.41
* provide and install udev rules file that addresses problems with device
mapper devices, renames after removal
* send: new option: quiet
* dev usage: report slack space (device size minus filesystem area on the dev)
* image: support DUP
* build: short options to enable debugging builds
* other:
* code cleanups
* build fixes
* more tests and other enhancements
btrfs-progs-4.6.1 (2016-06-24)
* filesystem resize: negative resize argument accepted again
* qgroup rescan: fix skipping when rescan is in progress
* mkfs: initialize stripesize to correct value
* testsuite updates, mostly convert tests
* documentation updates
* btrfs-device, btrfs-restore manual pages enhanced
* misc fixups
btrfs-progs-4.5 (2016-03-20)
""""""""""""""""""""""""""""
New/moved commands:
* btrfs-show-super -> btrfs inspect-internal dump-super
* btrfs-debug-tree -> btrfs inspect-internal dump-tree
New commands:
* btrfs filesystem du - calculate disk usage, including shared extents
Enhancements:
* device delete - delete by id (needs kernel support, not merged to
4.6)
* check - new option to specify chunk root
* debug-tree/dump-tree - option -t understands human readable name of
the tree (along numerical ids)
* btrfs-debugfs - can dump block group information
Bugfixes:
* all commands should accept the option separator "--"
* several fixes in device scan
* restore works on filesystems with sectorsize > 4k
* debug-tree/dump-tree - print compression type as string
* subvol sync: fix crash, memory corruption
* argument parsing fixes: subvol get-default, qgroup create/destroy/
assign, inspect subvolid-resolve
* check for block device or regular file in several commands
Other:
* documentation updates
* manual pages for the moved tools now point to btrfs-filesystem
* testsuite updates
btrfs-progs-4.5.1 (2016-03-31)
* mkfs: allow DUP on multi-device filesystems
* bugfixes: build fixes, assorted other fixes
btrfs-progs-4.5.2 (2016-05-02)
* new/moved command: btrfs-calc-stats -> btrfs inspect tree-stats
* check: fix false alert for metadata blocks crossing stripe boundary
* check: catch when qgroup numbers mismatch
* check: detect running quota rescan and report mismatches
* balance start: add safety delay before doing a full balance
* filesystem sync: is now silent
* filesystem show: don't miss filesystems with partially matching uuids
* dev ready: accept only one argument for device
* dev stats: print "devid:N" for a missing device instead of "(null)"
* other:
* lowest supported version of e2fsprogs is 1.41
* minor cleanups, test updates
btrfs-progs-4.5.3 (2016-05-11)
* ioctl: fix unaligned access in buffer from TREE_SEARCH; might cause SIGBUS
on architectures that do not support unaligned access and do not perform
any fixups
* improved validation checks of superblock and chunk-related structures
* subvolume sync: fix handling of -s option
* balance: adjust timing of safety delay countdown with --full-balance
* rescue super-recover: fix reversed condition check
* check: fix bytes_used accounting
* documentation updates: mount options, scrub, send, receive, select-super,
check, mkfs
* testing: new fuzzed images, for superblock and chunks
btrfs-progs-4.4 (2016-01-18)
""""""""""""""""""""""""""""
User visible changes:
* mkfs.btrfs --data dup
People asked about duplicating data on a single device for a long time. There
are no technical obstacles preventing that, so it got enabled with a warning
about potential dangers when the device will not do the duplicated copies. See
mkfs.btrfs section DUP PROFILES ON A SINGLE DEVICE.
* support balance filters added/enhanced in linux 4.4
* usage=min..max -- enhanced to take range
* stripes=min..max -- new, filter by stripes for raid0/10/5/6
* limit=min..max -- enhanced to take range
Note: due to backward compatibility, the range maximum for 'usage' is not
inclusive as for the others, to keep the same behaviour as usage=N .
* manual pages enhanced (btrfs, mkfs, mount, filesystem, balance)
* error messages updates, rewordings -- some fstests may break due to that
* added support for free-space-tree implementation of space cache -- this
requires kernel 4.5 and is not recommended for non-developers yet
* btrfs filesystem usage works with mixed blockgroups
Other:
* installation to /usr/local -- this has unintentionally changed during
conversion to autotools in 3.19
* check: fix a false alert where extent record has wrong metadata flag
* improved stability on fuzzed/crafted images when reading sys array in
superblock
* build: the 'ar' tool is properly detected during cross-compilation
* debug-tree: option -t understands ids for tree root and chunk tree
* preparatory work for btrfs-convert rewrite
* sparse, gcc warning fixes
* more memory allocation failure handling
* cleanups
* more tests
Bugfixes:
* chunk recovery: fix floating point exception
* chunk recovery: endianness bugfix during rebuild
* mkfs with 64K pages and nodesize reported superblock checksum mismatch
* check: properly reset nlink of multi-linked file
btrfs-progs-4.4.1 (2016-02-26)
* find-root: don't skip the first chunk
* free-space-tree compat bits fix
* build: target symlinks
* documentation updates
* test updates
btrfs-progs-4.3 (2015-11-06)
""""""""""""""""""""""""""""
* mkfs
* mixed mode is not forced for filesystems smaller than 1GiB
* mixed mode broken with mismatching sectorsize and nodesize, fixed
* print version info earlier
* print devices sorted by id
* do not truncate target image with --rootsize
* filesystem usage:
* don't print global block reserve
* print device id
* minor output tuning
* other cleanups
* calc-size:
* div-by-zero fix on an empty filesystem
* fix crash
* bugfixes:
* more superblock sanity checks
* consistently round size of all devices down to sectorsize
* misc leak fixes
* convert: don't try to rollback with a half-deleted ext2_saved subvolume
* other:
* check: add progress indicator
* scrub: enhanced error message
* show-super: read superblock from a given offset
* add README
* docs: update manual page for mkfs.btrfs, btrfstune, balance,
convert and inspect-internal
* build: optional build with more warnings (W=...)
* build: better support for static checkers
* build: html output of documentation
* pretty-print: last_snapshot for root_item
* pretty-print: stripe dev uuid
* error reporting wrappers, introduced and example use
* refactor open_file_or_dir
* other docs and help updates
* testing:
* test for nodes crossing stripes
* test for broken 'subvolume sync'
* basic tests for mkfs, raid option combinations
* basic tests for fuzzed images (check)
* command instrumentation (eg valgrind)
* print commands if requested
* add README for tests
btrfs-progs-4.3.1 (2015-11-16)
* fixes
* device delete: recognize 'missing' again
* mkfs: long names are not trimmed when doing ssd check
* support partitioned loop devices
* other
* replace several mallocs with on-stack variables
* more memory allocation failure handling
* add tests for bugs fixed
* cmd-device: switch to new message printing helpers
* minor code cleanups
btrfs-progs-4.2 (2015-09-03)
""""""""""""""""""""""""""""
* enhancements:
* mkfs: do not create extra single chunks on multiple devices
* resize: try to guess the minimal size, 'inspect min-dev-size'
* qgroup assign: add option to schedule rescan
* chunk-recover: be more verbose about the scanning process
* fixes:
* check:
* find stripes crossing stripe boundary -- created by convert
* print correct range for file hole when there are no extents
and learn how to fix it
* replace: more sanity checks
* convert: concurrency fixes related to reporting progress
* find-root: option -a will not skip the current root anymore
* subvol list: fix occasional crash
* do not create stripes crossing stripe boundary
* build:
* fixes for musl libc
* preliminary support for android (not working yet, more code changes
needed)
* new EXTRA_CFLAGS and EXTRA_LDFLAGS
* other:
* lots of cleanups
* tests: lots of updates, new tests, framework improvements
* documentation updates
* debugging: print-tree shows stripe length
btrfs-progs-4.2.1 (2015-09-20)
* fix an off-by-one error in cross-stripe boundary check
* if nodesize was 64k, any metadata block was reported as crossing,
this leads to mkfs failure for example due to "no free blocks
found"
* for other nodesizes, if the end of the metadata block was 64k
aligned, it was incorrectly reported by fsck
* convert: don't write uninitialized data to image
* image:
* don't loop with option -t0
* don't create threads if compression is not requested
* other: minor cleanups
btrfs-progs-4.2.2 (2015-10-05)
* filesystem label: use fallback if the label ioctl is not available
* convert: check nodesize constraints against command line features (-O)
* scrub: report status 'running' until all devices are finished
* device scanning might crash in some scenarios
* filesystem usage: print summary for non-root users
btrfs-progs-4.2.3 (2015-10-19)
* subvol sync: make it actually work again: it's been broken since 4.1.2,
due to a reversed condition it returned immediately instead of waiting
* scanning: do not scan already discovered filesystems (minor optimization)
* convert: better error message in case the filesystem is not finalized
* restore: off-by-one symlink path check fix
btrfs-progs-4.1 (2015-06-22)
""""""""""""""""""""""""""""
Bugfixes:
* fsck.btrfs: no bash-isms
* bugzilla 97171: invalid memory access (with tests)
* receive:
* cloning works with --chroot
* capabilities not lost
* mkfs: do not try to register bare file images
* option --help accepted by the standalone utilities
Enhancements:
* corrupt block: ability to remove csums
* mkfs:
* warn if metadata redundancy is lower than for data
* options to make the output quiet (only errors)
* mixed case names of raid profiles accepted
* rework the output:
* more comprehensive, 'key: value' format
* subvol:
* show:
* print received uuid
* update the output
* new options to specify size units
* sync: grab all deleted ids and print them as they're removed,
previous implementation only checked if there are any to be
deleted - change in command semantics
* scrub: print timestamps in days HMS format
* receive:
* can specify mount point, do not rely on /proc
* can work inside subvolumes
* send: new option to send stream without data (NO_FILE_DATA)
* convert: specify incompat features on the new fs
* qgroup:
* show: distinguish no limits and 0 limit value
* limit: ability to clear the limit
* help for 'btrfs' is shorter, 1st level command overview
* debug tree: print key names according to their C name
New:
* rescue zero-log
* btrfstune:
* rewrite uuid on a filesystem image
* new option to turn on NO_HOLES incompat feature
Deprecated:
* standalone btrfs-zero-log
Other:
* testing framework updates
* uuid rewrite test
* btrfstune feature setting test
* zero-log tests
* more testing image formats
* manual page updates
* ioctl.h synced with current kernel uapi version
* convert: preparatory works for more filesystems (reiserfs pending)
* use static buffers for path handling where possible
* add new helpers for send utils that check memory allocations,
switch all users, deprecate old helpers
* Makefile: fix build dependency generation
* map-logical: make it work again
btrfs-progs-4.1.1 (2015-07-10) -- Do not use this version!
Bugfixes:
* defrag: threshold overflow fix
* fsck:
* check if items fit into the leaf space
* fix wrong nbytes
* mkfs:
* create only desired block groups for single device
* preparatory work for fix on multiple devices
Enhancements:
* new alias for 'device delete': 'device remove'
Other:
* fix compilation on old gcc (4.3)
* documentation updates
* debug-tree: print nbytes
* test: image for corrupted nbytes
* corrupt-block: let it kill nbytes
btrfs-progs-4.1.2 (2015-07-14)
* urgent bugfix: mkfs creates invalid filesystem, must be recreated
btrfs-progs-4.0 (2015-04-29)
""""""""""""""""""""""""""""
* resize:
* don't accept file as an argument (it's confusing)
* print better error message in case of an error
* restore: optionally restore metadata (time, mode, uid/gid)
* receive: optionally enforce chroot
* new rescue subcommand 'zero-log', same as btrfs-zero-log, but now also
part of the main utility
* check:
* free space checks match kernel, fixes incorrect reports
* convert: fix setting of checksum bit if --no-datasum is used
* fsck.btrfs: don't print messages
* fix quota rescan on PPC64 (mangled ioctl number)
* test updates
* documentation: files renamed to .asciidoc, misc fixups
btrfs-progs-4.0.1 (2015-05-20)
* restore:
* can restore symlinks, new option --symlinks
* long option variants added
* convert: dropped dependency on acl.h header and libacl is not required
for build
* fix for 'check' crash
* device remove error message fix
* preparatory works for fsid change
btrfs-progs-3.x (2015-03-25)
----------------------------
btrfs-progs-3.19 (2015-03-11)
"""""""""""""""""""""""""""""
* build converted to autotools
* btrfs-image
* restore can now run in parallel threads
* fixed restore of multiple image from multiple devices onto a single
dev
* introduced metadump v2
* check: make --init-csum-tree and --init-extent-tree work together
* find-new: option to search through all metadata even if a root was
already found
* convert: show progress by default, can be turned off
* corrupt-block: option to work on a specific root
* bash completion script for all subcommands
btrfs-progs-3.19.1 (2015-03-25)
* convert:
* new option to specify metadata block size
* --no-progress actually works
* restore: properly handle the page boundary corner case
* build fixes:
* missing macro from public header, BTRFS_BUILD_VERSION
* wrong handling of --enable-convert
* filesystem usage: reports correct space for degraded mounts
* other:
* mkfs: help string updates
* completion: added 'usage' subcommands
* cleanups in qgroup code, preparatory work
btrfs-progs-3.18 (2014-12-30)
"""""""""""""""""""""""""""""
* mkfs - skinny-metadata feature is now on by default, first introduced in
kernel 3.10
* filesystem usage - give an overview of fs usage in a way that's more
comprehensible than existing 'filesystem df'
* device usage - more detailed information about per-device allocations
* check
* option to set a different tree root byte number
* ability to link lost files to lost+found, caused by a recent kernel bug
* repair of severely corrupted fs (use with care)
* convert - option to show progress
* subvol create - print the commit mode inline, print the global mode only
if --verbose
* other updates: musl-libc support, coverity bugfixes, new test images,
documentation
btrfs-progs-3.18.1 (2015-01-09)
* minor fixes
* documentation updates
btrfs-progs-3.18.2 (2015-01-27)
* qgroup show: print human readable sizes, options to say otherwise
* check: new option to explicitly say no to writes
* mkfs: message about trimming is not printed to stderr
* filesystem show: fixed return value
* tests: new infrastructure
* btrfstune: force flag can be used together with seeding option
* backtrace support is back
* getopt cleanups
* doc and help updates
btrfs-progs-3.17 (2014-10-17)
"""""""""""""""""""""""""""""
* check: --init-csum-tree actually does something useful, rebuilds the
whole csum tree
* /dev scanning for btrfs devices is gone
* /proc/partitions scanning is gone, blkid is used exclusively
* new subcommand subvolume sync
* filesystem df: new options to set unit format
* convert: allow to copy label from the origin, or specify a new one
btrfs-progs-3.17.1 (2014-11-04)
* filesystem df: argument handling
* fix linking with libbtrfs
* replace: better error reporting
* filesystem show: fixed stall if run concurrently with balance
* check: fixed argument parsing for --subvol-extents
* filesystem df: SI prefixes corrected
btrfs-progs-3.17.2 (2014-11-19)
* check improvements
* add ability to replace missing dir item/dir indexes
* fix missing inode items
* create missing root dirid
* corrupt block: enhancements for testing fsck
* zero-log: able to reset a fs with bogus log tree pointer (bug_72151)
btrfs-progs-3.17.3 (2014-12-04)
* convert: fix conversion of sparse ext* filesystems
* show: resolve to the correct path
* fsck: more verbose error for root dir problems
btrfs-progs-3.16 (2014-08-26)
"""""""""""""""""""""""""""""
* mkfs: new option to specify UUID, drop experimental notice
* check: new option to verify quotas, reduced memory requirements, new
option to print extent sharing
* restore: check length before decompression, more error handling, option
to loop during restoring
* balance: new filter 'limit'
* recover: allow to read all sb copies
* btrfstune: new option to force dangerous changes
* receive: new option to limit number of errors
* show-super: skip unrecognized sb, add option to force
* debug-tree: print tree by id
* documentation updates
btrfs-progs-3.16.1 (2014-09-15)
* print GlobalReserve in filesystem df output
* new option -R in subvol list
* library version defines
* static build is fixed
* build without documentation is possible
btrfs-progs-3.16.2 (2014-10-01)
* a few fixes in fsck and image tools
btrfs-progs-3.15 (skipped)
""""""""""""""""""""""""""
btrfs-progs-3.14 (2014-04-06)
"""""""""""""""""""""""""""""
* fsck: fixes and enhancements to --init-extent-tree mode
* fsck: chunk-recover updates
* scrub: add force option -f
* send: check if subvolumes are read-only
* subvol delete: add options to affect commit behaviour
* btrfs: add property command group
* restore: add dry-run option
* restore: fix restoring of compressed files
* mkfs: support for no-holes feature
* mkfs: option -r deals with hardlinks and relative paths
* mkfs: discard phase is interruptible
* documentation updates
btrfs-progs-3.14.1 (2014-04-18)
* properties: fix handling of option -t
* restore: fix reading of compressed extents
* minor code and doc updates
btrfs-progs-3.14.2 (2014-05-29)
* documentation is now written in asciidoc and there are manpages for each
subcommand
* misc bugfixes
btrfs-progs-3.13 (skipped)
""""""""""""""""""""""""""
btrfs-progs-3.12 (2013-11-25)
"""""""""""""""""""""""""""""
* announcement, tarballs
* first release after 0.19 (2009/06) with a lot of changes
btrfs-progs-6.14/COPYING 0000664 0000000 0000000 00000043134 14771053764 0014772 0 ustar 00root root 0000000 0000000
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
btrfs-progs-6.14/Documentation/ 0000775 0000000 0000000 00000000000 14771053764 0016543 5 ustar 00root root 0000000 0000000 btrfs-progs-6.14/Documentation/Administration.rst 0000664 0000000 0000000 00000001137 14771053764 0022264 0 ustar 00root root 0000000 0000000 Administration
==============
The main administration tool for BTRFS filesystems is :doc:`btrfs`.
Please refer to the manual pages of the subcommands for further documentation.
Other topics explaining features or concepts can be found in :doc:`btrfs-man5`.
Mount options
-------------
.. include:: ch-mount-options.rst
Bootloaders
-----------
.. include:: ch-bootloaders.rst
.. _administration-limits:
Filesystem limits
-----------------
.. include:: ch-fs-limits.rst
.. _administration-flexibility:
Flexibility
-----------
.. include:: ch-flexibility.rst
Sysfs
-----
.. include:: ch-sysfs.rst
btrfs-progs-6.14/Documentation/Auto-repair.rst 0000664 0000000 0000000 00000001400 14771053764 0021460 0 ustar 00root root 0000000 0000000 Auto-repair on read
===================
If data or metadata are found to be damaged at the time they’re read from a device,
for example because the checksum does not match, they can be salvaged if the filesystem
has another valid copy. This can be achieved by using a block group profile with redundancy
like DUP, RAID1-like, or RAID5/6.
The correct data is returned to the user application and the damaged copy is replaced by it.
When this happens, a message is emitted to the system log.
If there are multiple copies of data and one of them is damaged but not read by the user
application, then this is not detected.
To ensure the verification and automatic repair of all data and metadata copies, the
:doc:`scrub` operation must be initiated manually.
btrfs-progs-6.14/Documentation/Balance.rst 0000664 0000000 0000000 00000000242 14771053764 0020620 0 ustar 00root root 0000000 0000000 Balance
=======
.. include:: ch-balance-intro.rst
Filters
-------
.. include:: ch-balance-filters.rst
Examples
--------
.. include:: ch-balance-examples.rst
btrfs-progs-6.14/Documentation/CHANGES.rst 0000664 0000000 0000000 00000000260 14771053764 0020343 0 ustar 00root root 0000000 0000000 Changes (btrfs-progs)
=====================
Signed release tarballs can be found at https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/
.. include:: ../CHANGES
btrfs-progs-6.14/Documentation/Checksumming.rst 0000664 0000000 0000000 00000000074 14771053764 0021713 0 ustar 00root root 0000000 0000000 Checksumming
============
.. include:: ch-checksumming.rst
btrfs-progs-6.14/Documentation/CodingConventions 0000664 0000000 0000000 00000000634 14771053764 0022122 0 ustar 00root root 0000000 0000000 C style
-------
The kernel CodingStyle where applicable
https://www.kernel.org/doc/html/latest/process/coding-style.html
Error messages
--------------
* formatting:
* use `error("string ...")`
* no trailing newline
* small letter starts the first word
* no string splitting
* move string to new line if it's too long, un-indent to the left if it
exceeds 80 chars
* contents:
* be descriptive
btrfs-progs-6.14/Documentation/Common-features.rst 0000664 0000000 0000000 00000003663 14771053764 0022351 0 ustar 00root root 0000000 0000000 Common Linux features
=====================
The Linux operating system implements a POSIX standard interfaces and API with
additional interfaces. Many of them have become common in other filesystems. The
ones listed below have been added relatively recently and are considered
interesting for users:
birth/origin inode time
a timestamp associated with an inode of when it was created, cannot be
changed and requires the *statx* syscall to be read
statx
an extended version of the *stat* syscall that provides extensible
interface to read more information that are not available in original
*stat*
fallocate modes
the *fallocate* syscall allows to manipulate file extents
Supported modes:
- keep size (FALLOC_FL_KEEP_SIZE)
- hole punching (FALLOC_FL_PUNCH_HOLE)
- zero range (FALLOC_FL_ZERO_RANGE)
FIEMAP
an ioctl that enumerates file extents, related tool is :command:`filefrag`
filesystem label
another filesystem identification, could be used for mount or for better
recognition, can be set or read by an ioctl or by command
:ref:`btrfs filesystem label`
O_TMPFILE
mode of open() syscall that creates a file with no associated directory
entry, which makes it impossible to be seen by other processes and is
thus safe to be used as a temporary file
(https://lwn.net/Articles/619146/)
xattr, acl
extended attributes (xattr) is a list of *key=value* pairs associated
with a file, usually storing additional metadata related to security,
access control list in particular (ACL) or properties (:doc:`btrfs-property`)
cross-rename
mode of *renameat2* syscall that can atomically swap 2 directory
entries (files/directories/subvolumes/symlinks) within the same filesystem
File attributes, XFLAGS
-----------------------
.. include:: ch-file-attributes.rst
btrfs-progs-6.14/Documentation/Compression.rst 0000664 0000000 0000000 00000000071 14771053764 0021574 0 ustar 00root root 0000000 0000000 Compression
===========
.. include:: ch-compression.rst
btrfs-progs-6.14/Documentation/Contributors.rst 0000664 0000000 0000000 00000016716 14771053764 0022005 0 ustar 00root root 0000000 0000000 Contributors
============
The following companies contribute to Btrfs code, not counting the treewide and
other subsystem changes. Infrequent contributions are not reflected in this
list, please have a look to the git history for complete list.
Sorted by amount of contributions:
* SUSE
* Facebook
* Western Digital
* Oracle
The following contributed in the past (sorted alphabetically):
Fujitsu, Fusion-IO, Intel, Linux Foundation, Red Hat, STRATO AG.
.. list-table::
:header-rows: 0
* - .. figure:: plot-contribs.svg
:scale: 33%
:alt: Contributors
:target: `contributors-contribs`_
Contributors
- .. figure:: plot-sloc-lines.svg
:scale: 33%
:alt: Lines
:target: `contributors-lines`_
Lines
- .. figure:: plot-patches.svg
:scale: 33%
:alt: Patches
:target: `contributors-patches`_
Patches
Statistics for 6.x series
-------------------------
.. csv-table::
:header: "Version", "Contributors", "SLOC", "Raw lines", "Patches", "Diffstat"
:align: left
"6.0", "24", "109726", "156988", "192", "+4248 -3108"
"6.1", "28", "110850", "159284", "224", "+7738 -5442"
"6.2", "23", "111898", "161197", "289", "+11693 -9780"
"6.3", "19", "111615", "160912", "150", "+2824 -3108"
"6.4", "18", "110224", "159150", "180", "+3118 -4879"
"6.5", "19", "110377", "159415", "230", "+3193 -2928"
"6.6", "21", "110785", "160152", "153", "+2648 -1909"
"6.7", "18", "109562", "159074", "185", "+4376 -5476"
"6.8", "17", "109963", "160078", "134", "+4494 -3490"
"6.9", "19", "110727", "161231", "147", "+2476 -1323"
"6.10", "21", "110878", "161751", "154", "+2993 -2473"
"6.11", "18", "111848", "163484", "188", "+5776 -4043"
"6.12", "20", "111881", "163548", "148", "+1868 -1804"
"6.13", "25", "112756", "164722", "156", "+2780 -1579"
"6.14", "20", "114592", "167178", "147", "+3847 -1391"
Legend:
- *Files:* fs/btrfs/\*.[ch], fs/btrfs/tests/\*.[ch], include/uapi/linux/btrfs.h, include/uapi/linux/btrfs_tree.h, include/linux/btrfs.h, include/trace/events/btrfs.h
- *Version:* mainline version
- *Contributors:* number of people that sent patches that modified ''Files'', direct btrfs development or originating from other tree-wide changes
- *SLOC:* lines of code, http://dwheeler.com/sloccount/ (generated by version 2.26)
- *Raw lines:* counted by ''wc -l'' over ''Files''
- *Patches:* number of patches from ''Contributors'', merge commits excluded
- *Diffstat:* lines added and deleted in ''Files''
Statistics for 5.x series
-------------------------
.. csv-table::
:header: "Version", "Contributors", "SLOC", "Raw lines", "Patches", "Diffstat"
:align: left
"5.0", "15", "98298", "134159", "144", "+3173 -2297"
"5.1", "18", "98992", "135308", "116", "+2208 -1059"
"5.2", "22", "99888", "136521", "255", "+3524 -2311"
"5.3", "20", "100254", "137224", "124", "+4106 -3400"
"5.4", "18", "100660", "137889", "166", "+10752 -10087"
"5.5", "17", "100638", "138212", "168", "+3055 -2729"
"5.6", "18", "101482", "139742", "114", "+3370 -1840"
"5.7", "22", "101661", "140694", "221", "+4484 -3532"
"5.8", "21", "101562", "140930", "158", "+3176 -2940"
"5.9", "18", "101973", "141748", "188", "+2218 -1400"
"5.10", "22", "102378", "142760", "187", "+3148 -2135"
"5.11", "15", "102418", "143124", "229", "+4872 -4507"
"5.12", "20", "105026", "147099", "195", "+5310 -1316"
"5.13", "19", "105820", "148503", "145", "+3334 -1930"
"5.14", "19", "106324", "149550", "121", "+2823 -1774"
"5.15", "17", "106895", "151006", "133", "+2879 -1422"
"5.16", "24", "107854", "152760", "173", "+4770 -3016"
"5.17", "17", "107910", "153407", "154", "+4024 -3378"
"5.18", "30", "109159", "155372", "143", "+3489 -1523"
"5.19", "21", "109140", "155848", "202", "+4448 -3972"
Statistics for 4.x series
-------------------------
.. csv-table::
:header: "Version", "Contributors", "SLOC", "Raw lines", "Patches", "Diffstat"
:align: left
"4.0", "22", "85849", "115716", "97", "+1622 -937"
"4.1", "25", "87596", "118253", "120", "+2415 -1062"
"4.2", "19", "87935", "118790", "119", "+2392 -1855"
"4.3", "23", "88384", "119576", "74", "+1516 -730"
"4.4", "26", "89543", "121456", "138", "+3184 -1304"
"4.5", "26", "91708", "124363", "127", "+4370 -1462"
"4.6", "29", "92134", "125045", "100", "+1890 -1208"
"4.7", "33", "92922", "126264", "161", "+3721 -2502"
"4.8", "22", "93769", "127392", "114", "+2732 -1604"
"4.9", "25", "94237", "128040", "64", "+1959 -1311"
"4.10", "24", "94303", "128156", "105", "+4874 -4758"
"4.11", "24", "94365", "128340", "210", "+2084 -1900"
"4.12", "21", "94931", "129230", "85", "+1803 -913"
"4.13", "29", "93892", "127970", "135", "+2017 -1607"
"4.14", "28", "94296", "124346", "132", "+2114 -1520"
"4.15", "30", "97091", "132221", "128", "+3761 -1795"
"4.16", "25", "97637", "133305", "188", "+2562 -1481"
"4.17", "21", "98027", "133003", "194", "+2723 -3024"
"4.18", "26", "98387", "133667", "200", "+3643 -2979"
"4.19", "25", "97547", "132655", "193", "+2058 -3070"
"4.20", "22", "97830", "133283", "128", "+1560 -932"
Statistics for 3.x series
-------------------------
.. csv-table::
:header: "Version", "Contributors", "SLOC", "Raw lines", "Patches", "Diffstat"
:align: left
"3.0", "25", "48665", "65192", "126", "+7508 -5175"
"3.1", "24", "48647", "65248", "106", "+1762 -1586"
"3.2", "30", "51574", "69552", "184", "+6344 -2040"
"3.3", "27", "56216", "75485", "129", "+7151 -1218"
"3.4", "25", "57865", "77671", "118", "+4597 -2411"
"3.5", "21", "59683", "79983", "108", "+3570 -1258"
"3.6", "25", "65894", "88123", "104", "+9145 -1005"
"3.7", "30", "67348", "90171", "151", "+3802 -1754"
"3.8", "25", "70289", "93916", "161", "+5599 -1854"
"3.9", "29", "73414", "98602", "160", "+6430 -1242"
"3.10", "24", "74449", "99980", "133", "+3529 -2151"
"3.11", "21", "74875", "100657", "100", "+2538 -1857"
"3.12", "32", "76265", "102497", "158", "+4373 -2533"
"3.13", "24", "77532", "104108", "123", "+2741 -1123"
"3.14", "28", "79879", "107069", "171", "+5290 -2329"
"3.15", "27", "80308", "107544", "152", "+2389 -1914"
"3.16", "29", "82292", "110331", "137", "+4361 -1574"
"3.17", "19", "82625", "110841", "44", "+1060 -550"
"3.18", "25", "83910", "112906", "149", "+3696 -1631"
"3.19", "18", "85420", "115031", "82", "+2802 -677"
Statistics for 2.6.x series
---------------------------
.. csv-table::
:header: "Version", "Contributors", "SLOC", "Raw lines", "Patches", "Diffstat"
:align: left
"2.6.30", "22", "33838", "45377", "70", "+4403 -2632"
"2.6.31", "19", "38825", "51693", "68", "+9207 -2862"
"2.6.32", "15", "40211", "53515", "95", "+4291 -2469"
"2.6.33", "17", "40408", "53806", "43", "+1332 -1041"
"2.6.34", "18", "41100", "54715", "54", "+1374 -465"
"2.6.35", "14", "43014", "57082", "50", "+5230 -2863"
"2.6.36", "4", "43016", "57088", "6", "+39 -33"
"2.6.37", "17", "44781", "59491", "83", "+3104 -701"
"2.6.38", "23", "46573", "61980", "90", "+3472 -983"
"2.6.39", "28", "47206", "62859", "102", "+2115 -1236"
Graphs
------
.. _contributors-contribs:
Contributors
^^^^^^^^^^^^
.. image:: plot-contribs.svg
.. _contributors-lines:
Lines of code, raw lines
^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: plot-sloc-lines.svg
.. _contributors-patches:
Patches
^^^^^^^
.. image:: plot-patches.svg
btrfs-progs-6.14/Documentation/Convert.rst 0000664 0000000 0000000 00000000063 14771053764 0020714 0 ustar 00root root 0000000 0000000 Convert
=======
.. include:: ch-convert-intro.rst
btrfs-progs-6.14/Documentation/Custom-ioctls.rst 0000664 0000000 0000000 00000002005 14771053764 0022037 0 ustar 00root root 0000000 0000000 Custom ioctls
=============
Filesystems are usually extended by custom ioctls beyond the standard system
call interface to let user applications access the advanced features. They're
low level and the following list gives only an overview of the capabilities or
a command if available:
- reverse lookup, from file offset to inode, as command :command:`btrfs inspect-internal logical-resolve`
- resolve inode number to list of names, as command :command:`btrfs inspect-internal inode-resolve`
- tree search, given a key range and tree id, lookup and return all b-tree items
found in that range, basically all metadata at your hand but you need to know
what to do with them, the ioctl is privileged as it has full access to all
filesystem metadata
- informative, about devices, space allocation or the whole filesystem, many of
which is also exported in :file:`/sys/fs/btrfs/`
- query/set a subset of features on a mounted filesystem
Programming documentation of the ioctls is in the manual page
:doc:`btrfs-ioctl`.
btrfs-progs-6.14/Documentation/Deduplication.rst 0000664 0000000 0000000 00000006115 14771053764 0022064 0 ustar 00root root 0000000 0000000 Deduplication
=============
Going by the definition in the context of filesystems, it's a process of
looking up identical data blocks tracked separately and creating a shared
logical link while removing one of the copies of the data blocks. This leads to
data space savings while it increases metadata consumption.
There are two main deduplication types:
* **in-band** *(sometimes also called on-line)* -- all newly written data are
considered for deduplication before writing
* **out-of-band** *(sometimes also called offline)* -- data for deduplication
have to be actively looked for and deduplicated by the user application
Both have their pros and cons. BTRFS implements **only out-of-band** type.
BTRFS provides the basic building blocks for deduplication allowing other tools
to choose the strategy and scope of the deduplication. There are multiple
tools that take different approaches to deduplication, offer additional
features or make trade-offs. The following table lists tools that are known to
be up-to-date, maintained and widely used.
.. list-table::
:header-rows: 1
* - Name
- File based
- Block based
- Incremental
* - `BEES `_
- No
- Yes
- Yes
* - `duperemove `_
- Yes
- No
- Yes
File based deduplication
------------------------
The tool takes a list of files and tries to find duplicates among data only
from these files. This is suitable e.g. for files that originated from the same
base image, source of a reflinked file. Optionally the tool could track a
database of hashes and allow to deduplicate blocks from more files, or use that
for repeated runs and update the database incrementally.
Block based deduplication
-------------------------
The tool typically scans the filesystem and builds a database of file block
hashes, then finds candidate files and deduplicates the ranges. The hash
database is kept as an ordinary file and can be scaled according to the needs.
As the files change, the hash database may get out of sync and the scan has to
be done repeatedly.
Safety of block comparison
--------------------------
The deduplication inside the filesystem is implemented as an ``ioctl`` that takes
a source file, destination file and the range. The blocks from both files are
compared for exact match before merging to the same range (i.e. there's no
hash based comparison). Pages representing the extents in memory are locked
prior to deduplication and prevent concurrent modification by buffered writes
or mmapped writes. Blocks are compared byte by byte and not using any hash-based
approach, i.e. the existing checksums are not used.
Limitations, compatibility
--------------------------
Files that are subject to deduplication must have the same status regarding
COW, i.e. both regular COW files with checksums, or both NOCOW, or files that
are COW but don't have checksums (NODATASUM attribute is set).
If the deduplication is in progress on any file in the filesystem, the *send*
operation cannot be started as it relies on the extent layout being unchanged.
btrfs-progs-6.14/Documentation/Defragmentation.rst 0000664 0000000 0000000 00000003330 14771053764 0022403 0 ustar 00root root 0000000 0000000 Defragmentation
===============
Defragmentation of files is supposed to make the layout of the file extents to
be more linear or at least coalesce the file extents into larger ones that can
be stored on the device more efficiently. The reason there's a need for
defragmentation stems from the COW design that BTRFS is built on and is
inherent. The fragmentation is caused by rewrites of the same file data
in-place, that has to be handled by creating a new copy that may lie on a
distant location on the physical device. Fragmentation is the worst problem on
rotational hard disks due to the delay caused by moving the drive heads to the
distant location. With the modern seek-less devices it's not a problem though
it may still make sense because of reduced size of the metadata that's needed
to track the scattered extents.
File data that are in use can be safely defragmented because the whole process
happens inside the page cache, that is the central point caching the file data
and takes care of synchronization. Once a filesystem sync or flush is started
(either manually or automatically) all the dirty data get written to the
devices. This however reduces the chances to find optimal layout as the writes
happen together with other data and the result depends on the remaining free
space layout and fragmentation.
.. warning::
Defragmentation does not preserve extent sharing, e.g. files created by **cp
--reflink** or existing on multiple snapshots. Due to that the data space
consumption may increase.
Defragmentation can be started together with compression on the given range,
and takes precedence over per-file compression property or mount options.
See command :ref:`btrfs filesystem defrag`.
btrfs-progs-6.14/Documentation/DocConventions.rst 0000664 0000000 0000000 00000007724 14771053764 0022242 0 ustar 00root root 0000000 0000000 Conventions and style for documentation
---------------------------------------
Manual pages structure:
- add references to all external commands mentioned anywhere in the text to the *SEE ALSO* section
- add related, not explicitly mentioned commands or pages
- the heading levels are validated, underlined text by the following
- mandatory, manual page ``===``
- mandatory, sections ``---``
- optional, sub-sections ``^^^``
- optional, paragraphs ``"""``
- command-specific examples are mostly free of restrictions but should be
readable in all output formats (manual page, html)
- subcommands are in alphabetical order
- long command output or shell examples: verbatim output
- use ``..code-block::`` directive with ``bash`` or ``plain`` syntax highlighting
Quotes, reference, element formatting:
- exact syntax: monotype ````usage=0````
- reference to arguments: italics ``*italics*``
- command reference:
- any system command, example, bold text by directive ``:command:`btrfs filesystem show```
- subcommands with their own manual page ``:doc:`btrfs-filesystem```
- subcommand names should be spelled in full, i.e. *filesystem* instead of *fi*
- file, directory or path references: by directive ``:file:`/path```
- section references without a label: italics ``*EXAMPLES*``
- section references with a target label: reference by directive ``:ref:`visible text ```
- argument name in option description: caps in angle brackets ````
- reference in help text: caps ``NAME``
- also possible: caps italics ``*NAME*``
- command short description:
- command name: bold (not by directive) ``**command**``
- optional unspecified: brackets ``[options]``
- mandatory argument: angle brackets ````
- optional parameter with argument: ``[-p ]``
Referencing:
- add target labels for commands that are referenced and replace command name
with the reference target
- NOTE: we have either full doc reference by ``:doc:`docname``` or
inter-document reference to an **unambiguous** label
``:ref:`target-label```, i.e. this can't reference a label that may appear in
more files due to including, this will lead to the document itself that may
not be the full page
- **ambiguous** or duplicate labels (that exist in a file that is included from other documents)
need to be
- defined as ``.. duplabel:: labelname``
- referenced as ``:docref:`visible text ```
- generic links can use the free form link syntax with description ```Link text `__``
(note the double underscore, this is *anonymous* link and does not create a reference)
or plain link that will auto-render to a clickable link https://example.com
- in manual pages: always use full link as it's meant to be read in terminal
output and must allow copy&paste
- own manual page references:
- ``:doc:`btrfs-filesystem```, i.e. it's the document name, it will render the section automatically
- other manual pages ``:manref:page(1)``, the exact name and section number
- add more clickable references rather than less
- custom rules and directives are implemented in :file:`Documentation/conf.py`
Conventions:
- version should be formatted like ``6.1`` or ``v6.1`` and clear what
project/tool it's related to unless it's obvious from the context
Other:
- for notes use ``.. note::`` directive, is rendered as a separate paragraph and
should be used only for important information
- ``.. warning::`` directive is rendered as a separate paragraph
and most likely more visible than NOTE, use for critical information that
may cause harm, irreversible state or performance problems
- should point reader to other part of documentation to seek more details
References:
- RST https://www.sphinx-doc.org/en/master/
- RST and Sphinx Cheatsheet https://spl.hevs.io/spl-docs/writing/rst/cheatsheet.html
- RST Cheat Sheet https://sphinx-tutorial.readthedocs.io/cheatsheet/
btrfs-progs-6.14/Documentation/Feature-by-version.rst 0000664 0000000 0000000 00000064071 14771053764 0022773 0 ustar 00root root 0000000 0000000 Changes (feature/version)
=========================
Major features or significant feature enhancements by kernel version. For more
information look below.
The version states at which version a feature has been merged into the mainline
kernel. It does not tell anything about at which kernel version it is
considered mature enough for production use. For an estimation on stability of
features see :doc:`Status` page.
6.x
---
6.0 - send protocol v2
Send protocol update that adds new commands and extends existing
functionality to write large data chunks. Compressed (and encrypted)
extents can be optionally emitted and transferred as-is without the need
to re-compress (or re-encrypt) on the receiving side.
6.0 - sysfs exports commit stats
The file :file:`/sys/fs/btrfs/FSID/commit_stats` shows number of commits and
various time related statistics.
6.0 - sysfs exports chunk sizes
Chunk size value can be read from
:file:`/sys/fs/btrfs/FSID/allocation/PROFILE/chunk_size`.
6.0 - sysfs shows zoned mode among features
The zoned mode has been supported since 5.10 and adding functionality.
Now it's advertised among features.
6.0 - checksum implementation is logged at mount time
When a filesystem is mounted the implementation backing the checksums
is logged. The information is also accessible in
:file:`/sys/fs/btrfs/FSID/checksum`.
6.1 - sysfs support to temporarily skip exact qgroup accounting
Allow user override of qgroup accounting and make it temporarily out
of date e.g. in case when there are several subvolumes deleted and the
qgroup numbers need to be updated at some cost, an update after that
can amortize the costs.
6.1 - scrub also repairs superblock
An improvement to scrub in case the superblock is detected to be
corrupted, the repair happens immediately. Previously it was delayed
until the next transaction commit for performance reasons that would
store an updated and correct copy eventually.
6.1 - block group tree
An incompatible change that has to be enabled at mkfs time. Add a new
b-tree item that stores information about block groups in a compact way
that significantly improves mount time that's usually long due to
fragmentation and scattered b-tree items tracking the individual block
groups. Requires and also enables the free-space-tree and no-holes
features.
6.1 - discard stats available in sysfs
The directory :file:`/sys/fs/btrfs/FSID/discard` exports statistics and
tunables related to discard.
6.1 - additional qgroup stats in sysfs
The overall status of qgroups are exported in
:file:`/sys/sys/fs/btrfs/FSID/qgroups/`.
6.1 - check that super block is unchanged at thaw time
Do full check of super block once a filesystem is thawed. This namely
happens when system resumes from suspend or hibernation. Accidental
change by other operating systems will be detected.
6.2 - discard=async on by default
Devices that support trim/discard will enable the asynchronous discard
for the whole filesystem.
6.3 - discard=async settings tuned
The default IOPS limit has changed from 100 to 1000 and writing value 0
to :file:`/sys/fs/btrfs/FSID/discard/iops_limit` newly means to not do any
throttling.
6.3 - block group allocation class heuristics
Pack files by size (up to 128k, up to 8M, more) to avoid fragmentation
in block groups, assuming that file size and life time is correlated,
in particular this may help during balance. The stats about the number
of used classes per block group type is exported in
:file:`/sys/fs/btrfs/FSID/allocation/\*/size_classes`.
6.3 - in DEV_INFO ioctl export per-device FSID
A seeding device could have a different FSID, available in sysfs and now
available via DEV_INFO ioctl.
6.3 - send utimes cache, reduced stream size
Utimes for directories are emitted into the send stream only when
finalizing the directory, the cache also gains significant speedups (up
to 10x).
6.7 - raid-stripe-tree
New tree for logical mapping, allows some RAID modes for zoned mode.
6.7 - simplified quota accounting
A simplified mode of qgroups accounting
6.7 - temporary fsid
Mount of cloned devices is now possible, the filesystem will get a new
randomly generated UUID on mount
6.8 - new mount API
Use new mount API (https://lwn.net/Articles/753473/)
6.9 - statx can read the subvolume id
The extendable syscall *statx* also returns the subvolume id and
sets the *result_mask* bit *STATX_SUBVOL*.
6.9 - reflinked file range and concurrent read
An optimization for concurrent access to a range that is reflinked
and read at the same time, the read latency is decreased due to reduced
locking.
6.10 - automatic stale subvolume group removal
This applies to 0 level qgroups (the one automatically created for a
subvolume), once the subvolume is deleted the respective qgroup is
also deleted. This may take some time until the qgroup accounting is
correct and consistent again as the subvolume deletion is delayed.
This is also affected by presence of the subvolume qgroup in higher
level qgroups or the sysfs setting of *drop_subtree_threshold* that will
need a quota rescan.
6.10 - sysfs reports reclaim status
A per-filesystem report of background reclaim status, file names
matching *reclaim_* in the space info directory.
6.10 - tunable dynamic background reclaim threshold
Run background block group reclaim (using the relocation/balance mechanism)
if the used size is above the configured value and the dynamic reclaim
is enabled (not by default). When enabled, there's a heuristic that ties to
avoid increasing system load if there's enough unallocated space but will
try hard (but cannot be perfect) to avoid a situation when there's last
chunk remaining to make the relocation possible.
6.10 - new mount option rescue= mode *ignoremetacsums*
When enabled, any metadata checksum mismatch is ignored (in read-only mount),
this may be useful in an interrupted checksum type conversion (:doc:`btrfstune`).
6.10 - new mount option rescue= mode *ignoresuperflags*
An option to ignore unknown super block flags, at this point applies
only to the interrupted checksum conversion, but can be useful for
similar operations in the future.
6.10 - tree-checker updates
Properly verify all types of directory items and reject unknown ones.
Do relevant device item checks.
6.10 - allow to clone/reflink the tail extent
Check if the last inode extent (not a full block length) can be cloned
and do it, this fixes a problem in send/receive.
6.10 - unlink updates ctime
Mandated by POSIX (https://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html),
the link count is changed.
6.11 - unconditionally wake up cleaner thread on SYNC ioctl
Avoid indirection when the BTRFS_IOC_SYNC ioctl is called and wake
up the cleaner thread which is among other things responsible to
clean deleted subvolumes.
6.11 - reduced locking around buffered reads
Improve concurrency by reducing scope of locking around buffered
reads. The direct io is still locked but this should not be mixed with
buffered writes.
6.12 - cancellable discard/TRIM
Add more points where the discard can be interrupted by signals before
it finishes the whole operation.
6.13 - new config option CONFIG_BTRFS_EXPERIMENTAL
Add separate config option to distinguish purely debugging features
(like extended safety checks) and features that still need some
refinements (and were hidden under the debugging config option not to
expose them to users). When enabled this namely covers extent tree v2,
raid stripe tree, send protocol version 3 and checksum offloading strategy.
6.13 - encoded read integration with io_uring
The io_uring subsystem understands a command that is directed to
Btrfs encoded read ioctl.
6.13 - new ioctl to wait for cleaned subvolumes
Add specialized ioctl to wait for deleted (and maybe not yet cleaned)
subvolumes, available to any user. The related command :command:`btrfs subvolume sync`
uses the privileged SEARCH_TREE ioctl otherwise.
6.13 - seeding device use case change
The sprout device (the writable one added to the seeding device) does
not touch the superblock read-only status, preventing removal of
accumulated deleted snapshots to be cleaned.
6.13 - update tree-checker to detect more wrong inline extent references
5.x
---
5.0 - swapfile
With some limitations where COW design does not work well with the swap
implementation (nodatacow file, no compression, cannot be snapshotted,
not possible on multiple devices, ...), as this is the most restricted
but working setup, we'll try to improve that in the future
5.0 - metadata uuid
An optional incompat feature to assign a new filesystem UUID without
overwriting all metadata blocks, stored only in superblock, unlike what
:command:`btrfstune -u`
5.1 - FORGET_DEV ioctl
Unregister devices previously added by the scan ioctl, same effect as
if the kernel module is reloaded.
5.1 - ZSTD level
Allow to set the ZSTD compression level via mount option, e.g. like
*compress=zstd:9*. The levels match the default ZSTD compression
levels. The default is 3, maximum is 15.
5.2 - pre-write checks
Verify metadata blocks before submitting them to the devices. This can
catch consistency problems or bitflips.
5.5 - more checksums
New checksum algorithms: xxhash (64b), SHA256 (256b), BLAKE2b (256b).
5.5 - RAID1C34
RAID1 with 3- and 4- copies (over all devices).
5.6 - async discard
Mode of discard (*mount -o discard=async*) that merges freed extents to
larger chunks and submits them for discard in a less intrusive way
5.6 - device info in sysfs
More information about device state can be found in per-filesystem sysfs directory.
5.7 - reflink/clone works on inline files
Inline files can be reflinked to the tail extent of other files
5.7 - faster balance cancel
More cancellation points in balance that will shorten the time to stop
processing once :command:`btrfs balance cancel` is called.
5.7 - *removed flag BTRFS_SUBVOL_CREATE_ASYNC*
Remove support of flag BTRFS_SUBVOL_CREATE_ASYNC from subvolume creation ioctl.
5.7 - v2 of snapshot deletion ioctl
New ioctl BTRFS_IOC_SNAP_DESTROY_V2, deletion by subvolume id is now possible.
5.9 - mount option *rescue*
Unified mount option for actions that may help to access a damaged
filesystem. Now supports: nologreplay, usebackuproot
5.9 - qgroups in sysfs
The information about qgroup status and relations is exported in :file:`/sys/fs/UUID/qgroups`
5.9 - FS_INFO ioctl
Export more information: checksum type, checksum size, generation, metadata_uuid
5.10 - exclusive ops in sysfs
Export which filesystem exclusive operation is running (balance,
resize, device add/delete/replace, ...)
5.11 - remove *inode_cache*
Remove inode number caching feature (mount -o inode_cache)
5.11 - more rescue= modes
Additional modes for mount option *rescue=*: ignorebadroots/ibadroots,
ignoredatacsums/idatacsums. All are exported in
:file:`/sys/fs/btrfs/features/supported_rescue_options`.
5.12 - zoned mode
Support for zoned devices with special allocation/write mode to
fixed-size zones. See :doc:`Zoned`.
5.13 - supported_sectorsizes in sysfs
List supported sector sizes in sysfs file :file:`/sys/fs/btrfs/features/supported_sectorsizes`.
5.14 - sysfs scrub bw limit
Tunable bandwidth limit
:file:`/sys/fs/btrfs/FSID/devinfo/DEVID/scrub_speed_max` for scrub (and
device replace) for a given device.
5.14 - sysfs device stats
The device stats can be also found in :file:`/sys/fs/btrfs/FSID/devinfo/DEVID/error_stats`.
5.14 - cancellable resize, device delete
The filesystem resize and device delete operations can be cancelled by
specifying *cancel* as the device name.
5.14 - property value reset
Change how empty value is interpreted. New behaviour will delete the
value and reset it to default. This affects *btrfs.compression* where
value *no* sets NOCOMPRESS bit while empty value resets all compression
settings (either compression or NOCOMPRESS bit).
5.15 - fsverity
The fs-verity is a support layer that filesystems can hook into to
support transparent integrity and authenticity protection of read-only
files. https://www.kernel.org/doc/html/latest/filesystems/fsverity.html
5.15 - idmapped mount
Support mount with UID/GID mapped according to another namespace.
https://lwn.net/Articles/837566/
5.16 - ZNS in zoned
Zoned namespaces. https://zonedstorage.io/docs/introduction/zns ,
https://lwn.net/Articles/865988/
5.17 - send and relocation
Send and relocation (balance, device remove, shrink, block group
reclaim) can now work in parallel.
5.17 - device add vs balance
It is possible to add a device with paused balance.
.. note::
Since kernel 5.17.7 and btrfs-progs 5.17.1
5.17 - *no warning with flushoncommit*
Mounting with *-o flushoncommit* does not trigger the (harmless)
warning at each transaction commit.
.. note::
Also backported to 5.15.27 and 5.16.13
5.18 - zoned and DUP metadata
DUP metadata works with zoned mode.
5.18 - encoded data ioctl
New ioctls to read and write pre-encoded data (i.e. no transformation
and directly written as extents), now works for compressed data.
5.18 - *removed balance ioctl v1*
The support for ioctl BTRFS_IOC_BALANCE has been removed, superseded by
BTRFS_IOC_BALANCE_V2 long time ago.
5.18 - *cross-mount reflink works*
The VFS limitation to reflink files on separate subvolume mounts of the
same filesystem has been removed.
5.18 - syslog error messages with filesystem state
Messages are printed with a one letter tag ("state: X") that denotes in
which state the filesystem was at this point:
* A - transaction aborted (permanent)
* E - filesystem error (permanent)
* M - remount in progress (transient)
* R - device replace in progress (transient)
* C - checksum checks disabled by mount option (rescue=ignoredatacsums)
* L - log tree replay did not complete due to some error
5.18 - tree-checker verifies transaction id pre-write
Metadata buffer to be written gets an extra check if the stored
transaction number matches the current state of the filesystem.
5.19 - subpage support pages > 4KiB
Metadata node size is supported regardless of the CPU page size
(minimum size is 4KiB), data sector size is supported <= page size.
Additionally subpage also supports RAID56.
5.19 - per-type background threshold for reclaim
Add sysfs tunable for background reclaim threshold for all block group
types (data, metadata, system).
5.19 - automatically repair device number mismatch
Device information is stored in two places, the number in the super
block and items in the device tree. When this is goes out of sync, e.g.
by device removal short before unmount, the next mount could fail.
The b-tree is an authoritative information an can be used to override
the stale value in the superblock.
5.19 - defrag can convert inline files to regular ones
The logic has been changed so that inline files are considered for
defragmentation even if the mount option max_inline would prevent that.
No defragmentation might happen but the inlined files are not skipped.
5.19 - explicit minimum zone size is 4MiB
Set the minimum limit of zone on zoned devices to 4MiB. Real devices
zones are much larger, this is for emulated devices.
5.19 - sysfs tunable for automatic block group reclaim
Add possibility to set a threshold to automatically reclaim block groups
also in non-zoned mode. By default completely empty block groups are
reclaimed automatically but the threshold can be tuned in
:file:`/sys/fs/btrfs/FSID/allocation/PROFILE/bg_reclaim_threshold`.
5.19 - tree-checker verifies metadata block ownership
Additional check done by tree-checker to verify relationship between a
tree block and it's tree root owner.
4.x
---
4.0 - store otime
Save creation time (otime) for all new files and directories. For
future use, current tool cannot read it directly.
4.2 - rootid ioctl accessible
The INO_LOOKUP will return root id (id of the containing subvolume),
unrestricted and to all users if the *treeid* is 0.
4.2 - dedupe possible on the same inode
The EXTENT_SAME ioctl will accept the same inode as source and
destination (ranges must not overlap).
4.3 - trim all free space
Trim will be performed also on the space that's not allocated by the
chunks, not only free space within the allocated chunks.
4.4 - balance filter updates
Enhanced syntax and new balance filters:
* limit=min..max
* usage=min..max
* stripes=min..max
4.5 - free space tree
Improved implementation of free space cache (aka v2), using b-trees.
.. note::
Default since btrfs-progs 5.15, Kernel 4.9 fixes endianness bugs on
big-endian machines, x86* is ok
4.5 - balance filter updates
Conversion to data/DUP profile possible through balance filters -- on single-device filesystem.
.. note::
mkfs.btrfs allows creating DUP on single device in the non-mixed mode since 4.4
4.6 - max_inline default
The default value of max_inline changed to 2048.
4.6 - read features from control device
The existing ioctl GET_SUPPORTED_FEATURES can be now used on the
control device (:file:`/dev/btrfs-control`) and returns the supported features
without any mounted filesystem.
4.7 - delete device by id
Add new ioctl RM_DEV_V2, pass device to be deleted by its ID.
4.7 - more renameat2 modes
Add support for RENAME_EXCHANGE and RENAME_WHITEOUT to *renameat2*
syscall. This also means that *overlayfs* is now supported on top of
btrfs.
4.7 - balance filter updates
Conversion to data/DUP profile possible through balance filters -- on multiple-device filesystems.
.. note::
mkfs.btrfs allows creating DUP on multiple devices since 4.5.1
4.12 - RAID56: auto repair
Scrub will attempt auto-repair (similar to raid1/raid10)
4.13 - statx
Support for the enhanced statx syscall; file creation timestamp
4.13 - sysfs qgroups override
qgroups: new sysfs control file to allow temporary quota override with CAP_SYS_RESOURCE
4.13 - *deprecated mount option alloc_start*
That was a debugging helper, not used and not supposed to be used nowadays.
4.14 - ZSTD compression
New compression algorithm ZSTD, supposedly better ratio/speed performance.
4.14 - improved degraded mount
Allow degraded mount based on the chunk constraints, not device number
constraints. E.g. when one device is missing but the remaining one holds
all *single* chunks.
4.14 - *deprecated user transaction ioctl*
BTRFS_IOC_TRANS_START and BTRFS_IOC_TRANS_END, no known users, tricky
to use; scheduled to be removed in 4.17
4.14 - refine SSD optimizations
The mount option *ssd* does not make any assumptions about block layout
or management by the device anymore, leaving only the speedups based on
low seek cost active. This could avoid some corner cases leading to
excessive fragmentation.
https://git.kernel.org/linus/583b723151794e2ff1691f1510b4e43710293875
The story so far.
4.15 - overlayfs
Overlayfs can now use btrfs as the lower filesystem.
4.15 - *ref-verify*
Debugging functionality to verify extent references. New mount option
*ref-verify*, must be built with CONFIG_BTRFS_FS_REF_VERIFY.
4.15 - ZLIB level
Allow to set the ZLIB compression level via mount option, e.g. like
*compress=zlib:9*. The levels match the default ZLIB compression
levels. The default is 3.
4.15 - v2 of LOGICAL_INO ioctl
An enhanced version of ioctl that can translate logical extent offset
to inode numbers, "who owns this block". For certain use cases the V1
performs bad and this is addressed by V2.
See for more https://git.kernel.org/linus/d24a67b2d997c860a42516076f3315c2ad2d2884 .
4.15 - compression heuristics
Apply a few heuristics to the data before they're compressed to decide
if it's likely to gain any space savings. The methods: frequency
sampling, repeated pattern detection, Shannon entropy calculation.
4.16 - fallocate: zero range
Mode of the *fallocate* syscall to zero file range.
4.17 - *removed user transaction ioctl*
Deprecated in 4.14, see above.
4.17 - *rmdir* on subvolumes
Allow *rmdir* to delete an empty subvolume.
4.18 - XFLAGS ioctl
Add support for ioctl FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR, successor of
FS_IOC_SETFLAGS/FS_IOC_GETFLAGS ioctl. Currently supports: APPEND,
IMMUTABLE, NOATIME, NODUMP, SYNC. Note that the naming is very
confusing, though it's named *xattr*, it does not mean the extended
attributes. It should be referenced as extended inode flags or
*xflags*.
4.18 - EXTENT_SAME ioctl / 16MiB chunks
The range for out-of-band deduplication implemented by the EXTENT_SAME
ioctl will split the range into 16MiB chunks. Up to now this was the
overall limit and effectively only the first 16MiB was deduplicated.
4.18 - GET_SUBVOL_INFO ioctl
New ioctl to read subvolume information (id, directory name,
generation, flags, UUIDs, time). This does not require root
permissions, only the regular access to to the subvolume.
4.18 - GET_SUBVOL_ROOTREF ioctl
New ioctl to enumerate subvolume references of a given subvolume. This
does not require root permissions, only the regular access to to the
subvolume.
4.18 - INO_LOOKUP_USER ioctl
New ioctl to lookup path by inode number. This does not require root
permissions, only the regular access to to the subvolume, unlike the
INO_LOOKUP ioctl.
4.19 - defrag ro/rw
Allow to run defrag on files that are normally accessible for
read-write, but are currently opened in read-only mode.
3.x
---
3.0 - scrub
Read all data and verify checksums, repair if possible.
3.2 - auto raid repair
Automatic repair of broken data from a good copy
3.2 - root backups
Save a few previous versions of the most important tree roots at commit time, used by *-o recovery*
3.3 - integrity checker
Optional infrastructure to verify integrity of written metadata blocks
3.3 - backref walking
Groundwork to allow tracking owner of blocks, used via *inspect-internal*
3.3 - restriper
RAID profiles can be changed on-line, balance filters
3.4 - big metadata blocks
Support for metadata blocks larger than page size
.. note::
Default nodesize is 16KiB since btrfs-progs 3.12
3.4 - error handling
Generic infrastructure for graceful error handling (EIO)
3.5 - device statistics
Persistent statistics about device errors
3.5 - fsync speedup
Noticeable improvements in fsync() implementation
3.6 - qgroups
Subvolume-aware quotas
3.6 - send/receive
Ability to transfer one filesystem via a data stream (full or
incremental) and apply the changes on a remote filesystem.
3.7 - extrefs
Hardlink count limit is lifted to 65536.
.. note::
Default since btrfs-progs 3.12
3.7 - hole punching
Implement the FALLOC_FL_PUNCH_HOLE mode of *fallocate*.
3.8 - device replace
Efficient replacement of existing device (add/remove in one go).
3.9 - raid 5/6 *(incomplete)*
Basic support for RAID5/6 profiles, no crash resiliency, replace and
scrub support.
3.9 - snapshot-aware defrag
Defrag does not break links between shared extents (snapshots,
reflinked files).
.. note::
Disabled since 3.14 (and backported to some stable kernel versions)
due to problems. Has been completely removed in 5.6.
3.9 - lightweight send
A mode of *send* that does not add the actual file data to the stream.
3.9 - on-line label set/get
Label editable on mounted filesystems.
3.10 - skinny metadata
Reduced metadata size (format change) of extents.
.. note::
Default since btrfs-progs 3.18
3.10 - qgroup rescan
Sync qgroups with existing filesystem data.
3.12 - UUID tree
A map of subvolume/UUID that vastly speeds up send/receive.
3.12 - out-of-bound deduplication
Support for deduplicating extents on a given set of files.
3.14 - no-holes
No extent representation for file holes (format change), may reduce
overall metadata consumption
3.14 - feature bits in sysfs
:file:`/sys/fs/btrfs` exports various bits about filesystem
capabilities and feature support
3.16 - O_TMPFILE
Mode of open() to safely create a temporary file
3.16 - search ioctl v2
The extended SEARCH_TREE ioctl able to get more than a 4k data
3.18 - auto block group reclaim
Automatically remove block groups (aka. chunks) that become completely empty.
3.19 - RAID56: scrub, replace
Scrub and device replace works on RAID56 filesystems.
btrfs-progs-6.14/Documentation/Glossary.rst 0000664 0000000 0000000 00000000060 14771053764 0021074 0 ustar 00root root 0000000 0000000 Glossary
========
.. include:: ch-glossary.rst
btrfs-progs-6.14/Documentation/Hardware.rst 0000664 0000000 0000000 00000000135 14771053764 0021031 0 ustar 00root root 0000000 0000000 Hardware considerations
=======================
.. include:: ch-hardware-considerations.rst
btrfs-progs-6.14/Documentation/INSTALL.rst 0000777 0000000 0000000 00000000000 14771053764 0021642 2../INSTALL ustar 00root root 0000000 0000000 btrfs-progs-6.14/Documentation/Inline-files.rst 0000664 0000000 0000000 00000003726 14771053764 0021623 0 ustar 00root root 0000000 0000000 Inline files
============
Files up to some size can be stored in the metadata section ("inline" in the
b-tree nodes), i.e. no separate blocks for the extents. The default limit is
2048 bytes and can be configured by mount option ``max_inline``. The data of
inlined files can be also compressed as long as they fit into the b-tree nodes.
If the filesystem has been created with different data and metadata profiles,
namely with different level of integrity, this also affects the inlined files.
It can be completely disabled by mounting with ``max_inline=0``. The upper
limit is either the size of b-tree node or the page size of the host.
An inline file can be identified by enumerating the extents, e.g. by the tool
:command:`filefrag`:
.. code-block:: bash
$ filefrag -v inlinefile
Filesystem type is: 9123683e
File size of inlinefile is 463 (1 block of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 0.. 4095: 0.. 4095: 4096: last,not_aligned,inline,eof
In the above example, the file is not compressed, otherwise it would have the
*encoded* flag. The inline files have no limitations and behave like regular
files with respect to copying, renaming, reflink, truncate etc.
.. note::
This is not `tail packing `__,
known e.g. from `ReiserFS `__ . The
whole inline file must fit and is stored in the metadata block. Larger files
have their extents stored in blocks and the last one can be underutilized.
With tail packing such blocks would be stored elsewhere out of order,
possibly mixed with other last blocks from other files.
This was an early design decision not to implement it due to experience with
the complexity in ReiserFS and does not seem justified with the possible
space savings in the data blocks but increased metadata to track the packed blocks.
btrfs-progs-6.14/Documentation/Interoperability.rst 0000664 0000000 0000000 00000006136 14771053764 0022630 0 ustar 00root root 0000000 0000000 .. BTRFS integration related pages index
Interoperability
================
.. _interop-cgroups:
cgroups
-------
Cgroups are supported for the IO controller, for compressed and uncompressed
data. This can be used to limit bandwidth or for accounting. The cgroups can
be configured directly or e.g. via systemd directives *IOAccounting*,
*IOWeight* etc.
See also :manref:`systemd.resource-control(5)`.
.. _interop-fsverity:
fsverity
--------
The fs-verity is a support layer that filesystems can hook into to
support transparent integrity and authenticity protection of read-only
files. This requires a separate management utility :command:`fsverity`.
The ioctls supported by btrfs:
* `FS_IOC_ENABLE_VERITY `__
* `FS_IOC_MEASURE_VERITY `__
* `FS_IOC_READ_VERITY_METADATA `__
See also:
https://www.kernel.org/doc/html/latest/filesystems/fsverity.html
.. _interop-idmapped:
idmapped mounts
---------------
Btrfs supports mount with UID/GID mapped according to another namespace since
version 5.15.
See also:
https://lwn.net/Articles/837566/
Device mapper, MD-RAID
----------------------
Btrfs works on top of device mapper (DM) and linux multi-device software RAID
(MD-RAID) block devices transparently without any need for additional
configuration. There is no integration so device failures are not handled
automatically in any way, must be resolved either in btrfs or on the DM/MD
layer.
The functionality of DM/MD may duplicate the one provided by btrfs (like
mirroring), it's possible to use it that way but it's probably wasteful and may
degrade performance. Creating a filesystem on top of the multiplexed device is
likely the desired way.
overlayfs
---------
Since kernel 4.15 the btrfs filesystem can be used as *lower* filesystem
for overlayfs (supporting the rename modes of *exchange* and *whiteout*).
SELinux
-------
The SELinux labels can be defined via mount option *context* and since
version 6.8 there are no limitations. Until that version some cases
were not supported.
.. _interop-io-uring:
io_uring
--------
Basic file operations are supported. Since 6.12 the *Encoded IO read/write ioctls* the
*read* is supported and write since 6.13.
.. _interop-nfs:
NFS
---
NFS is supported. When exporting a subvolume it is recommended to use the
*fsid* option with a unique id in case the server needs to restart. This
is recommended namely when clients use the mount option *hard*.
Example of server side export:
.. code-block:: none
/mnt/data/subvolume1 192.168.1.2/24(fsid=12345,rw,sync)
/mnt/data/subvolume2 192.168.1.2/24(fsid=23456,rw,sync)
See also :manref:`exports(5)`.
.. _interop-samba:
Samba
-----
The Samba VFS module *btrfs* adds support for compression, snapshots and server-side
copy (backed by reflink/clone range ioctl).
See also:
https://wiki.samba.org/index.php/Server-Side_Copy#Btrfs_Enhanced_Server-Side_Copy_Offload
btrfs-progs-6.14/Documentation/Introduction.rst 0000664 0000000 0000000 00000006712 14771053764 0021764 0 ustar 00root root 0000000 0000000 Introduction
============
BTRFS is a modern copy on write (COW) filesystem for Linux aimed at
implementing advanced features while also focusing on fault tolerance, repair
and easy administration. Its main features and benefits are:
* Snapshots which do not make a full copy of the files
* Built-in volume management, support for software-based RAID 0, RAID 1, RAID 10 and others
* Self-healing - checksums for data and metadata, automatic detection of silent data corruptions
* Data compression
* Reflinks, fast and efficient file copies
Feature overview
----------------
* Extent based file storage
* 2\ :sup:`64` byte (16 EiB) :ref:`maximum file size` (practical limit is 8 EiB due to Linux VFS)
* :doc:`Space-efficient packing of small files`
* Space-efficient indexed directories
* :ref:`Dynamic inode allocation`
* :doc:`Writable snapshots, read-only snapshots, subvolumes (separate internal filesystem roots)`
* :doc:`Checksums on data and metadata` (crc32c, xxhash, sha256, blake2b)
* :doc:`Compression (ZLIB, LZO, ZSTD), heuristics`
* :doc:`Integrated multiple device support`:
* File Striping (like RAID0)
* File Mirroring (like RAID1 up to 4 copies)
* File Striping+Mirroring (like RAID10)
* Single and Dual Parity implementations (like RAID5/6, experimental, not production-ready)
* SSD/NVMe (flash storage) awareness, :doc:`TRIM/Discard` for reporting free blocks for
reuse and optimizations (e.g. avoiding unnecessary seek optimizations,
sending writes in clusters.
* :doc:`Background scrub` process for finding and repairing errors of files with redundant copies
* :doc:`Online filesystem defragmentation`
* :doc:`Offline filesystem check`
* :doc:`In-place conversion` of existing ext2/3/4 and reiserfs filesystems
* :doc:`Seeding device.` Create a (readonly) filesystem that
acts as a template to seed other Btrfs filesystems. The original filesystem
and devices are included as a readonly starting point for the new filesystem.
Using copy on write, all modifications are stored on different devices; the
original is unchanged.
* :doc:`Subvolume-aware quota` support
* :doc:`Send/receive of subvolume changes`, efficient
incremental filesystem mirroring and backup
* :doc:`Batch, or out-of-band deduplication` (happens after writes, not during)
* :doc:`Swapfile support`
* :doc:`Tree-checker`, post-read and pre-write metadata verification
* :doc:`Zoned mode support` (SMR/ZBC/ZNS friendly allocation, emulated on non-zoned devices)
A more detailed list of features and compatibility is on the :doc:`status page `.
Quick start
-----------
For a really quick start you can simply create and mount the filesystem. Make
sure that the block device you'd like to use is suitable so you don't overwrite existing data.
.. code-block:: shell
# mkfs.btrfs /dev/sdx
# mount /dev/sdx /mnt/test
The default options should be acceptable for most users and sometimes can be
changed later. The example above is for a single device filesystem, creating a
*single* profile for data (no redundant copies of the blocks), and *DUP*
for metadata (each block is duplicated).
Read more about:
* creating a filesystem at :doc:`mkfs.btrfs`
* mount options at :doc:`Administration`
btrfs-progs-6.14/Documentation/Kernel-by-version.rst 0000664 0000000 0000000 00000272355 14771053764 0022626 0 ustar 00root root 0000000 0000000 Changes (kernel/version)
========================
Summary of kernel changes for each version.
6.x
---
6.0 (Oct 2022)
^^^^^^^^^^^^^^
Pull requests:
`v6.0-rc1 `__,
`v6.0-rc1 `__,
`v6.0-rc2 `__,
`v6.0-rc3 `__,
`v6.0-rc5 `__,
`v6.0-rc7 `__
- sysfs updates:
- export chunk size, in debug mode add tunable for setting its size
- show zoned among features (was only in debug mode)
- show commit stats (number, last/max/total duration)
- mixed_backref and big_metadata sysfs feature files removed, they've
been default for sufficiently long time, there are no known users and
mixed_backref could be confused with mixed_groups
- send protocol updated to version 2
- new commands:
- ability write larger data chunks than 64K
- send raw compressed extents (uses the encoded data ioctls), ie. no
decompression on send side, no compression needed on receive side
if supported
- send 'otime' (inode creation time) among other timestamps
- send file attributes (a.k.a file flags and xflags)
- this is first version bump, backward compatibility on send and
receive side is provided
- there are still some known and wanted commands that will be
implemented in the near future, another version bump will be needed,
however we want to minimize that to avoid causing usability issues
- print checksum type and implementation at mount time
- don't print some messages at mount (mentioned as people asked about
it), we want to print messages namely for new features so let's make
some space for that:
- big metadata - this has been supported for a long time and is not a feature
that's worth mentioning
- skinny metadata - same reason, set by default by mkfs
Performance improvements:
- reduced amount of reserved metadata for delayed items
- when inserted items can be batched into one leaf
- when deleting batched directory index items
- when deleting delayed items used for deletion
- overall improved count of files/sec, decreased subvolume lock
contention
- metadata item access bounds checker micro-optimized, with a few
percent of improved runtime for metadata-heavy operations
- increase direct io limit for read to 256 sectors, improved throughput
by 3x on sample workload
Notable fixes:
- raid56
- reduce parity writes, skip sectors of stripe when there are no data updates
- restore reading from stripe cache instead of triggering new read
- refuse to replay log with unknown incompat read-only feature bit set
- tree-checker verifies if extent items don't overlap
- check that subvolume is writable when changing xattrs from security
namespace
- fix space cache corruption and potential double allocations; this is
a rare bug but can be serious once it happens, stable backports and
analysis tool will be provided
- zoned:
- fix page locking when COW fails in the middle of allocation
- improved tracking of active zones, ZNS drives may limit the number
and there are ENOSPC errors due to that limit and not actual lack of
space
- adjust maximum extent size for zone append so it does not cause late
ENOSPC due to underreservation
- mirror reading error messages show the mirror number
- don't fallback to buffered IO for NOWAIT direct IO writes, we don't
have the NOWAIT semantics for buffered io yet
- send, fix sending link commands for existing file paths when there are
deleted and created hardlinks for same files
- repair all mirrors for profiles with more than 1 copy (raid1c34)
- fix repair of compressed extents, unify where error detection and
repair happen
6.1 (Dec 2022)
^^^^^^^^^^^^^^
Pull requests:
`v6.1-rc1 `__,
`v6.1-rc1 `__,
`v6.1-rc2 `__,
`v6.1-rc4 `__,
`v6.1-rc4 `__,
`v6.1-rc5 `__,
`v6.1-rc7 `__
Performance:
- outstanding FIEMAP speed improvements:
- algorithmic change how extents are enumerated leads to orders of
magnitude speed boost (uncached and cached)
- extent sharing check speedup (2.2x uncached, 3x cached)
- add more cancellation points, allowing to interrupt seeking in files
with large number of extents
- more efficient hole and data seeking (4x uncached, 1.3x cached)
- sample results:
256M, 32K extents: 4s -> 29ms (~150x)
512M, 64K extents: 30s -> 59ms (~550x)
1G, 128K extents: 225s -> 120ms (~1800x)
- improved inode logging, especially for directories (on dbench workload
throughput +25%, max latency -21%)
- improved buffered IO, remove redundant extent state tracking, lowering
memory consumption and avoiding rb tree traversal
- add sysfs tunable to let qgroup temporarily skip exact accounting when
deleting snapshot, leading to a speedup but requiring a rescan after
that, will be used by snapper
- support io_uring and buffered writes, until now it was just for direct
IO, with the no-wait semantics implemented in the buffered write path
it now works and leads to speed improvement in IOPS (2x), throughput
(2.2x), latency (depends, 2x to 150x)
- small performance improvements when dropping and searching for extent
maps as well as when flushing delalloc in COW mode (throughput +5MB/s)
User visible changes:
- new incompatible feature block-group-tree adding a dedicated tree for
tracking block groups, this allows a much faster load during mount and
avoids seeking unlike when it's scattered in the extent tree items
- this reduces mount time for many-terabyte sized filesystems
- conversion tool will be provided so existing filesystem can also be
updated in place
- to reduce test matrix and feature combinations requires no-holes
and free-space-tree (mkfs defaults since 5.15)
- improved reporting of super block corruption detected by scrub
- scrub also tries to repair super block and does not wait until next
commit
- discard stats and tunables are exported in sysfs
(/sys/fs/btrfs/FSID/discard)
- qgroup status is exported in sysfs (/sys/sys/fs/btrfs/FSID/qgroups/)
- verify that super block was not modified when thawing filesystem
Fixes:
- FIEMAP fixes:
- fix extent sharing status, does not depend on the cached status where merged
- flush delalloc so compressed extents are reported correctly
- fix alignment of VMA for memory mapped files on THP
- send: fix failures when processing inodes with no links (orphan files
and directories)
- handle more corner cases for read-only compat feature verification
- fix crash on raid0 filesystems created with <5.4 mkfs.btrfs that could
lead to division by zero
Core:
- preliminary support for fs-verity in send
- more effective memory use in scrub for subpage where sector is smaller
than page
- block group caching progress logic has been removed, load is now
synchronous
- add no-wait semantics to several functions (tree search, nocow,
flushing, buffered write
6.2 (Feb 2023)
^^^^^^^^^^^^^^
Pull requests:
`v6.2-rc1 `__,
`v6.2-rc3 `__,
`v6.2-rc3 `__,
`v6.2-rc5 `__,
`v6.2-rc5 `__,
`v6.2-rc5 `__,
`v6.2-rc8 `__,
`v6.2-rc8 `__
User visible features:
- raid56 reliability vs performance trade off:
- fix destructive RMW for raid5 data (raid6 still needs work) - do full RMW
cycle for writes and verify all checksums before overwrite, this should
prevent rewriting potentially corrupted data without notice
- stripes are cached in memory which should reduce the performance impact but
still can hurt some workloads
- checksums are verified after repair again
- this is the last option without introducing additional features (write
intent bitmap, journal, another tree), the RMW cycle was supposed to be
avoided by the original implementation exactly for performance reasons but
that caused all the reliability problems
- discard=async by default for devices that support it
- implement emergency flush reserve to avoid almost all unnecessary transaction
aborts due to ENOSPC in cases where there are too many delayed refs or
delayed allocation
- skip block group synchronization if there's no change in used bytes, can
reduce transaction commit count for some workloads
- print more specific errors to system log when device scan ioctl fails
Performance improvements:
- fiemap and lseek:
- overall speedup due to skipping unnecessary or duplicate searches (-40% run time)
- cache some data structures and sharedness of extents (-30% run time)
- send:
- faster backref resolution when finding clones
- cached leaf to root mapping for faster backref walking
- improved clone/sharing detection
- overall run time improvements (-70%)
Fixes:
- fix compat ro feature check at read-write remount
- handle case when read-repair happens with ongoing device replace
- reset defrag ioctl buffer on memory allocation error
- fix potential crash in quota when rescan races with disable
- fix qgroup accounting warning when rescan can be started at time with
temporarily disabled accounting
- don't cache a single-device filesystem device to avoid cases when a
loop device is reformatted and the entry gets stale
- limit number of send clones by maximum memory allocated
6.3 (Apr 2023)
^^^^^^^^^^^^^^
Pull requests:
`v6.3-rc1 `__,
`v6.3-rc2 `__,
`v6.3-rc4 `__,
`v6.3-rc5 `__,
`v6.3-rc7 `__,
`v6.3 `__
Features:
- block group allocation class heuristics:
- pack files by size (up to 128k, up to 8M, more) to avoid
fragmentation in block groups, assuming that file size and life time
is correlated, in particular this may help during balance
- with tracepoints and extensible in the future
- sysfs export of per-device fsid in DEV_INFO ioctl to distinguish seeding
devices, needed for testing
- print sysfs stats for the allocation classes
Performance:
- send: cache directory utimes and only emit the command when necessary
- speedup up to 10x
- smaller final stream produced (no redundant utimes commands issued),
- compatibility not affected
- fiemap:
- skip backref checks for shared leaves
- speedup 3x on sample filesystem with all leaves shared (e.g. on
snapshots)
- micro optimized b-tree key lookup, speedup in metadata operations
(sample benchmark: fs_mark +10% of files/sec)
Core changes:
- change where checksumming is done in the io path
- checksum and read repair does verification at lower layer
- cascaded cleanups and simplifications
Fixes:
- sysfs: make sure that a run-time change of a feature is correctly
tracked by the feature files
- scrub: better reporting of tree block errors
- fix calculation of unusable block group space reporting bogus values
due to 32/64b division
- fix unnecessary increment of read error stat on write error
- scan block devices in non-exclusive mode to avoid temporary mkfs
failures
- fix fast checksum detection, this affects filesystems with non-crc32c
checksum, calculation would not be offloaded to worker threads (since 5.4)
- restore thread_pool mount option behaviour for endio workers, the
new value for maximum active threads would not be set to the actual
work queues (since 6.0)
6.4 (Jun 2023)
^^^^^^^^^^^^^^
Pull requests:
`v6.4-rc1 `__,
`v6.4-rc2 `__,
`v6.4-rc2 `__,
`v6.4-rc4 `__,
`v6.4-rc5 `__,
`v6.4-rc5 `__,
`v6.4-rc7 `__,
`v6.4-rc7 `__,
`v6.4 `__,
`v6.4 `__
Performance improvements:
- improve logging changes in a directory during one transaction, avoid
iterating over items and reduce lock contention (fsync time 4x lower)
- when logging directory entries during one transaction, reduce locking
of subvolume trees by checking tree-log instead (improvement in
throughput and latency for concurrent access to a subvolume)
Notable fixes:
- device replace:
- properly honor read mode when requested to avoid reading from source device
- target device won't be used for eventual read repair, this is
unreliable for NODATASUM files
- when there are unpaired (and unrepairable) metadata during replace,
exit early with error and don't try to finish whole operation
- scrub ioctl properly rejects unknown flags
- fix partial direct io write when there's a page fault in the middle,
iomap will try to continue with partial request but the btrfs part did
not match that, this can lead to zeros written instead of data
- fix backref walking, this breaks a mode of LOGICAL_INO_V2 ioctl that
is used in deduplication tools
- make mount option clear_cache work with block-group-tree, to rebuild
free-space-tree instead of temporarily disabling it that would lead to
a forced read-only mount
Core changes:
- io path
- continued cleanups and refactoring around bio handling
- extent io submit path simplifications and cleanups
- flush write path simplifications and cleanups
- rework logic of passing sync mode of bio, with further cleanups
- rewrite scrub code flow, restructure how the stripes are enumerated
and verified in a more unified way
- allow to set lower threshold for block group reclaim in debug mode to
aid zoned mode testing
- remove obsolete time-based delayed ref throttling logic when
truncating items
6.5 (Aug 2023)
^^^^^^^^^^^^^^
Pull requests:
`v6.5-rc1 `__,
`v6.5-rc3 `__,
`v6.5-rc4 `__,
`v6.5-rc6 `__,
`v6.5-rc7 `__
Performance improvements:
- speedup in fsync(), better tracking of inode logged status can avoid
transaction commit
- IO path structures track logical offsets in data structures and does
not need to look it up
- submit IO synchronously for fast checksums (crc32c and xxhash), remove
high priority worker kthread
User visible changes:
- don't commit transaction for every created subvolume, this can reduce
time when many subvolumes are created in a batch
- print affected files when relocation fails
- trigger orphan file cleanup during START_SYNC ioctl
- the ``async=discard`` has been enabled in 6.2 unconditionally, but for
zoned mode it does not make that much sense to do it asynchronously as
the zones are reset as needed
6.6 (Oct 2023)
^^^^^^^^^^^^^^
Pull requests:
`v6.6-rc1 `__,
`v6.6-rc2 `__,
`v6.6-rc3 `__,
`v6.6-rc4 `__,
`v6.6-rc5 `__,
`v6.6-rc6 `__,
`v6.6-rc7 (1) `__,
`v6.6-rc8 (2) `__,
Notable fixes:
- scrub performance drop due to rewrite in 6.4 partially restored, the drop is
noticeable on fast PCIe devices, -66% and restored to -33% of the original
- copy directory permissions and time when creating a stub subvolume
- fix transaction commit stalls when auto relocation is running and blocks
other tasks that want to commit
- change behaviour of readdir()/rewinddir() when new directory entries are
created after opendir(), properly tracking the last entry
Core:
- debugging feature integrity checker deprecated, to be removed in 6.7
- in zoned mode, zones are activated just before the write, making
error handling easier, now the overcommit mechanism can be enabled
again which improves performance by avoiding more frequent flushing
- v0 extent handling completely removed, deprecated long time ago
6.7 (Jan 2024)
^^^^^^^^^^^^^^
Pull requests:
`v6.7-rc1 `__,
`v6.7-rc2 `__,
`v6.7-rc4 `__,
`v6.7-rc6 (1) `__,
`v6.7-rc6 (2) `__,
New features:
- raid-stripe-tree: New tree for logical file extent mapping where the
physical mapping may not match on multiple devices. This is now used in zoned
mode to implement RAID0/RAID1* profiles, but can be used in non-zoned mode as
well. The support for RAID56 is in development and will eventually fix the
problems with the current implementation. This is a backward incompatible
feature and has to be enabled at mkfs time.
- simple quota accounting (squota): A simplified mode of qgroup that accounts
all space on the initial extent owners (a subvolume), the snapshots are then
cheap to create and delete. The deletion of snapshots in fully accounting
qgroups is a known CPU/IO performance bottleneck.
Note: The squota is not suitable for the general use case but works well for
containers where the original subvolume exists for the whole time. This is a
backward incompatible feature as it needs extending some structures, but can
be enabled on an existing filesystem.
- temporary filesystem fsid (temp_fsid): The fsid identifies a filesystem and
is hard coded in the structures, which disallows mounting the same fsid found
on different devices.
For a single device filesystem this is not strictly necessary, a new
temporary fsid can be generated on mount e.g. after a device is cloned. This
will be used by Steam Deck for root partition A/B testing, or can be used for
VM root images.
- filesystems with partially finished metadata_uuid conversion cannot be
mounted anymore and the uuid fixup has to be done by btrfs-progs (btrfstune).
Performance improvements:
- reduce reservations for checksum deletions (with enabled free space tree by
factor of 4), on a sample workload on file with many extents the deletion
time decreased by 12%
- make extent state merges more efficient during insertions, reduce rb-tree
iterations (run time of critical functions reduced by 5%)
Core changes:
- the integrity check functionality has been removed, this was a debugging
feature and removal does not affect other integrity checks like checksums or
tree-checker
- space reservation changes:
- more efficient delayed ref reservations, this avoids building up too much
work or overusing or exhausting the global block reserve in some situations
- move delayed refs reservation to the transaction start time, this prevents
some ENOSPC corner cases related to exhaustion of global reserve
- adjust overcommit logic in near full situations, account for one more
chunk to eventually allocate metadata chunk, this is mostly relevant for
small filesystems (<10GiB)
- single device filesystems are scanned but not registered (except seed
devices), this allows temp_fsid to work
6.8 (Mar 2024)
^^^^^^^^^^^^^^
Pull requests:
`v6.8-rc1 `__,
`v6.8-rc2 `__,
`v6.8-rc4 `__,
`v6.8-rc5 `__,
`v6.8-rc6 `__,
`v6.8-rc7 (1) `__,
`v6.8-rc7 (2) `__
Core changes:
- convert extent buffers to folios:
- direct API conversion where possible
- performance can drop by a few percent on metadata heavy
workloads, the folio sizes are not constant and the calculations
add up in the item helpers
- both regular and subpage modes
- data cannot be converted yet, we need to port that to iomap and
there are some other generic changes required
- convert mount to the new API, should not be user visible:
- options deprecated long time ago have been removed: inode_cache,
recovery
- the new logic that splits mount to two phases slightly changes
timing of device scanning for multi-device filesystems
- LSM options will now work (like for selinux)
- convert delayed nodes radix tree to xarray, preserving the
preload-like logic that still allows to allocate with GFP_NOFS
Performance improvements:
- refactor chunk map structure, reduce size and improve performance
- extent map refactoring, smaller data structures, improved performance
- reduce size of struct extent_io_tree, embedded in several structures
- temporary pages used for compression are cached and attached to a shrinker,
this may slightly improve performance
Fixes:
- fix over-reservation of metadata chunks due to not keeping proper balance
between global block reserve and delayed refs reserve; in practice this
leaves behind empty metadata block groups, the workaround is to reclaim them
by using the '-musage=1' balance filter
- fix corner case of send that would generate potentially large stream of zeros
if there's a hole at the end of the file
- fix chunk validation in zoned mode on conventional zones, it was possible to
create chunks that would not be allowed on sequential zones
6.9 (May 2024)
^^^^^^^^^^^^^^
Pull requests:
`v6.9-rc1 (1) `__,
`v6.9-rc1 (2) `__,
`v6.9-rc2 `__,
`v6.9-rc3 `__,
`v6.9-rc5 `__,
`v6.9-rc6 `__,
`v6.9-rc7 `__,
`v6.9-rc8 `__,
Performance improvements:
- minor speedup in logging when repeatedly allocated structure is preallocated
only once, improves latency and decreases lock contention
- minor throughput increase (+6%), reduced lock contention after clearing
delayed allocation bits, applies to several common workload types
- features under CONFIG_BTRFS_DEBUG:
- sysfs knob for setting the how checksums are calculated when submitting IO,
inline or offloaded to a thread, this affects latency and throughput on some
block group profiles
Notable fixes:
- fix device tracking in memory that broke grub-probe
- zoned mode fixes:
- use zone-aware super block access during scrub
- delete zones that are 100% unusable to reclaim space
Other notable changes:
- additional validation of devices by major:minor numbers
6.10 (Jul 2024)
^^^^^^^^^^^^^^^
Pull requests:
`v6.10-rc1 (1) `__,
`v6.10-rc1 (2) `__,
`v6.10-rc3 (1) `__,
`v6.10-rc3 (2) `__,
`v6.10-rc5 `__,
`v6.10-rc6 `__,
`v6.10-rc7 (1) `__,
`v6.10-rc7 (2) `__,
`v6.10-rc8 `__,
Performance improvements:
- inline b-tree locking functions, improvement in metadata-heavy changes
- relax locking on a range that's being reflinked, allows read operations to
run in parallel
- speed up NOCOW write checks (throughput +9% on a sample test)
- extent locking ranges have been reduced in several places, namely around
delayed ref processing
Notable fixes or changes:
- add back mount option *norecovery*, deprecated long time ago and removed in
6.8 but still in use
- fix potential infinite loop when doing block group reclaim
- extent map shrinker, allow memory consumption reduction for direct io loads
6.11 (Sep 2024)
^^^^^^^^^^^^^^^
Pull requests:
`v6.11-rc1 (1) `__,
`v6.11-rc1 (2) `__,
`v6.11-rc2 `__,
`v6.11-rc3 `__,
`v6.11-rc4 `__,
`v6.11-rc4 `__,
`v6.11-rc6 `__,
`v6.11-rc7 `__,
User visible features:
- dynamic block group reclaim:
- tunable framework to avoid situations where eager data allocations prevent
creating new metadata chunks due to lack of unallocated space
- reuse sysfs knob bg_reclaim_threshold (otherwise used only in zoned mode)
for a fixed value threshold
- new on/off sysfs knob "dynamic_reclaim" calculating the value based on
heuristics, aiming to keep spare working space for relocating chunks but
not to needlessly relocate partially utilized block groups or reclaim newly
allocated ones
- stats are exported in sysfs per block group type, files "reclaim_*"
- this may increase IO load at unexpected times but the corner case of no
allocatable block groups is known to be worse
- automatically remove qgroup of deleted subvolumes:
- adjust qgroup removal conditions, make sure all related subvolume data are
already removed, or return EBUSY, also take into account setting of sysfs
drop_subtree_threshold
- also works in squota mode
- mount option updates: new modes of 'rescue=' that allow to mount images
(read-only) that could have been partially converted by user space tools
- ignoremetacsums - invalid metadata checksums are ignored
- ignoresuperflags - super block flags that track conversion in progress
(like UUID or checksums)
Other notable changes or fixes:
- space cache v1 marked as deprecated (a warning printed in syslog), the
free-space tree (i.e. the v2) has been default in "mkfs.btrfs" since 5.15,
the kernel code will be removed in the future on a conservative schedule
- tree checker improvements:
- validate data reference items
- validate directory item type
- send also detects last extent suitable for cloning (and not a write)
- extent map shrinker (a memory reclaim optimization) added in 6.10 now
available only under CONFIG_BTRFS_DEBUG due to performance problems
- update target inode's ctime on unlink,
`mandated by POSIX `__
- in zoned mode, detect unexpected zone write pointer change
6.12 (Nov 2024)
^^^^^^^^^^^^^^^
Pull requests:
`v6.12-rc1 `__,
`v6.12-rc1 `__,
`v6.12-rc2 `__,
`v6.12-rc3 `__,
`v6.12-rc4 `__,
`v6.12-rc5 `__,
`v6.12-rc6 `__,
`v6.12-rc7 `__,
`v6.12 `__
User visible changes:
- the FSTRIM ioctl updates the processed range even after an error or interruption
- cleaner thread is woken up in SYNC ioctl instead of waking the transaction
thread that can take some delay before waking up the cleaner, this can speed
up cleaning of deleted subvolumes
- print an error message when opening a device fail, e.g. when it's unexpectedly read-only
Core changes:
- improved extent map handling in various ways (locking, iteration, ...)
- new assertions and locking annotations
- raid-stripe-tree locking fixes
- use xarray for tracking dirty qgroup extents, switched from rb-tree
- turn the subpage test to compile-time condition if possible (e.g. on x86_64
with 4K pages), this allows to skip a lot of ifs and remove dead code
- more preparatory work for compression in subpage mode
Cleanups and refactoring:
- folio API conversions, many simple cases where page is passed so switch it to
folios
- more subpage code refactoring, update page state bitmap processing
- introduce auto free for btrfs_path structure, use for the simple cases
6.13 (Jan 2025)
^^^^^^^^^^^^^^^
Pull requests:
`v6.13-rc1 `__,
`v6.13-rc2 `__,
`v6.13-rc3 `__,
`v6.13-rc4 `__,
`v6.13-rc5 `__,
`v6.13-rc7 `__,
`v6.13 `__
User visible changes:
- wire encoded read (ioctl) to io_uring commands, this can be used on itself,
in the future this will allow 'send' to be asynchronous. As a consequence,
the encoded read ioctl can also work in non-blocking mode
- new ioctl to wait for cleaned subvolumes, no need to use the generic and
root-only SEARCH_TREE ioctl, will be used by "btrfs subvol sync"
- recognize different paths/symlinks for the same devices and don't report them
during rescanning, this can be observed with LVM or DM
- seeding device use case change, the sprout device (the one capturing new
writes) will not clear the read-only status of the super block; this prevents
accumulating space from deleted snapshots
- swapfile activation updates that are nice to CPU and activation is interruptible
Performance improvements:
- reduce lock contention when traversing extent buffers
- reduce extent tree lock contention when searching for inline backref
- switch from rb-trees to xarray for delayed ref tracking, improvements due to
better cache locality, branching factors and more compact data structures
- enable extent map shrinker again (prevent memory exhaustion under some types
of IO load), reworked to run in a single worker thread (there used to be
problems causing long stalls under memory pressure)
Core changes:
- raid-stripe-tree feature updates:
- make device replace and scrub work
- implement partial deletion of stripe extents
- new selftests
- split the config option BTRFS_DEBUG and add EXPERIMENTAL for
features that are experimental or with known problems so we don't
misuse debugging config for that
- subpage mode updates (sector < page):
- update compression implementations
- update writepage, writeback
- continued folio API conversions, buffered writes
- make buffered write copy one page at a time, preparatory work for
future integration with large folios, may cause performance drop
- proper locking of root item regarding starting send
- error handling improvements
- code cleanups and refactoring:
- dead code removal
- unused parameter reduction
- lockdep assertions
6.14 (Mar 2025)
^^^^^^^^^^^^^^^
Pull requests:
`v6.14-rc1 `__,
`v6.14-rc2 `__,
`v6.14-rc3 `__,
`v6.14-rc5 `__,
`v6.14-rc6 `__,
User visible changes, features:
- rebuilding of the free space tree at mount time is done in more transactions,
fix potential hangs when the transaction thread is blocked due to large
amount of block groups
- more read IO balancing strategies (experimental config), add two new ways how
to select a device for read if the profiles allow that (all RAID1*), the
current default selects the device by pid which is good on average but less
performant for single reader workloads
- select preferred device for all reads (namely for testing)
- round-robin, balance reads across devices relevant for the requested IO range
- add encoded write ioctl support to io_uring (read was added in
6.12), basis for writing send stream using that instead of
syscalls, non-blocking mode is not yet implemented
- support FS_IOC_READ_VERITY_METADATA, applications can use the
metadata to do their own verification
- pass inode's i_write_hint to bios, for parity with other
filesystems, ioctls F_GET_RW_HINT/F_SET_RW_HINT
Core:
- in zoned mode: allow to directly reclaim a block group by simply
resetting it, then it can be reused and another block group does
not need to be allocated
- super block validation now also does more comprehensive sys array
validation, adding it to the points where superblock is validated
(post-read, pre-write)
- subpage mode fixes:
- fix double accounting of blocks due to some races
- improved or fixed error handling in a few cases (compression,
delalloc)
- raid stripe tree:
- fix various cases with extent range splitting or deleting
- implement hole punching to extent range
- reduce number of stripe tree lookups during bio submission
- more self-tests
- updated self-tests (delayed refs)
- error handling improvements
- cleanups, refactoring
- remove rest of backref caching infrastructure from relocation,
not needed anymore
- error message updates
- remove unnecessary calls when extent buffer was marked dirty
- unused parameter removal
- code moved to new files
5.x
---
5.0 (Mar 2019)
^^^^^^^^^^^^^^
Pull requests:
`v5.0-rc1 `__,
`v5.0-rc2 `__,
`v5.0-rc3 `__,
`v5.0-rc5 `__
Features, highlights:
- swapfile support (with some limitations)
- metadata uuid - new feature that allows fast uuid change without rewriting all metadata blocks (backward incompatible)
- balance messages in the syslog when operations start or stop
Fixes:
- improved check of filesystem id associated with a device during scan to
detect duplicate devices that could be mixed up during mount
- fix device replace state transitions
- fix a crash due to a race when quotas are enabled during snapshot creation
- GFP_NOFS/memalloc_nofs_* fixes
- fsync fixes
Other:
- remove first phase of balance that tried to remove some space (not necessary)
- separate reserve for delayed refs from global reserve
- cleanups
- see [https://git.kernel.org/linus/32ee34eddad13cd44ad0cb3e659fe6fd49143b62 pull request]
5.1 (May 2019)
^^^^^^^^^^^^^^
Pull requests:
`v5.1-rc1 `__,
`v5.1-rc1 `__,
`v5.1-rc3 `__,
`v5.1-rc5 `__,
`v5.1-rc7 `__
New features, highlights:
- zstd compression levels can be set as mount options
- new ioctl to unregister scanned devices
- scrub prints messages about start/stop/cancel to the log
Other changes:
- qgroups skip some work (est. speedup during balance 20%)
- reclaim vs GFP_KERNEL fixes
- fsync fixes for rename/unlink/rmdir
- improved enospc handling on a highly fragmented filesystem
- no trim on filesystem with unreplayed log
- see [https://git.kernel.org/linus/b1e243957e9b3ba8e820fb8583bdf18e7c737aa2 pull request]
5.2 (Jul 2019)
^^^^^^^^^^^^^^
Pull requests:
`v5.2-rc1 `__,
`v5.2-rc2 `__,
`v5.2-rc3 `__,
`v5.2-rc5 `__,
`v5.2-rc6 `__
User visible changes, highlights:
- better read time and write checks to catch errors early and before writing data to disk
- qgroups + metadata relocation: last speed up patch in the series there should
be no overhead comparing balance with and without qgroups
- FIEMAP ioctl does not start a transaction unnecessarily
- LOGICAL_INO (v1, v2) does not start transaction unnecessarily
- fsync on files with many (but not too many) hardlinks is faster
- send tries harder to find ranges to clone
- trim/discard will skip unallocated chunks that haven't been touched since the last mount
- tree-checker does more validations: device item, inode item, block group item:
- improved space flushing logic for intense DIO vs buffered workloads
- metadata reservations for delalloc reworked to better adapt in many-writers/low-space scenarios
Fixes:
- send flushes delayed allocation before start
- fix fallocate with qgroups accounting underflow
- send and dedupe can't be run at the same time
- fix crash in relocation/balance after resume
Other:
- new tracepoints for locking
- async write preallocates memory to avoid failures deep in call chains
- lots of cleanups
5.3 (Sep 2019)
^^^^^^^^^^^^^^
Pull requests:
`v5.3-rc1 `__,
`v5.3-rc2 `__,
`v5.3-rc2 `__,
`v5.3-rc3 `__,
`v5.3-rc5 `__,
`v5.3 `__
New features, highlights:
- chunks that have been trimmed and unchanged since last mount are tracked and skipped on repeated trims
- use hw assisted crc32c on more arches
- the RAID56 incompat bit is automatically removed when the last block group of that type is removed
Fixes:
- update ctime/mtime/iversion after hole punching
- fsync fixes
- send and balance can't be run at the same time
Other:
- code refactoring, file splits
- preparatory work for more checksums
- tree checker to verify lengths of various items
- delayed iput happens at unlink time, not in cleaner thread
- new tracepoints for space updates
5.4 (Nov 2019)
^^^^^^^^^^^^^^
Pull requests:
`v5.4-rc1 `__,
`v5.4-rc1 `__,
`v5.4-rc3 `__,
`v5.4-rc5 `__,
`v5.4-rc7 `__,
`v5.4-rc8 `__
- tree checker: added sanity checks for tree items, extent items, and references
- deprecated subvolume creation mode BTRFS_SUBVOL_CREATE_ASYNC
- qgroup relation deletion tries harder, orphan entries are removed too
- space handling improvements (ticket reservations, flushing, overcommit logic)
- fix possible lockups during send of large subvolumes
- see [https://git.kernel.org/linus/7d14df2d280fb7411eba2eb96682da0683ad97f6 pull request]
5.5 (Jan 2020)
^^^^^^^^^^^^^^
Pull requests:
`v5.5-rc1 `__,
`v5.5-rc1 `__,
`v5.5-rc2 `__,
`v5.5-rc3 `__,
`v5.5-rc5 `__,
`v5.5-rc7 `__,
`v5.5 `__
- new block group profiles: RAID1 with 3- and 4- copies
- RAID1 in btrfs has always 2 copies, now add support for 3 and 4
- this is an incompat feature (named RAID1C34)
- recommended use of RAID1C3 is replacement of RAID6 profile on metadata,
this brings a more reliable resiliency against 2 device loss/damage
- support for new checksums
- per-filesystem, set at mkfs time
- fast hash (crc32c successor): xxhash, 64bit digest
- strong hashes (both 256bit): sha256 (slower, FIPS), blake2b (faster)
- speed up lseek, don't take inode locks unnecessarily, this can speed up parallel SEEK_CUR/SEEK_SET/SEEK_END by 80%
- send:
- allow clone operations within the same file
- limit maximum number of sent clone references to avoid slow backref walking
- error message improvements: device scan prints process name and PID
- new tree-checker sanity tests (INODE_ITEM, DIR_ITEM, DIR_INDEX, INODE_REF, XATTR)
5.6 (Mar 2020)
^^^^^^^^^^^^^^
Pull requests:
`v5.6-rc1 `__,
`v5.6-rc1 `__,
`v5.6-rc1 `__,
`v5.6-rc2 `__,
`v5.6-rc3 `__,
`v5.6-rc3 `__,
`v5.6-rc5 `__,
`v5.6-rc7 `__
Highlights:
- async discard
- "mount -o discard=async" to enable it
- freed extents are not discarded immediately, but grouped together and
trimmed later, with IO rate limiting
- the actual discard IO requests have been moved out of transaction commit
to a worker thread, improving commit latency
- IO rate and request size can be tuned by sysfs files, for now enabled only
with CONFIG_BTRFS_DEBUG as we might need to add/delete the files and don't
have a stable-ish ABI for general use, defaults are conservative
- export device state info in sysfs, e.g. missing, writeable
- no discard of extents known to be untouched on disk (e.g. after reservation)
- device stats reset is logged with process name and PID that called the ioctl
Core changes:
- qgroup assign returns ENOTCONN when quotas not enabled, used to return EINVAL
that was confusing
- device closing does not need to allocate memory anymore
- snapshot aware code got removed, disabled for years due to performance
problems, reimplementation will allow to select whether defrag breaks or does
not break COW on shared extents
- tree-checker:
- check leaf chunk item size, cross check against number of stripes
- verify location keys for DIR_ITEM, DIR_INDEX and XATTR items
- new self test for physical -> logical mapping code, used for super block range exclusion
Fixes:
- fix missing hole after hole punching and fsync when using NO_HOLES
- writeback: range cyclic mode could miss some dirty pages and lead to OOM
- two more corner cases for metadata_uuid change after power loss during the change
- fix infinite loop during fsync after mix of rename operations
5.7 (May 2020)
^^^^^^^^^^^^^^
Pull requests:
`v5.7-rc1 `__,
`v5.7-rc2 `__,
`v5.7-rc2 `__,
`v5.7-rc4 `__,
`v5.7-rc4 `__
Highlights:
- v2 of ioctl to delete subvolumes, allowing to delete by id and more future extensions
- removal of obsolete ioctl flag BTRFS_SUBVOL_CREATE_ASYNC
- more responsive balance cancel
- speedup of extent back reference resolution
- reflink/clone_range works on inline extents
- lots of other core changes, see the [https://git.kernel.org/linus/15c981d16d70e8a5be297fa4af07a64ab7e080ed pull request]
5.8 (Aug 2020)
^^^^^^^^^^^^^^
Pull requests:
`v5.8-rc1 `__,
`v5.8-rc1 `__,
`v5.8-rc3 `__,
`v5.8-rc5 `__,
`v5.8-rc5 `__,
`v5.8-rc7 `__
Highlights:
- speedup dead root detection during orphan cleanup
- send will emit file capabilities after chown
Core changes:
- improved global block reserve utilization
- direct io cleanups and fixes
- refactored block group reading code
5.9 (Oct 2020)
^^^^^^^^^^^^^^
Pull requests:
`v5.9-rc1 `__,
`v5.9-rc1 `__,
`v5.9-rc3 `__,
`v5.9-rc4 `__,
`v5.9-rc4 `__,
`v5.9-rc5 `__,
`v5.9-rc6 `__,
`v5.9-rc7 `__,
`v5.9-rc8 `__
Highlights:
- add mount option ''rescue'' to unify options for various recovery tasks on a mounted filesystems
- mount option ''inode_cache'' is deprecated and will be removed in 5.11
- removed deprecated options ''alloc_start'' and ''subvolrootid''
- sysfs exports information about qgroups and relations
- FS_INFO ioctl exports more information from the filesystem (notably type of checksum)
- running balance detects Ctrl-C too
- performance improvements in fsync
- mount-time prefetch of chunk tree
5.10 (Dec 2020)
^^^^^^^^^^^^^^^
Pull requests:
`v5.10-rc1 `__,
`v5.10-rc2 `__,
`v5.10-rc4 `__,
`v5.10-rc6 `__
Highlights:
- performance improvements in fsync (dbench workload: higher throughput, lower latency)
- sysfs exports current exclusive operation (balance, resize, device add/del/...)
- sysfs exports supported send stream version
Core:
- direct io uses iomap infrastructure (no more ''struct buffer_head'')
- space reservations for data now use ticket infrastructure
- cleanups, refactoring, preparatory work
- error handling improvements
- fixes
5.11 (Feb 2021)
^^^^^^^^^^^^^^^
Pull requests:
`v5.11-rc1 `__,
`v5.11-rc3 `__,
`v5.11-rc4 `__,
`v5.11-rc5 `__,
`v5.11-rc6 `__,
`v5.11 `__
- new mount option ''rescue'', various modes how to access a damaged filesystem
- sysfs updates: filesystem generation, supported ''rescue'' modes, read mirror policy
- removed feature: ''mount -o inode_cache''
- free space tree fixes, v1 cache removed during conversion
Core:
- locking switched to standard rw semaphores
- direct IO ported to iomap infrastructure
- zoned allocation mode preparation
- subpage blocksize preparation
- various performance improvements (skipping unnecessary work)
5.12 (Apr 2021)
^^^^^^^^^^^^^^^
Pull requests:
`v5.12-rc1 `__,
`v5.12-rc1 `__,
`v5.12-rc2 `__,
`v5.12-rc2 `__,
`v5.12-rc2 `__,
`v5.12-rc4 `__,
`v5.12-rc5 `__,
`v5.12-rc7 `__
Features:
- zoned mode (SMR/ZBC/ZNS friendly allocation mode), first working version with limitations
- misc performance improvements
- flushing and ticket space reservations
- preemptive background flushing
- less lock contention for delayed refs
- dbench-like workload (+7% throughput, -20% latency)
Core changes:
- subpage block size support preparations
Fixes:
- swapfile fixes (vs scrub, activation vs snapshot creation)
5.13 (Jun 2021)
^^^^^^^^^^^^^^^
Pull requests:
`v5.13-rc1 `__,
`v5.13-rc2 `__,
`v5.13-rc2 `__,
`v5.13-rc3 `__,
`v5.13-rc3 `__,
`v5.13-rc5 `__,
`v5.13-rc6 `__,
`v5.13-rc7 `__
User visible improvements
- readahead for send, improving run time of full send by 10% and for incremental by 25%
- make reflinks respect O_SYNC, O_DSYNC and S_SYNC flags
- export supported sectorsize values in sysfs (currently only page size, more
once full subpage support lands)
- more graceful errors and warnings on 32bit systems when logical addresses for
metadata reach the limit posed by unsigned long in page::index
- error: fail mount if there's a metadata block beyond the limit
- error: new metadata block would be at unreachable address
- warn when 5/8th of the limit is reached, for 4K page systems it's 10T, for 64K page it's 160T
- zoned mode
- relocated zones get reset at the end instead of discard
- automatic background reclaim of zones that have 75%+ of unusable space, the
threshold is tunable in sysfs
Fixes
- fix inefficient preemptive reclaim calculations
- fix exhaustion of the system chunk array due to concurrent allocations
- fix fallback to no compression when racing with remount
- fix unmountable seed device after fstrim
- fix fiemap to print extents that could get misreported due to internal extent
splitting and logical merging for fiemap output
- preemptive fix for dm-crypt on zoned device that does not properly advertise zoned support
Core changes
- add inode lock to synchronize mmap and other block updates (e.g. deduplication, fallocate, fsync)
- subpage support update: metadata changes now support read and write
- error handling through out relocation call paths
- many other cleanups and code simplifications
5.14 (Aug 2021)
^^^^^^^^^^^^^^^
Pull requests:
`v5.14-rc1 `__,
`v5.14-rc2 `__,
`v5.14-rc3 `__,
`v5.14-rc4 `__,
`v5.14-rc7 `__,
`v5.14 `__
Highlights:
- new sysfs knob to limit scrub IO bandwidth per device
- device stats are also available in /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats
- support cancellable resize and device delete ioctls
- change how the empty value is interpreted when setting a property, so far we
have only 'btrfs.compression' and we need to distinguish a reset to defaults
and setting "do not compress", in general the empty value will always mean
'reset to defaults' for any other property, for compression it's either 'no'
or 'none' to forbid compression
- performance improvements (xattrs, truncate)
- space handling improvements, preemptive flushing
- more subpage support preparation
5.15 (Nov 2021)
^^^^^^^^^^^^^^^
Pull requests:
`v5.15-rc1 `__,
`v5.15-rc1 `__,
`v5.15-rc3 `__,
`v5.15-rc6 `__,
`v5.15 `__
Features:
- fs-verity support, using standard ioctls, backward compatible with read-only
limitation on inodes with previously enabled fs-verity
- idmapped mount support
- make mount with rescue=ibadroots more tolerant to partially damaged trees
- allow raid0 on a single device and raid10 on two devices, degenerate cases
but might be useful as an intermediate step during conversion to other
profiles
- zoned mode block group auto reclaim can be disabled via sysfs knob
Performance improvements:
- continue readahead of node siblings even if target node is in memory, could speed up full send (on sample test +11%)
- batching of delayed items can speed up creating many files
- fsync/tree-log speedups
- avoid unnecessary work (gains +2% throughput, -2% run time on sample load)
- reduced lock contention on renames (on dbench +4% throughput, up to -30% latency)
Fixes:
- various zoned mode fixes
- preemptive flushing threshold tuning, avoid excessive work on almost full filesystems
Core:
- continued subpage support, preparation for implementing remaining features
like compression and defragmentation; with some limitations, write is now
enabled on 64K page systems with 4K sectors, still considered experimental
- no readahead on compressed reads
- inline extents disabled
- disabled raid56 profile conversion and mount
- improved flushing logic, fixing early ENOSPC on some workloads
- inode flags have been internally split to read-only and read-write incompat bit parts, used by fs-verity
- new tree items for fs-verity: descriptor item, Merkle tree item
- inode operations extended to be namespace-aware
- cleanups and refactoring
5.16 (Jan 2022)
^^^^^^^^^^^^^^^
Pull requests:
`v5.16-rc1 `__,
`v5.16-rc1 `__,
`v5.16-rc2 `__,
`v5.16-rc3