]> git.sesse.net Git - bcachefs-tools-debian/log
bcachefs-tools-debian
5 years agoMerge pull request #10 from modelrockettier/shrinkers
koverstreet [Sun, 4 Nov 2018 22:42:20 +0000 (17:42 -0500)]
Merge pull request #10 from modelrockettier/shrinkers

Don't read meminfo if there are no shrinkers

5 years agoMerge pull request #9 from modelrockettier/master
koverstreet [Sun, 4 Nov 2018 22:42:04 +0000 (17:42 -0500)]
Merge pull request #9 from modelrockettier/master

Add chacha20 and poly1305 modules to initramfs

5 years agoMake sure initramfs-tools adds chacha20 and poly1305 if loaded
Tim Schlueter [Fri, 24 Aug 2018 04:42:44 +0000 (21:42 -0700)]
Make sure initramfs-tools adds chacha20 and poly1305 if loaded

5 years agoDon't read meminfo if there are no shrinkers
Tim Schlueter [Fri, 24 Aug 2018 05:37:31 +0000 (22:37 -0700)]
Don't read meminfo if there are no shrinkers

5 years agoDon't display an error on --help
Tim Schlueter [Fri, 24 Aug 2018 04:40:25 +0000 (21:40 -0700)]
Don't display an error on --help

5 years agoUpdate bcachefs sources to defaad6d47 bcachefs: Fix an assertion when rebuilding...
Kent Overstreet [Sun, 4 Nov 2018 01:56:27 +0000 (21:56 -0400)]
Update bcachefs sources to defaad6d47 bcachefs: Fix an assertion when rebuilding replicas

5 years agoUpdate bcachefs sources to b12d1535f3 bcachefs: fix bounds checks in bch2_bio_map()
Kent Overstreet [Sun, 4 Nov 2018 00:11:29 +0000 (20:11 -0400)]
Update bcachefs sources to b12d1535f3 bcachefs: fix bounds checks in bch2_bio_map()

5 years agofix a (spurious) gcc warning
Kent Overstreet [Sat, 3 Nov 2018 20:58:41 +0000 (16:58 -0400)]
fix a (spurious) gcc warning

5 years agoimprove dev_to_mount()
Kent Overstreet [Sun, 21 Oct 2018 23:35:35 +0000 (19:35 -0400)]
improve dev_to_mount()

should fix a bug where resize does an offline resize when the fs was
mounted because it thought it wasn't mounted

5 years agoUpdate bcachefs sources to d7f6da1d60 bcachefs: fix missing include
Kent Overstreet [Fri, 12 Oct 2018 18:55:27 +0000 (14:55 -0400)]
Update bcachefs sources to d7f6da1d60 bcachefs: fix missing include

5 years agocmd_device_add: replace tier with group in usage
Stijn Tintel [Sun, 7 Oct 2018 15:19:30 +0000 (18:19 +0300)]
cmd_device_add: replace tier with group in usage

Tiering has been replaced by disk groups, but the usage message for
cmd_device_add was never updated to reflect this change. Replace the
tier option with group to fix the usage message.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years agocmd_device: add missing short options to usage
Stijn Tintel [Sun, 7 Oct 2018 15:19:29 +0000 (18:19 +0300)]
cmd_device: add missing short options to usage

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
5 years agoUpdate bcachefs sources to 446219cb11 bcachefs: Dirent repair code
Kent Overstreet [Tue, 21 Aug 2018 23:43:00 +0000 (19:43 -0400)]
Update bcachefs sources to 446219cb11 bcachefs: Dirent repair code

5 years agoUpdate bcachefs sources to 15f6e66e86 bcachefs: pass around bset_tree less
Kent Overstreet [Wed, 15 Aug 2018 23:41:24 +0000 (19:41 -0400)]
Update bcachefs sources to 15f6e66e86 bcachefs: pass around bset_tree less

5 years agoInclude superblock, journal in fs usage output
Kent Overstreet [Wed, 15 Aug 2018 23:41:36 +0000 (19:41 -0400)]
Include superblock, journal in fs usage output

