]> git.sesse.net Git - bcachefs-tools-debian/log
bcachefs-tools-debian
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

6 years agoUpdate bcachefs sources to 9e7ae5219c bcachefs: Make write points more dynamic
Kent Overstreet [Wed, 22 Nov 2017 05:42:55 +0000 (00:42 -0500)]
Update bcachefs sources to 9e7ae5219c bcachefs: Make write points more dynamic

6 years agoUpdate bcachefs sources to 661faf58db bcachefs: fix a deadlock in journal replay...
Kent Overstreet [Sun, 12 Nov 2017 23:23:29 +0000 (18:23 -0500)]
Update bcachefs sources to 661faf58db bcachefs: fix a deadlock in journal replay error path

6 years agoSimple stupid memory reclaim code
Kent Overstreet [Sun, 12 Nov 2017 21:48:07 +0000 (16:48 -0500)]
Simple stupid memory reclaim code

6 years agoUpdate bcachefs sources to 6a361fb68c bcachefs: Rework btree read error handling
Kent Overstreet [Sat, 11 Nov 2017 07:18:52 +0000 (22:18 -0900)]
Update bcachefs sources to 6a361fb68c bcachefs: Rework btree read error handling

6 years agoUpdate bcachefs sources to 58b77cfec6 bcachefs: improve btree_ptr_debugcheck()
Kent Overstreet [Fri, 10 Nov 2017 21:58:58 +0000 (12:58 -0900)]
Update bcachefs sources to 58b77cfec6 bcachefs: improve btree_ptr_debugcheck()

6 years agoUpdate bcachefs sources to 2679158d6e bcachefs: fix allocation + replication
Kent Overstreet [Thu, 9 Nov 2017 06:12:38 +0000 (21:12 -0900)]
Update bcachefs sources to 2679158d6e bcachefs: fix allocation + replication

6 years agoAdd commands for changing and removing passphrase
Kent Overstreet [Thu, 9 Nov 2017 01:03:59 +0000 (16:03 -0900)]
Add commands for changing and removing passphrase

6 years agoupdate for new option code
Kent Overstreet [Thu, 9 Nov 2017 00:54:01 +0000 (15:54 -0900)]
update for new option code

6 years agoUpdate bcachefs sources to d4b7ef921a bcachefs: Refactoring
Kent Overstreet [Sat, 4 Nov 2017 22:32:07 +0000 (18:32 -0400)]
Update bcachefs sources to d4b7ef921a bcachefs: Refactoring

6 years agoUpdate for new superblock options; makefile improvements
Kent Overstreet [Thu, 5 Oct 2017 21:42:19 +0000 (13:42 -0800)]
Update for new superblock options; makefile improvements

6 years agoUpdate bcachefs sources to e82e656279 bcachefs: Cleanups for building in userspace
Kent Overstreet [Thu, 5 Oct 2017 22:41:44 +0000 (14:41 -0800)]
Update bcachefs sources to e82e656279 bcachefs: Cleanups for building in userspace

6 years agoFaster crc32c
Kent Overstreet [Wed, 17 May 2017 05:16:31 +0000 (21:16 -0800)]
Faster crc32c

6 years agofix a build error on weird glibc
Kent Overstreet [Mon, 28 Aug 2017 18:49:35 +0000 (14:49 -0400)]
fix a build error on weird glibc

6 years agoWorkarounds for building with gcc 4
Kent Overstreet [Thu, 17 Aug 2017 21:11:06 +0000 (15:11 -0600)]
Workarounds for building with gcc 4

6 years agohandle REQ_OP_FLUSH
Kent Overstreet [Wed, 23 Aug 2017 22:30:13 +0000 (16:30 -0600)]
handle REQ_OP_FLUSH

6 years agourandom fallback
Kent Overstreet [Tue, 15 Aug 2017 23:19:06 +0000 (17:19 -0600)]
urandom fallback

6 years agofix incorrect errno usage
Kent Overstreet [Thu, 17 Aug 2017 21:50:50 +0000 (15:50 -0600)]
fix incorrect errno usage

