Commit Graph

189 Commits

Author SHA1 Message Date
Kent Overstreet
34c9be19b3 Update bcachefs sources to e1f6739c4a bcachefs: Fix another iterator counting bug 2020-05-14 21:48:52 -04:00
Kent Overstreet
f55b90dec9 Don't build mount.bcachefs by default
So as not to depend on rust yet
2020-05-08 21:25:12 -04:00
Yuxuan Shui
57ada395b2 Add a mount.bcachefs tool
This tool currently has most of the fundmental features implemented.
It can mount a filesystem specified by uuid, it can ask password for an
encrypted filesystem.

There may be some work that needs to be done to make it behave more like
a "mount.*" tool.

Related: #1

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-05-05 21:33:40 +01:00
Kent Overstreet
9073be1298 Don't use pkgconfig for libkeyutils
Centos 7 has an old version that doesn't have the .pc file
2020-04-23 21:16:05 -04:00
Kent Overstreet
2bd18f4bae Use pkgconfig for libkeyutils 2020-03-25 16:01:38 -04:00
Justin Husted
3b8db3d7be bcachefs-tools: Add a smoke test master script.
This script builds and runs with various options to enable easy test
coverage.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-28 17:08:10 -08:00
Brendon Boldt
7beefecf44 Add Fedora, Ubuntu, Arch info to INSTALL
Add fuse3 (>=3.7) version to Makefile
2019-12-06 11:19:42 -05:00
Kent Overstreet
f712a866a4 Put valgrind support behind CONFIG_VALGRIND 2019-12-04 17:49:34 -05:00
Justin Husted
a00998c4cd Make fuse3 support optional and document.
The experimental fuse3 support is not complete yet, and fuse3 is new and
still difficult to install on some platforms.

Make it optional at compile time, and default to off.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-11 12:18:22 -08:00
Justin Husted
4ed889295c Add makefile support for tags.
Also, update .gitignore for various things.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-04 21:23:46 -08:00
Justin Husted
61bc316a4d Initial version of bcachefs tests.
So far, these tests just test basic format, fsck, and list functions
under valgrind, as well as a few self-validation tests.

Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-11-03 23:17:43 -05:00
Kent Overstreet
bc45c28470 fuse 2019-10-18 16:23:39 -04:00
Kent Overstreet
8b02f791c3 Build with -fno-delete-null-pointer-checks
Some of the code we use from the Linux kernel won't build correctly
without this...
2019-08-27 13:33:57 -04:00
Danilo Spinella
54badc02f7 Add PKG_CONFIG variable and replace pkg-config
Respect pkg-config value from environment.
2019-03-10 10:26:42 +00:00
Danilo Spinella
70e29e35f2 Fix PREFIX variable assignement 2019-03-10 10:26:42 +00:00
Tim Schlueter
b821144deb Abort compilation early if pkg-config fails 2019-01-14 00:42:42 -08:00
Tim Schlueter
bdeffdf3c7 Replaced mkdir -p with install -D in make install
Also added a comment about the bcachefs utility to the initramfs hook
2019-01-13 19:31:04 -08:00
Tim Schlueter
079e6ab647 Only run pkg-config once in Makefile, added EXTRA linker vars
* Only run the pkg-config --cflags command once (instead of every .c file)
* Added EXTRA_LDFLAGS and EXTRA_LDLIBS vars
* Removed tabs in the middle of commands to make it easier to manually re-run
  commands manually (e.g. if a compilation fails)
* Replaced `cd dir; git command` in favor of $(shell git -C dir command)
* Minor version format change: dirty trees just append "+" instead of "-dirty"
  and if git describe fails, it now sets the version to "v0.1-nogit"