5 years agofix rereplicate command
Kent Overstreet [Sat, 21 Jul 2018 08:37:31 +0000 (04:37 -0400)]
fix rereplicate command

5 years agoReturn errors from fsck properly
Kent Overstreet [Sat, 21 Jul 2018 03:42:06 +0000 (23:42 -0400)]
Return errors from fsck properly

5 years agoUpdate bcachefs sources to eab3b355cf bcachefs: trace transaction restarts
Kent Overstreet [Mon, 16 Jul 2018 07:58:54 +0000 (03:58 -0400)]
Update bcachefs sources to eab3b355cf bcachefs: trace transaction restarts

5 years agoUpdate bcachefs sources to 940d6ca657 bcachefs: acl code improvements
Kent Overstreet [Fri, 13 Jul 2018 04:43:23 +0000 (00:43 -0400)]
Update bcachefs sources to 940d6ca657 bcachefs: acl code improvements

5 years agoUpdate bcachefs sources to 2cb70a82bc bcachefs: delete some debug code
Kent Overstreet [Wed, 27 Jun 2018 18:41:51 +0000 (14:41 -0400)]
Update bcachefs sources to 2cb70a82bc bcachefs: delete some debug code

6 years agoDelete more shim layer code
Kent Overstreet [Fri, 1 Jun 2018 20:20:02 +0000 (16:20 -0400)]
Delete more shim layer code

6 years agoUpdate bcachefs sources to 9abf628c70 bcachefs: Fix a spurious error in fsck
Kent Overstreet [Fri, 1 Jun 2018 21:17:16 +0000 (17:17 -0400)]
Update bcachefs sources to 9abf628c70 bcachefs: Fix a spurious error in fsck

6 years agoMerge pull request #4 from modelrockettier/master
koverstreet [Mon, 28 May 2018 02:49:41 +0000 (22:49 -0400)]
Merge pull request #4 from modelrockettier/master

Add version command

6 years agoDon't add commit id to version when building from a tag
Tim Schlueter [Sun, 27 May 2018 19:38:51 +0000 (12:38 -0700)]
Don't add commit id to version when building from a tag

6 years agoAdded 'version' command to print when the bcachefs tool was built
Tim Schlueter [Wed, 14 Feb 2018 09:28:24 +0000 (01:28 -0800)]
Added 'version' command to print when the bcachefs tool was built

6 years agodrop dead code
Kent Overstreet [Thu, 17 May 2018 07:14:09 +0000 (03:14 -0400)]
drop dead code

6 years agoUpdate bcachefs sources to f65603966f bcachefs: drop old includes
Kent Overstreet [Thu, 17 May 2018 07:07:00 +0000 (03:07 -0400)]
Update bcachefs sources to f65603966f bcachefs: drop old includes

6 years agoSwitch to liblz4
Kent Overstreet [Thu, 17 May 2018 06:45:49 +0000 (02:45 -0400)]
Switch to liblz4

6 years agoupdate INSTALL
Kent Overstreet [Thu, 17 May 2018 06:34:18 +0000 (02:34 -0400)]
update INSTALL

6 years agofixes for 32 bit builds/non x86 archs
Kent Overstreet [Thu, 10 May 2018 07:57:37 +0000 (03:57 -0400)]
fixes for 32 bit builds/non x86 archs

6 years agoUpdate bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines
Kent Overstreet [Thu, 17 May 2018 05:38:57 +0000 (01:38 -0400)]
Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines

6 years agobcachefs fs usage improvements
Kent Overstreet [Fri, 4 May 2018 18:27:13 +0000 (14:27 -0400)]
bcachefs fs usage improvements

6 years agoUpdate bcachefs sources to ed4aea2ad4 bcachefs: fix gcc warning
Kent Overstreet [Fri, 4 May 2018 18:04:31 +0000 (14:04 -0400)]
Update bcachefs sources to ed4aea2ad4 bcachefs: fix gcc warning