7 years agoUpdate bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code
Kent Overstreet [Wed, 14 Jun 2017 01:06:05 +0000 (17:06 -0800)]
Update bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code

7 years agoFix io from rebase to 4.11
Kent Overstreet [Wed, 14 Jun 2017 01:41:22 +0000 (17:41 -0800)]
Fix io from rebase to 4.11

7 years agoUpdate for sysfs changes
Kent Overstreet [Tue, 13 Jun 2017 23:52:54 +0000 (15:52 -0800)]
Update for sysfs changes

7 years agoUpdate bcachefs sources to 14e9ac5016 bcachefs: btree_iter fastpath
Kent Overstreet [Sat, 13 May 2017 02:45:15 +0000 (18:45 -0800)]
Update bcachefs sources to 14e9ac5016 bcachefs: btree_iter fastpath

7 years agoUpdate bcachefs sources to 2d95696fbe bcachefs: fix rw -> ro -> rw transition
Kent Overstreet [Mon, 8 May 2017 17:33:47 +0000 (09:33 -0800)]
Update bcachefs sources to 2d95696fbe bcachefs: fix rw -> ro -> rw transition

7 years agoUpdate bcachefs sources to 9ceb982d77 bcachefs: Store bucket gens in a btree
Kent Overstreet [Mon, 8 May 2017 10:28:15 +0000 (02:28 -0800)]
Update bcachefs sources to 9ceb982d77 bcachefs: Store bucket gens in a btree

7 years agoUpdate bcachefs sources to 113b475ed2 bcachefs: Better error handling reading bucket...
Kent Overstreet [Mon, 8 May 2017 10:19:29 +0000 (02:19 -0800)]
Update bcachefs sources to 113b475ed2 bcachefs: Better error handling reading bucket prios/gens

7 years agoUpdate bcachefs sources to 3610542890 bcachefs: Convert to skcipher interface for...
Kent Overstreet [Fri, 5 May 2017 09:49:48 +0000 (01:49 -0800)]
Update bcachefs sources to 3610542890 bcachefs: Convert to skcipher interface for chacha20

7 years agofix sync writes - don't use O_EXCL
Kent Overstreet [Fri, 5 May 2017 08:27:01 +0000 (00:27 -0800)]
fix sync writes - don't use O_EXCL

7 years agoUpdate bcachefs sources to fb365e1745
Kent Overstreet [Mon, 24 Apr 2017 17:48:35 +0000 (09:48 -0800)]
Update bcachefs sources to fb365e1745

7 years agoUse aio
Kent Overstreet [Mon, 24 Apr 2017 05:55:50 +0000 (21:55 -0800)]
Use aio

7 years agoUpdate bcachefs sources to 2e70771b8d
Kent Overstreet [Mon, 24 Apr 2017 05:56:57 +0000 (21:56 -0800)]
Update bcachefs sources to 2e70771b8d

7 years agoUpdate bcachefs sources to 846600a41b
Kent Overstreet [Sat, 15 Apr 2017 10:42:29 +0000 (02:42 -0800)]
Update bcachefs sources to 846600a41b

7 years agocmd_list improvements; use %m
Kent Overstreet [Sat, 15 Apr 2017 04:40:50 +0000 (20:40 -0800)]
cmd_list improvements; use %m

7 years agoUpdate bcachefs sources to f026e4e024
Kent Overstreet [Sat, 15 Apr 2017 04:38:49 +0000 (20:38 -0800)]
Update bcachefs sources to f026e4e024

7 years agoUpdate bcachefs sources to 3b4024f944
Kent Overstreet [Tue, 11 Apr 2017 05:19:15 +0000 (21:19 -0800)]
Update bcachefs sources to 3b4024f944

7 years agosilence a compiler warning
Kent Overstreet [Mon, 10 Apr 2017 08:33:58 +0000 (00:33 -0800)]
silence a compiler warning

7 years agoUpdate bcachefs sources to da037866e6
Kent Overstreet [Mon, 10 Apr 2017 04:11:10 +0000 (20:11 -0800)]
Update bcachefs sources to da037866e6