Also, don't ignore .gitignore files.
2019-01-13 19:31:04 -08:00
Kent Overstreet
c416528eaa snapraid 2018-11-23 02:10:44 -05:00
Tim Schlueter
8418a9f367 Don't add commit id to version when building from a tag 2018-05-27 12:39:05 -07:00
Tim Schlueter
a5d94ce0a8 Added 'version' command to print when the bcachefs tool was built 2018-05-26 14:32:30 -07:00
Kent Overstreet
84e8950cc7 Switch to liblz4 2018-05-17 02:45:49 -04:00
Kent Overstreet
807abf36c1 Update bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring 2018-02-16 18:13:24 -05:00
Tim Schlueter
3c85d9f009 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.
2018-02-11 15:32:34 -08:00
Kent Overstreet
813862a47c add -c to cmd_unlock, to check if a device needs to be unlocked 2018-02-11 14:25:33 -05:00
Leah Neukirchen
6c9e9b675c Makefile: default PREFIX to /usr/local 2018-02-09 16:33:26 +01:00
Austin Seipp
997bb216aa 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>
2017-12-10 16:06:01 -06:00
Austin Seipp
04035f0c7e 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>
2017-12-10 16:03:32 -06:00
Kent Overstreet
3347339bbd Simple stupid memory reclaim code 2017-11-12 16:48:07 -05:00
Kent Overstreet
8351bbc05b Update bcachefs sources to d4b7ef921a bcachefs: Refactoring 2017-11-08 16:01:26 -09:00
Kent Overstreet
bf8c59996b Update for new superblock options; makefile improvements 2017-10-08 10:25:36 -08:00
Kent Overstreet
e7c2bb91bc Faster crc32c 2017-10-08 10:20:36 -08:00
Kent Overstreet
e0c54d52f5 Workarounds for building with gcc 4 2017-08-23 16:30:25 -06:00
Kent Overstreet
38f22164a9 Update bcachefs sources to 6a25f7a00d bcachefs: fix ioctl code 2017-06-13 17:41:59 -08:00
Kent Overstreet
e57a624feb Update bcachefs sources to 113b475ed2 bcachefs: Better error handling reading bucket prios/gens 2017-05-08 02:26:04 -08:00
Kent Overstreet
f9395eeca5 Update bcachefs sources to 3610542890 bcachefs: Convert to skcipher interface for chacha20 2017-05-05 04:28:45 -08:00
Kent Overstreet
e41920e603 Use aio 2017-04-23 22:05:31 -08:00
Kent Overstreet
819f2dde79 Update bcachefs sources to f026e4e024 2017-04-14 20:40:31 -08:00
Kent Overstreet
978c160405 Fix some clang warnings
the issue in cmd_debug - passing members of struct bpos to kstrtoull,
which aren't aligned - was a legit bug
2017-04-04 06:43:08 -08:00
Kent Overstreet
64c325ef48 Update bcachefs sources to ff95156479 2017-04-04 06:43:08 -08:00
Kent Overstreet
c0ad33c126 bcachefs-in-userspace improvements
Got rid of the stupid shim file hack
2017-03-19 21:39:19 -08:00
Kent Overstreet
5ec39af8ea Rename from bcache-tools to bcachefs-tools 2017-03-19 17:31:47 -08:00
Kent Overstreet
a17f7bcec7 cmd_migrate 2017-03-09 09:14:11 -09:00
Kent Overstreet
171ee48e57 Delete more unused shim code, update bcache code 2017-03-03 23:17:31 -09:00
Kent Overstreet
a5b5eba7f7 New on disk format - encryption 2017-02-28 03:05:38 -09:00
Kent Overstreet
d230eaea61 Add a command to dump filesystem metadata 2017-02-06 23:43:16 -09:00
Kent Overstreet
5933f9478c update bcache code, fsck improvements 2017-02-06 20:45:37 -09:00
Kent Overstreet
b33fc8298f bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
Kent Overstreet
7f4191a202 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
2016-12-11 14:58:27 -09:00
Kent Overstreet
4e158e1553 add dependency generation to make file 2016-10-11 17:50:54 -08:00
Kent Overstreet
f4eba6559b finish ripping out libnih 2016-10-06 07:19:55 -08:00
Kent Overstreet
f3a8d54837 bcache device_show now dumps superblocks 2016-10-06 06:52:54 -08:00
Kent Overstreet
bca2b16e55 Documentation/makefile work 2016-08-28 18:00:54 -08:00
Kent Overstreet
cdd61de630 Rework option handling 2016-08-25 17:39:01 -08:00
Kent Overstreet
b0f08fc1e3 Encryption support 2016-08-17 13:23:03 -08:00
Kent Overstreet
dda0923eeb debify 2016-04-25 17:14:11 -08:00
Kent Overstreet
284c963646 bin, not sbin 2016-03-11 21:18:57 -09:00
Kent Overstreet
009d6db7b0 Redo lots of stuff 2016-03-11 21:18:42 -09:00
Kent Overstreet
074caf716a Don't install udev hook - it's confusing with bcachefs 2015-08-28 09:04:02 -08:00
Kent Overstreet
fb22ceda3e rewrite 2015-05-10 21:36:46 -07:00
Kent Overstreet
e13d21ade7 Major refactoring, add new settings to bcacheadm format 2015-03-28 23:21:33 -07:00
Kent Overstreet
fedea00623 Minor cleanup 2015-03-15 15:50:07 -07:00
Kent Overstreet
5730e47b6f Cleanup, rip out more code, fix compiler warnings
Change-Id: I76b410dc700a917d2717b1ceda0df061a1599144
2015-01-27 13:45:02 -08:00
Kent Overstreet
7916b2eb3b bcacheadm fixes
Change-Id: I3f6024d54aee263ef843705a0e9a02869e2a53e9
2014-12-05 19:20:03 -08:00
Kent Overstreet
02c47b0373 Superblock version 6
Change-Id: Iba976c8c5a4a91dcac06145471fc70baa6a6393e
2014-08-29 21:48:17 +00:00
Surbhi Palande
73ef76c1c0 Add bcachectl: to start bcache, add and remove devices.
Useful for lifecycle management of bcache devices.