6 years agoUpdate bcachefs sources to edf5f38218 bcachefs: Refactor superblock code
Kent Overstreet [Tue, 10 Apr 2018 23:19:09 +0000 (19:19 -0400)]
Update bcachefs sources to edf5f38218 bcachefs: Refactor superblock code

6 years agoUpdate bcachefs sources to 9fc6ccd865 bcachefs: fix copygc_pred()
Kent Overstreet [Tue, 20 Mar 2018 07:54:50 +0000 (03:54 -0400)]
Update bcachefs sources to 9fc6ccd865 bcachefs: fix copygc_pred()

6 years agofix cmd_assemble
Kent Overstreet [Tue, 13 Mar 2018 23:52:23 +0000 (19:52 -0400)]
fix cmd_assemble

6 years agoAdd --durability to format
Kent Overstreet [Tue, 13 Mar 2018 07:23:27 +0000 (03:23 -0400)]
Add --durability to format

6 years agoUpdate bcachefs sources to f7ccf51390 bcachefs: durability
Kent Overstreet [Tue, 13 Mar 2018 07:22:35 +0000 (03:22 -0400)]
Update bcachefs sources to f7ccf51390 bcachefs: durability

6 years agoUpdate bcachefs sources to da224776eb bcachefs: fix an error path
Kent Overstreet [Thu, 1 Mar 2018 23:33:14 +0000 (18:33 -0500)]
Update bcachefs sources to da224776eb bcachefs: fix an error path

6 years agominor disk group fixes;, add background_compression option
Kent Overstreet [Wed, 28 Feb 2018 22:56:53 +0000 (17:56 -0500)]
minor disk group fixes;, add background_compression option

6 years agoUpdate bcachefs sources to e7f4678827 bcachefs: fix variable shadowing in macro call
Kent Overstreet [Wed, 28 Feb 2018 22:56:28 +0000 (17:56 -0500)]
Update bcachefs sources to e7f4678827 bcachefs: fix variable shadowing in macro call

6 years agoAdding plymouth support to initramfs script
Tim Schlueter [Mon, 26 Feb 2018 01:21:44 +0000 (17:21 -0800)]
Adding plymouth support to initramfs script

6 years agoInitramfs script improvements
Tim Schlueter [Mon, 26 Feb 2018 00:56:04 +0000 (16:56 -0800)]
Initramfs script improvements

- Resolve the root device, so it can be specified by UUID, etc.
- Exit immediately if the ROOTFSTYPE is set and not bcachefs
- Only try to unlock the device 3 times before opening a shell or
  rebooting (depending on kernel cmdline)

6 years agodisk groups
Kent Overstreet [Sat, 25 Nov 2017 11:16:39 +0000 (06:16 -0500)]
disk groups

6 years agoUpdate bcachefs sources to 90d78c2461 bcachefs: Option parsing for io targets
Kent Overstreet [Mon, 19 Feb 2018 02:43:46 +0000 (21:43 -0500)]
Update bcachefs sources to 90d78c2461 bcachefs: Option parsing for io targets

6 years agoadd missing include
Kent Overstreet [Sat, 17 Feb 2018 18:36:55 +0000 (13:36 -0500)]
add missing include

6 years agoUpdate bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring
Kent Overstreet [Fri, 16 Feb 2018 20:36:33 +0000 (15:36 -0500)]
Update bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring

6 years agoMerge pull request #2 from modelrockettier/master
koverstreet [Mon, 12 Feb 2018 02:03:36 +0000 (21:03 -0500)]
Merge pull request #2 from modelrockettier/master

Improve Debian Package Builds

6 years agoSet debian/compat to 10
Tim Schlueter [Sun, 11 Feb 2018 23:32:34 +0000 (15:32 -0800)]
Set debian/compat to 10

* Compat level 10 allows parallel builds by default.
* Also changed debuild to use short arguments.
* Long arguments weren't supported until dpkg-dev 1.18.8.

6 years agoSet PREFIX to /usr for .deb builds
Tim Schlueter [Sun, 11 Feb 2018 23:31:38 +0000 (15:31 -0800)]
Set PREFIX to /usr for .deb builds