7 years agoAllow disk commands to specify member by index
Kent Overstreet [Thu, 6 Apr 2017 01:31:05 +0000 (17:31 -0800)]
Allow disk commands to specify member by index

7 years agoadd -i to cmd_list
Kent Overstreet [Thu, 6 Apr 2017 01:29:02 +0000 (17:29 -0800)]
add -i to cmd_list

7 years agoFix some clang warnings
Kent Overstreet [Tue, 4 Apr 2017 08:28:13 +0000 (00:28 -0800)]
Fix some clang warnings

the issue in cmd_debug - passing members of struct bpos to kstrtoull,
which aren't aligned - was a legit bug

7 years agoUpdate bcachefs sources to ff95156479
Kent Overstreet [Tue, 4 Apr 2017 07:05:13 +0000 (23:05 -0800)]
Update bcachefs sources to ff95156479

7 years agocmd_dump: fix crash when a device is offline
Kent Overstreet [Tue, 4 Apr 2017 03:45:20 +0000 (19:45 -0800)]
cmd_dump: fix crash when a device is offline

7 years agoMore cmd_migrate improvements
Kent Overstreet [Mon, 3 Apr 2017 03:43:35 +0000 (19:43 -0800)]
More cmd_migrate improvements

Factor out bch2_pick_bucket_size() from the format code, and pick the
bucket size before picking the superblock location - that way we can
ensure the superblock gets its own bucket and doesn't trigger warnings
due to the allocation code noticing different types of data in the same
bucket.

7 years agoUpdate bcachefs sources
Kent Overstreet [Fri, 31 Mar 2017 13:12:36 +0000 (05:12 -0800)]
Update bcachefs sources

7 years agoUpdate bcachefs sources
Kent Overstreet [Fri, 31 Mar 2017 13:12:36 +0000 (05:12 -0800)]
Update bcachefs sources

7 years agobcachefs-in-userspace improvements
Kent Overstreet [Mon, 20 Mar 2017 05:39:19 +0000 (21:39 -0800)]
bcachefs-in-userspace improvements

Got rid of the stupid shim file hack

7 years agocmd_migrate fix
Kent Overstreet [Mon, 20 Mar 2017 01:51:23 +0000 (17:51 -0800)]
cmd_migrate fix

missing check_mark_super call - would trigger an assertion if
link_data() was called before we wrote any data

7 years agomake linux shim timer code less fragile
Kent Overstreet [Mon, 20 Mar 2017 01:21:49 +0000 (17:21 -0800)]
make linux shim timer code less fragile

7 years agoRename from bcache-tools to bcachefs-tools
Kent Overstreet [Sun, 19 Mar 2017 23:56:34 +0000 (15:56 -0800)]
Rename from bcache-tools to bcachefs-tools

7 years agoupdate bcache sources
Kent Overstreet [Thu, 16 Mar 2017 22:51:41 +0000 (14:51 -0800)]
update bcache sources

7 years agofix percpu_ref_reinit()
Kent Overstreet [Thu, 16 Mar 2017 22:23:40 +0000 (14:23 -0800)]
fix percpu_ref_reinit()

7 years agoAdd --quiet to cmd_format
Kent Overstreet [Tue, 14 Mar 2017 19:41:29 +0000 (11:41 -0800)]
Add --quiet to cmd_format

7 years agoRefactoring for device specific commands
Kent Overstreet [Sun, 12 Mar 2017 14:53:43 +0000 (06:53 -0800)]
Refactoring for device specific commands

7 years agoupdate bcache sources
Kent Overstreet [Fri, 10 Mar 2017 21:40:01 +0000 (12:40 -0900)]
update bcache sources

7 years agocmd_migrate: fix xattrs
Kent Overstreet [Fri, 10 Mar 2017 20:48:39 +0000 (11:48 -0900)]
cmd_migrate: fix xattrs

7 years agoadd a force flag to cmd_migrate
Kent Overstreet [Fri, 10 Mar 2017 01:12:51 +0000 (16:12 -0900)]
add a force flag to cmd_migrate