Change-Id: Icdcb559786ab0557dbe7f2a30b5dbeacf7dad665
Signed-off-by: Surbhi Palande <sap@daterainc.com>
2014-08-05 11:28:47 -07:00
Rolf Fokkens
4ff504e17b Add an INSTALL macro to the Makefile 2013-10-07 12:57:45 +02:00
Rolf Fokkens
6494253698 Add DRACUTLIBDIR to Makefile 2013-10-07 12:57:38 +02:00
Rolf Fokkens
7703224daa Add a dracut module for bcache 2013-10-07 12:57:31 +02:00
Gabriel
86ba62c6a1 Move probe-bcache to UDEVLIBDIR 2013-10-06 17:35:59 +02:00
Gabriel
0c7a484a5b udev: Fit into the standard rule sequence
Move the rule to run a bit later, after
the standard udev rules have called blkid.

Don't run blkid manually, and run probe-bcache
as a fallback which can be patched out in a
package that depends on util-linux 2.24+.

probe-bcache: bail if libblkid finds anything
Preserve our last-resort safety check here
in case earlier rules fail to call blkid.
2013-10-05 22:16:22 +02:00
Gabriel
866e21a35d super-show: Print label 2013-10-03 13:48:50 +02:00
Gabriel
8b3e39e052 Install the initramfs hook in /usr/share not /etc 2013-09-22 12:34:51 +02:00
Gabriel
b15fb776c9 make-bcache: Prevent stray superblocks
Fail if the device has any leftover superblock or partition table label.

Add a --wipe-bcache flag to overwrite bcache superblocks and recommend
wipefs for non-bcache superblocks.

Once the device is safe to write, always zero immediately before the
bcache superblock.

Make sure errors go to stderr.  Use pkg-config.
2013-09-01 12:38:11 +02:00
Gabriel
944cb4ce32 Register devices with just udev.
This means bcache devices will be registered earlier and in all
cases, not just when the rootfs fails to mount.

The initramfs hook is still there to ensure the bcache module
and udev rules are shipped if an initramfs is used.
2013-04-11 17:08:23 -07:00
Gabriel
865a3b1f0b Add a command to display a bcache superblock. 2013-03-09 14:33:08 +01:00
Kent Overstreet
42c182c6ab Don't error out if the distro isn't using initramfs 2013-01-22 13:26:53 -08:00
Kent Overstreet
739b971d77 Fix the initramfs script 2012-07-13 00:52:52 -07:00
Kent Overstreet
a3d0e5bafb Update initramfs probe script 2012-04-11 15:33:40 -07:00
Dmitry Smirnov
f4c09286dd bcache-tools: probe-bcache.8 man page
Hi Kent,

please find a little patch (attached) to introduce probe-bcache.8 man page to
bcache-tools.

Thank you.

Cheers,
Dmitry.

From 0ff7680042622e356516739936095cb4eab02de6 Mon Sep 17 00:00:00 2001
From: Dmitry Smirnov <onlyjob@member.fsf.org>
Date: Thu, 16 Feb 2012 13:23:00 +1100
Subject: [PATCH] added probe-bcache.8 man page
2012-02-16 09:14:41 -08:00
Dmitry Smirnov
e77d059ee1 Makefile to follow GNU Make best practice 2011-11-20 21:17:43 -08:00
Ricky Benitez
a02bc8df01 Add checksum to superblock
Add checksum to the superblock to prevent warning messages when
registering devices.
2011-07-26 10:02:15 -07:00
Kent Overstreet
0b4b6fe2d3 Stuff 2011-02-13 07:01:10 -08:00
Kent Overstreet
04a54144fd Documentation 2010-12-16 01:22:45 -08:00
Kent Overstreet
7e97901075 UUIDs 2010-10-08 07:04:49 -07:00
Kent Overstreet
e7b1ba1bd0 Cleanups 2010-07-29 23:05:51 -07:00
Kent Overstreet
c6d725f9ca auto 2010-05-27 20:42:25 -07:00
Kent Overstreet
bbe6fe14d2 Write testing, fixed checksumming 2010-05-22 12:43:34 -08:00
Kent Overstreet
d43ecc82a6 Makefile 2010-05-15 07:26:35 -08:00