6 years agoadd -c to cmd_unlock, to check if a device needs to be unlocked
Kent Overstreet [Sun, 11 Feb 2018 17:35:15 +0000 (12:35 -0500)]
add -c to cmd_unlock, to check if a device needs to be unlocked

6 years agofsck: support -a as -p for compatibility with other fsck
Leah Neukirchen [Sat, 10 Feb 2018 21:48:48 +0000 (22:48 +0100)]
fsck: support -a as -p for compatibility with other fsck

6 years agofsck: fix typo in usage
Leah Neukirchen [Sat, 10 Feb 2018 21:48:04 +0000 (22:48 +0100)]
fsck: fix typo in usage

6 years agoadd a missing build dependency
Kent Overstreet [Sat, 10 Feb 2018 09:45:03 +0000 (04:45 -0500)]
add a missing build dependency

6 years agoinclude/linux/bitmap.h: inline __bitmap_weight and __bitmap_and
Leah Neukirchen [Fri, 9 Feb 2018 23:08:32 +0000 (00:08 +0100)]
include/linux/bitmap.h: inline __bitmap_weight and __bitmap_and

6 years agotools-util.c: define generic crc32c on non-x86_64 arch
Leah Neukirchen [Fri, 9 Feb 2018 22:13:24 +0000 (23:13 +0100)]
tools-util.c: define generic crc32c on non-x86_64 arch

6 years agoinclude/linux/time64.h: no need for __iter_div_u64_rem in userspace
Leah Neukirchen [Fri, 9 Feb 2018 21:54:12 +0000 (22:54 +0100)]
include/linux/time64.h: no need for __iter_div_u64_rem in userspace

6 years agoinclude/linux/log2.h: define PAGE_SHIFT when needed
Leah Neukirchen [Fri, 9 Feb 2018 21:21:46 +0000 (22:21 +0100)]
include/linux/log2.h: define PAGE_SHIFT when needed

6 years agoPatches to support musl libc
Leah Neukirchen [Fri, 9 Feb 2018 21:20:56 +0000 (22:20 +0100)]
Patches to support musl libc

UTIME_NOW is defined in <sys/stat.h> on glibc and musl.
Else, we just need a few headers to get glibc's <sys/cdefs.h> crud.

6 years agoformat: the error_action readonly is spelled remount_ro
Leah Neukirchen [Fri, 9 Feb 2018 19:51:23 +0000 (20:51 +0100)]
format: the error_action readonly is spelled remount_ro

6 years agolist: fix usage header
Leah Neukirchen [Fri, 9 Feb 2018 18:25:46 +0000 (19:25 +0100)]
list: fix usage header

6 years agolist: document -f and -v
Leah Neukirchen [Fri, 9 Feb 2018 18:25:17 +0000 (19:25 +0100)]
list: document -f and -v

6 years agomigrate: migrate_superblock -> migrate-superblock in usage
Leah Neukirchen [Fri, 9 Feb 2018 18:22:52 +0000 (19:22 +0100)]
migrate: migrate_superblock -> migrate-superblock in usage

6 years agoformat: document -U (used by many mkfs.*)
Leah Neukirchen [Fri, 9 Feb 2018 18:21:47 +0000 (19:21 +0100)]
format: document -U (used by many mkfs.*)

6 years agodump: document -f
Leah Neukirchen [Fri, 9 Feb 2018 18:18:58 +0000 (19:18 +0100)]
dump: document -f

6 years agodevice add: support --help
Leah Neukirchen [Fri, 9 Feb 2018 18:17:18 +0000 (19:17 +0100)]
device add: support --help

6 years agobcachefs.8: completely rewrite manpage with mdoc, adapting to current usages
Leah Neukirchen [Fri, 9 Feb 2018 18:14:24 +0000 (19:14 +0100)]
bcachefs.8: completely rewrite manpage with mdoc, adapting to current usages