7 years agocmd_device_add improvements
Kent Overstreet [Thu, 9 Mar 2017 18:13:45 +0000 (09:13 -0900)]
cmd_device_add improvements

7 years agocmd_device_fail
Kent Overstreet [Thu, 9 Mar 2017 17:27:30 +0000 (08:27 -0900)]
cmd_device_fail

Add a comamnd for setting a device as failed, update bcache sources

7 years agocmd_migrate
Kent Overstreet [Wed, 1 Mar 2017 10:45:15 +0000 (01:45 -0900)]
cmd_migrate

7 years agoDelete more unused shim code, update bcache code
Kent Overstreet [Sat, 4 Mar 2017 06:09:52 +0000 (21:09 -0900)]
Delete more unused shim code, update bcache code

7 years agoNew on disk format - encryption
Kent Overstreet [Tue, 4 Oct 2016 03:22:17 +0000 (19:22 -0800)]
New on disk format - encryption

7 years agofewer workqueues
Kent Overstreet [Wed, 8 Feb 2017 00:41:52 +0000 (15:41 -0900)]
fewer workqueues

7 years agoAdd a command to dump filesystem metadata
Kent Overstreet [Fri, 3 Feb 2017 06:45:08 +0000 (21:45 -0900)]
Add a command to dump filesystem metadata

7 years agoupdate bcache code, fsck improvements
Kent Overstreet [Thu, 2 Feb 2017 03:16:42 +0000 (18:16 -0900)]
update bcache code, fsck improvements

7 years agolinux shim: return an error on failure to open
Kent Overstreet [Thu, 2 Feb 2017 23:41:21 +0000 (14:41 -0900)]
linux shim: return an error on failure to open

7 years agoFix initialization order bug
Kent Overstreet [Thu, 2 Feb 2017 21:57:48 +0000 (12:57 -0900)]
Fix initialization order bug

7 years agobcache in userspace; userspace fsck
Kent Overstreet [Sun, 8 Jan 2017 09:13:18 +0000 (00:13 -0900)]
bcache in userspace; userspace fsck

7 years agoadd support for maximum journal entry size
Kent Overstreet [Sun, 11 Dec 2016 23:45:48 +0000 (14:45 -0900)]
add support for maximum journal entry size

also rip out prototype crypto support code - real code is in the dev
branch, with the new superblock format

7 years agoadd dependency generation to make file
Kent Overstreet [Wed, 12 Oct 2016 01:50:54 +0000 (17:50 -0800)]
add dependency generation to make file

7 years agoprint filesystem size in bcache_super_print()
Kent Overstreet [Wed, 12 Oct 2016 01:44:03 +0000 (17:44 -0800)]
print filesystem size in bcache_super_print()

7 years agofinish ripping out libnih
Kent Overstreet [Thu, 6 Oct 2016 15:19:55 +0000 (07:19 -0800)]
finish ripping out libnih

7 years agobcache device_show now dumps superblocks
Kent Overstreet [Tue, 4 Oct 2016 09:10:24 +0000 (01:10 -0800)]
bcache device_show now dumps superblocks

7 years agobucket size must be a power of two
Kent Overstreet [Tue, 6 Sep 2016 02:20:21 +0000 (18:20 -0800)]
bucket size must be a power of two

7 years agoclang doesn't like nested functions
Kent Overstreet [Wed, 31 Aug 2016 00:31:34 +0000 (16:31 -0800)]
clang doesn't like nested functions

7 years agoDocumentation/makefile work
Kent Overstreet [Mon, 29 Aug 2016 02:00:50 +0000 (18:00 -0800)]
Documentation/makefile work

7 years agominimum number of buckets now 1024
Kent Overstreet [Fri, 26 Aug 2016 04:55:43 +0000 (20:55 -0800)]
minimum number of buckets now 1024

7 years agoRework option handling
Kent Overstreet [Wed, 24 Aug 2016 03:50:31 +0000 (19:50 -0800)]
Rework option handling

