Package Details: btrfs-progs-git 7978_7.1_r51_gfac7d38d-1

Git Clone URL: https://aur.archlinux.org/btrfs-progs-git.git (read-only, click to copy)
Package Base: btrfs-progs-git
Description: Btrfs filesystem utilities
Upstream URL: https://btrfs.wiki.kernel.org/index.php/Main_Page
Licenses: GPL-2.0-only
Conflicts: btrfs-progs
Provides: btrfs-progs
Submitter: None
Maintainer: WorMzy
Last Packager: WorMzy
Votes: 61
Popularity: 0.000000
First Submitted: 2008-12-27 21:29 (UTC)
Last Updated: 2026-09-03 11:36 (UTC)

Required by (161)

Sources (5)

Latest Comments

1 2 3 4 5 6 7 Next › Last »

WorMzy commented on 2026-09-03 11:37 (UTC)

Hi Ataraxy, sorry for the slow response.

As you noted, btrfsck is already installed as a symlink to btrfs, and I'm hesitant to break with the behaviour of the non-git package in [core] and install a standalone binary instead. The binary is built by default though (the only one that isn't is btrfs-sb-mod), so I've added the install line commented out in package() for people to toggle on as and when they need to.

Ataraxy commented on 2026-08-25 10:10 (UTC) (edited on 2026-08-25 10:10 (UTC) by Ataraxy)

I needed to build my own btrfs-sb-mod to point at a root tree after a pvscan caused corruption.

Upstream builds three "internal" tools that make install skips:

  • btrfs-sb-mod — prints/edits superblock fields (root, generation…) and recomputes their checksums; last-resort rescue editing of corrupt SBs.
  • btrfsck — the original standalone fs checker; useful to cross-check suspicious results from the integrated btrfs check.
  • btrfs-corrupt-block — deliberately damages on-disk structures; powers upstream's own test suite, handy for recovery drills.

Could package() add:

  make btrfsck btrfs-corrupt-block btrfs-sb-mod
  install -m755 btrfsck btrfs-corrupt-block btrfs-sb-mod \
      "${pkgdir}/usr/bin/"

Caveat: btrfs-sb-mod currently writes truncated checksums on xxhash64 filesystems — update_block_csum()/check_csum_superblock() use the CRC32-sized global csum_size instead of btrfs_csum_type_size(), so patched superblocks show [DON'T MATCH] in dump-super. Filed upstream as kdave/btrfs-progs#1160; local fix:

--- a/btrfs-sb-mod.c
+++ b/btrfs-sb-mod.c
@@ -40,7 +40,7 @@
    btrfs_csum_data(csum_type, (unsigned char *)sb + BTRFS_CSUM_SIZE,
            result, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
-   return (memcmp(sb, result, csum_size) == 0);
+   return (memcmp(sb, result, btrfs_csum_type_size(csum_type)) == 0);
 }

 static void update_block_csum(void *block)
@@ -54,7 +54,7 @@

    memset(block, 0, BTRFS_CSUM_SIZE);
    hdr = (struct btrfs_header *)block;
-   memcpy(&hdr->csum, result, csum_size);
+   memcpy(&hdr->csum, result, btrfs_csum_type_size(csum_type));
 }

micwoj92 commented on 2025-03-19 19:07 (UTC)

I think it's something with my system. For the record, I also build in clean chroot, I checked and I am getting same issue while building btrfs-progs from repos.

WorMzy commented on 2025-03-18 12:49 (UTC)

Interesting point. You shouldn't need a btrfs filesystem (the tests provide their own, if required), but you will need to modprobe the btrfs kernel module if you don't have it loaded, or the tests will fail:

==> Starting check()...
  TEST     fsck-tests.sh
failed: modprobe btrfs
make: *** [Makefile:543: test-fsck] Error 1
==> ERROR: A failure occurred in check().
    Aborting...

If you want to bypass the tests entirely, use --nocheck, but I don't recommend it. BTRFS is fragile enough without having potentially broken utils interacting with it..

micwoj92 commented on 2025-03-17 22:44 (UTC)

Does it matter what filesystem I am using? I do not use btrfs on my computer. I also have linux-lts 6.12.19-1 now. This is the error:

=== START TEST 001-bad-file-extent-bytenr
restoring image default_case.img
ERROR: failed to enlarge result image file from 1111576576 to 3000592982016: File too large
ERROR: restore failed: -27
failed to restore image ./default_case.img
testing image 
====== RUN MUSTFAIL /build/btrfs-progs-git/src/btrfs-progs/btrfs check 
Opening filesystem to check...
failed (expected): /build/btrfs-progs-git/src/btrfs-progs/btrfs check 
====== RUN CHECK /build/btrfs-progs-git/src/btrfs-progs/btrfs check --repair --force 
ERROR: mount check: cannot open : No such file or directory
WARNING: cannot check mount status of , the filesystem could be mounted, continuing because of --force
ERROR: cannot stat '': No such file or directory
ERROR: cannot open file system
enabling repair mode
Opening filesystem to check...
failed: /build/btrfs-progs-git/src/btrfs-progs/btrfs check --repair --force

WorMzy commented on 2025-03-17 22:09 (UTC)

@micwoj92: I'm unable to reproduce that here (in a clean chroot). There may be more information in your $srcdir/btrfs-progs/tests/fsck-tests-results.txt file, but I suspect the build was bad. If you can reproduce it, you might want to try bisecting the problem and reporting upstream.

micwoj92 commented on 2025-03-17 20:42 (UTC)

Check fails for me with

==> Starting check()...
  TEST     fsck-tests.sh
    [TEST/fsck]   001-bad-file-extent-bytenr
failed to restore image ./default_case.img
basename: missing operand
Try 'basename --help' for more information.
failed: /build/btrfs-progs-git/src/btrfs-progs/btrfs check --repair --force 
make: *** [Makefile:543: test-fsck] Error 1
==> ERROR: A failure occurred in check().
    Aborting...

WorMzy commented on 2024-11-05 17:58 (UTC)

@EndlessEden: sure, I've added that in. I didn't include the btrfs- prefix though, I don't think that's needed since nothing else provides a hash-speedtest binary.

EndlessEden commented on 2024-11-05 03:33 (UTC) (edited on 2024-11-05 03:53 (UTC) by EndlessEden)

@wormzy -- can you include/build "hash-speedtest" as well. Its in the makefile, and is a benchmark of the various hashes btrfs filesystem module support.

Its used for getting platform-specific benchmarks, thus is incredibly useful for switching between checksumming. (which support was added upstream finally) See below for example.


@@ -55,6 +55,7 @@
   cd ${_gitname}
   ./configure --prefix=/usr
   make
+  make hash-speedtest
 }

 package() {
@@ -68,6 +69,7 @@

   cd ${_gitname}
   make DESTDIR="${pkgdir}" install
+  install -Dm755 hash-speedtest "${pkgdir}/usr/bin/btrfs-hash-speedtest"

   # install bash completion
   install -Dm644 btrfs-completion "${pkgdir}/usr/share/bash-completion/completions/btrfs"

WorMzy commented on 2024-01-14 13:39 (UTC)

Thanks for the heads up, 0e4ef622, I've refreshed the dep arrays based on upstream.