6 years agomkfs.bcachefs: convert to POSIX sh
Leah Neukirchen [Fri, 9 Feb 2018 15:54:03 +0000 (16:54 +0100)]
mkfs.bcachefs: convert to POSIX sh

6 years agofsck.bcachefs: convert to POSIX sh
Leah Neukirchen [Fri, 9 Feb 2018 15:52:44 +0000 (16:52 +0100)]
fsck.bcachefs: convert to POSIX sh

6 years agoMakefile: default PREFIX to /usr/local
Leah Neukirchen [Fri, 9 Feb 2018 15:33:26 +0000 (16:33 +0100)]
Makefile: default PREFIX to /usr/local

6 years agoMerge pull request #1 from Pneumaticat/patch-1
koverstreet [Thu, 8 Feb 2018 21:53:26 +0000 (16:53 -0500)]
Merge pull request #1 from Pneumaticat/patch-1

typo: "migrate_superblock" -> "migrate-superblock"

6 years agotypo: "migrate_superblock" -> "migrate-superblock"
Kevin Liu [Thu, 8 Feb 2018 21:26:25 +0000 (16:26 -0500)]
typo: "migrate_superblock" -> "migrate-superblock"

6 years agoNew data rereplicate command
Kent Overstreet [Thu, 8 Feb 2018 20:30:19 +0000 (15:30 -0500)]
New data rereplicate command

6 years agoUpdate bcachefs sources to d5e561b3cc bcachefs: BCH_DATA ioctl
Kent Overstreet [Wed, 7 Feb 2018 13:08:24 +0000 (08:08 -0500)]
Update bcachefs sources to d5e561b3cc bcachefs: BCH_DATA ioctl

6 years agocmd_migrate fixes
Kent Overstreet [Wed, 7 Feb 2018 11:18:01 +0000 (06:18 -0500)]
cmd_migrate fixes

when linking existing data, we weren't creating alloc btree keys - also,
we were calculating the wrong bucket...

6 years agoUpdate bcachefs sources to 496cbe9474 bcachefs: export bch2_alloc_write()
Kent Overstreet [Wed, 7 Feb 2018 11:16:50 +0000 (06:16 -0500)]
Update bcachefs sources to 496cbe9474 bcachefs: export bch2_alloc_write()

6 years agoUpdate bcachefs sources to 0e765bc37c bcachefs: foreground merging of interior btree...
Kent Overstreet [Mon, 5 Feb 2018 05:26:03 +0000 (00:26 -0500)]
Update bcachefs sources to 0e765bc37c bcachefs: foreground merging of interior btree nodes

6 years agouse futex instead of pthread cond variable for schedule
Kent Overstreet [Mon, 5 Feb 2018 05:13:40 +0000 (00:13 -0500)]
use futex instead of pthread cond variable for schedule

6 years agoUpdate bcachefs sources to 2834633e12 bcachefs: fix ioctls that set inode flags
Kent Overstreet [Sun, 21 Jan 2018 19:49:33 +0000 (14:49 -0500)]
Update bcachefs sources to 2834633e12 bcachefs: fix ioctls that set inode flags

6 years agoUpdate bcachefs sources to ae6e8a59d3 bcachefs: quota limit enforcement
Kent Overstreet [Sun, 21 Jan 2018 17:16:32 +0000 (12:16 -0500)]
Update bcachefs sources to ae6e8a59d3 bcachefs: quota limit enforcement

6 years agoUpdate bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily
Kent Overstreet [Thu, 11 Jan 2018 11:41:59 +0000 (06:41 -0500)]
Update bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily

6 years agofix cmd_evacuate
Kent Overstreet [Sat, 30 Dec 2017 08:36:12 +0000 (03:36 -0500)]
fix cmd_evacuate

6 years agoshow-super can now print more stuff
Kent Overstreet [Sat, 30 Dec 2017 02:14:51 +0000 (21:14 -0500)]
show-super can now print more stuff

6 years agoUpdate bcachefs sources to 0b8c5d0fb7 bcachefs: refactor superblock validation
Kent Overstreet [Sat, 30 Dec 2017 00:14:53 +0000 (19:14 -0500)]
Update bcachefs sources to 0b8c5d0fb7 bcachefs: refactor superblock validation