7 years agomaster key nonce
Kent Overstreet [Mon, 22 Aug 2016 06:16:27 +0000 (22:16 -0800)]
master key nonce

7 years agoEncryption support
Kent Overstreet [Wed, 17 Aug 2016 21:23:03 +0000 (13:23 -0800)]
Encryption support

8 years agodebify
Kent Overstreet [Tue, 26 Apr 2016 01:13:15 +0000 (17:13 -0800)]
debify

8 years agoendianness
Kent Overstreet [Fri, 15 Jan 2016 15:34:30 +0000 (06:34 -0900)]
endianness

8 years agobin, not sbin
Kent Overstreet [Fri, 15 Jan 2016 15:48:49 +0000 (06:48 -0900)]
bin, not sbin

8 years agoOn disk format updates
Kent Overstreet [Thu, 14 Jan 2016 07:18:22 +0000 (22:18 -0900)]
On disk format updates

8 years agoRedo lots of stuff
Kent Overstreet [Sat, 12 Mar 2016 06:18:42 +0000 (21:18 -0900)]
Redo lots of stuff

8 years agoDon't install udev hook - it's confusing with bcachefs
Kent Overstreet [Fri, 28 Aug 2015 17:04:02 +0000 (09:04 -0800)]
Don't install udev hook - it's confusing with bcachefs

8 years agoFix help for --compression-type
Kent Overstreet [Fri, 28 Aug 2015 10:06:01 +0000 (02:06 -0800)]
Fix help for --compression-type

8 years agoFix build error with libblkid usage
Mike Krinkin [Sun, 23 Aug 2015 18:38:56 +0000 (21:38 +0300)]
Fix build error with libblkid usage

9 years agoAdd support for setting data checksum type, compression type
Kent Overstreet [Fri, 19 Jun 2015 07:57:03 +0000 (00:57 -0700)]
Add support for setting data checksum type, compression type

9 years agoadd an option for writing old superblocks
Kent Overstreet [Mon, 11 May 2015 05:00:24 +0000 (22:00 -0700)]
add an option for writing old superblocks

9 years agorewrite
Kent Overstreet [Sat, 9 May 2015 01:13:38 +0000 (18:13 -0700)]
rewrite

9 years agoBetter default bucket size
Kent Overstreet [Mon, 30 Mar 2015 08:53:30 +0000 (01:53 -0700)]
Better default bucket size

9 years agoMajor refactoring, add new settings to bcacheadm format
Kent Overstreet [Sun, 29 Mar 2015 06:21:33 +0000 (23:21 -0700)]
Major refactoring, add new settings to bcacheadm format

9 years agoMinor cleanup
Kent Overstreet [Sun, 15 Mar 2015 22:49:05 +0000 (15:49 -0700)]
Minor cleanup

9 years agoRemove autotools stuff
Kent Overstreet [Sun, 15 Mar 2015 00:50:35 +0000 (17:50 -0700)]
Remove autotools stuff

9 years agobcache-tools: update for superblock changes
Slava Pestov [Fri, 13 Feb 2015 21:44:28 +0000 (13:44 -0800)]
bcache-tools: update for superblock changes

Change-Id: I660fef1366005377041cac5d75771d2fdc8c0824

9 years agobcacheadm: fix capacity command
Jacob Malevich [Wed, 11 Feb 2015 00:55:10 +0000 (16:55 -0800)]
bcacheadm: fix capacity command

regression from 5730e47b

Signed-off-by: Jacob Malevich <jam@daterainc.com>
    Issue DAT-1977

Change-Id: I598ca9e5623fde441bb842580c2494fd03316f00

9 years agobcacheadm: Handle missing arg in rm-dev
Jacob Malevich [Tue, 10 Feb 2015 22:39:56 +0000 (14:39 -0800)]
bcacheadm: Handle missing arg in rm-dev

Signed-off-by: Jacob Malevich <jam@daterainc.com>
    Issue DAT-1978

Change-Id: Iec1252f39bb1931ec4544b56b7db24c43253b8cd