6 years agoResizing
Kent Overstreet [Thu, 28 Dec 2017 06:01:16 +0000 (01:01 -0500)]
Resizing

6 years agoupdate for bcachefs changes
Kent Overstreet [Thu, 28 Dec 2017 01:35:45 +0000 (20:35 -0500)]
update for bcachefs changes

6 years agoUpdate bcachefs sources to f4b290345a bcachefs: device resize
Kent Overstreet [Thu, 28 Dec 2017 01:32:40 +0000 (20:32 -0500)]
Update bcachefs sources to f4b290345a bcachefs: device resize

6 years agoAdd bcachefs fs usage
Kent Overstreet [Sat, 23 Dec 2017 05:50:55 +0000 (00:50 -0500)]
Add bcachefs fs usage

6 years agoUpdate bcachefs sources to 2afdc642c2 bcachefs: kill bucket_data_type, improve disk...
Kent Overstreet [Sat, 23 Dec 2017 01:37:52 +0000 (20:37 -0500)]
Update bcachefs sources to 2afdc642c2 bcachefs: kill bucket_data_type, improve disk usage stats

6 years agoUpdate bcachefs sources to b2f5acc670 bcachefs: fix assertion in journal read
Kent Overstreet [Thu, 21 Dec 2017 23:57:37 +0000 (18:57 -0500)]
Update bcachefs sources to b2f5acc670 bcachefs: fix assertion in journal read

6 years agoUpdate bcachefs sources to 14ce2a2031 bcachefs: fixes for building in userspace
Kent Overstreet [Thu, 21 Dec 2017 23:00:30 +0000 (18:00 -0500)]
Update bcachefs sources to 14ce2a2031 bcachefs: fixes for building in userspace

6 years agomake: correct path to 'bcachefs' in mkfs/fsck scripts
Austin Seipp [Fri, 15 Dec 2017 23:39:12 +0000 (17:39 -0600)]
make: correct path to 'bcachefs' in mkfs/fsck scripts

The fsck and bcachefs scripts simply worked by running 'exec bcachefs
...', but this executes whatever is out of `$PATH`, which is likely not
what a user expected when working inside the bcachefs-tools tree.

This replaces the local uses of 'exec bcachefs' to use bash's
readlink/dirname builtins in order to find the location of the currently
executing wrapper, and execute the 'bcachefs' tool from there.

This allows executing these wrappers from anywhere, provided 'bcachefs'
is just right next to them, with the correct semantics.

As a result, this also allows removing a tiny hack from the Nix
expressions, allowing the included default.nix to use completely
standard mkDerivation builders, with no extra patch/fixup phases.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agofix default checksum types
Kent Overstreet [Fri, 15 Dec 2017 17:57:40 +0000 (12:57 -0500)]
fix default checksum types

6 years agoUpdate bcachefs sources to e57b5958cf bcachefs: fix for building in userspace
Kent Overstreet [Wed, 13 Dec 2017 21:01:18 +0000 (16:01 -0500)]
Update bcachefs sources to e57b5958cf bcachefs: fix for building in userspace

6 years agoShim layer updates
Kent Overstreet [Wed, 13 Dec 2017 21:00:44 +0000 (16:00 -0500)]
Shim layer updates

6 years agonix: add nix expressions for development
Austin Seipp [Sun, 26 Nov 2017 06:20:14 +0000 (00:20 -0600)]
nix: add nix expressions for development

This adds Nix expressions for bcachefs-tools that are modular, work in
purely sandboxed build environments (e.g. on NixOS itself, or macOS, where
sandboxing is enabled by default), use a fixed copy of Nixpkgs (to avoid hidden,
global state) and uses standard build idioms.

This change uses a fixed version of Nixpkgs, one that will always be used for
every build of bcachefs-tools, for all users, rather than relying on whatever
copy of Nixpkgs the user has available.

This has a major benefit in that it allows the build to work in sandboxed
environments such as NixOS, and it correctly declares all of the necessary
dependencies that bcachefs-tools needs. This is done simply by using
stdenv.mkDerivation in order to write a "normal" Nix expression, where the
previous version used a variant of the stdenv builder, but this isn't needed for
the most part. (Doing this has other knock-on benefits, such as the usage of
standardized options like `enableParallelBuild = true;` -- allowing `nix-build`
to automatically do parallel builds, etc.)

Another major benefit of this change is that anyone can now use `nix-shell` to
develop/hack on bcachefs-tools incrementally; simply running nix-shell will put
you in a Bash shell environment where all of bcachefs-tools' dependencies are
proprerly provided, no matter the state of the outside build environment/host
operating system:

    $ nix-shell

    [nix-shell:~/src/bcachefs-tools]$ make -j4 # works immediately

As mentioned before, with this change, by default, nix-build and
nix-shell run using a prepackaged copy of an upstream Nixpkgs snapshot. This is
done purely to ensure anyone who builds bcachefs-tools using Nix does, in fact,
get a reproducible build. Without this, nix-build defaults to using the the
`<nixpkgs>` NIX_PATH entry in order to fetch dependencies; meaning that two
users on different channels will get different results (for example, if you have
the November 2017 channel but I have the October 2017 channel, the results may
be different).

With this patch, a user running

    $ nix-build

will always use the exact same copy of nixpkgs to bootstrap the build,
regardless of whatever channels the user has. This bootstrap mechanism does not
even depend on an existing copy of Nixpkgs itself; e.g. it can work with a
completely empty `NIX_PATH`.

This is arguably anti-modular, but for end-user applications like
bcachefs-tools, fixing the version of Nixpkgs is not normally a huge deal. Users
who wish to use a different copy of Nixpkgs can provide this with an argument to
nix-build directly, using the `nixpkgs` argument to the expression:

    $ nix-build --pure --arg nixpkgs 'import <nixpkgs> {}'

This uses the `<nixpkgs>` provided inside your `NIX_PATH` environment variable
to acquire dependencies, which by default is managed using `nix-channel`. If you
have a copy of the Nixpkgs source code e.g. from a `git clone`, you may use that
too by simply using `-I` to prepend your Nixpkgs to `NIX_PATH` (see `man
nix-build` for more):

    $ nix-build --pure \
        -I nixpkgs=$HOME/src/nixpkgs \
        --arg nixpkgs 'import <nixpkgs> {}'

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agobuild: require explicit include paths for libbcachefs/
Austin Seipp [Mon, 27 Nov 2017 01:29:00 +0000 (19:29 -0600)]
build: require explicit include paths for libbcachefs/

This removes the implicit `-I libbcachefs` argument to $(CC), which in turn
requires a set of minor changes throughout the tools. There are two advantages
to this setup:

    1) It is (arguably) easier to read, since the location of bcachefs includes
    are easier to understand at a glance ("where does util.h live?")

    2) It removes the need for a hack to include glibc's copy of
    dirent.h explicitly via '/usr/include/dirent.h', because libbcachefs/
    *also* has a dirent.h file and the compiler cannot disambiguate them.
    This has some ramifications on systems where /usr/include may not
    exist, such as NixOS.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agobuild: use 'find', not 'git', to locate C source code
Austin Seipp [Sun, 26 Nov 2017 06:55:12 +0000 (00:55 -0600)]
build: use 'find', not 'git', to locate C source code

We will not always have .git available in some cases. For example, if someone
simply downloaded a tarball of the tree, or if we're building with something
like Nix and want to exclude the .git folder, we need to cope and build the
source anyway.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agobcachefs: make usage output more consistent
Austin Seipp [Sun, 26 Nov 2017 07:07:34 +0000 (01:07 -0600)]
bcachefs: make usage output more consistent

Minor newline and spacing/alignment touchups make it all just a little easier to
read.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoadd --replicas
Kent Overstreet [Sat, 2 Dec 2017 11:04:16 +0000 (06:04 -0500)]
add --replicas