]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Documentation/makefile work
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 29 Aug 2016 02:00:50 +0000 (18:00 -0800)
committerKent Overstreet <kent.overstreet@gmail.com>
Mon, 29 Aug 2016 02:00:54 +0000 (18:00 -0800)
INSTALL [new file with mode: 0644]
Makefile
README
bcache.8
debian/control
debian/rules
mkfs.bcache [new file with mode: 0755]

diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..ea21297
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,14 @@
+
+Dependencies:
+
+ * libblkid
+ * libuuid
+ * libnih
+ * libscrypt
+ * libsodium
+ * libkeyutils
+
+On debian, you can install these with
+    apt install -y libblkid-dev uuid-dev libnih-dev libscrypt-dev libsodium-dev libkeyutils-dev
+
+Then, just make && make install
index facdf683102130253bec4fabad1ba42874176c33..9f2773ec39c1609af40405826f48d2d88746d3f6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,21 +8,15 @@ PKGCONFIG_LIBS="blkid uuid libnih"
 CFLAGS+=`pkg-config --cflags   ${PKGCONFIG_LIBS}`
 LDLIBS+=`pkg-config --libs     ${PKGCONFIG_LIBS}` -lscrypt -lsodium -lkeyutils
 
-ifeq ($(PREFIX), "/usr")
+ifeq ($(PREFIX),/usr)
        ROOT_SBINDIR=/sbin
 else
        ROOT_SBINDIR=$(PREFIX)/sbin
 endif
 
+.PHONY: all
 all: bcache
 
-install: bcache
-       $(INSTALL) -m0755 bcache $(DESTDIR)$(ROOT_SBINDIR)
-       $(INSTALL) -m0644 -- bcache.8 $(DESTDIR)$(PREFIX)/share/man/man8/
-
-clean:
-       $(RM) bcache *.o *.a
-
 CCANSRCS=$(wildcard ccan/*/*.c)
 CCANOBJS=$(patsubst %.c,%.o,$(CCANSRCS))
 
@@ -34,5 +28,18 @@ bcache-objs = bcache.o bcache-assemble.o bcache-device.o bcache-format.o\
 
 bcache: $(bcache-objs) libccan.a
 
-deb:
+.PHONY: install
+install: bcache
+       mkdir -p $(DESTDIR)$(ROOT_SBINDIR)
+       mkdir -p $(DESTDIR)$(PREFIX)/share/man/man8/
+       $(INSTALL) -m0755 bcache        $(DESTDIR)$(ROOT_SBINDIR)
+       $(INSTALL) -m0755 mkfs.bcache   $(DESTDIR)$(ROOT_SBINDIR)
+       $(INSTALL) -m0644 bcache.8      $(DESTDIR)$(PREFIX)/share/man/man8/
+
+.PHONY: clean
+clean:
+       $(RM) bcache *.o *.a
+
+.PHONY: deb
+deb: all
        debuild -nc -us -uc -i -I
diff --git a/README b/README
index 4a13db68cf47c73e7f44507aeed395c1265a38df..56a26b0c3c3a1571304728e878cf3d799ed08774 100644 (file)
--- a/README
+++ b/README
@@ -1,27 +1,12 @@
-These are the userspace tools required for bcache.
+Userspace tools for bcache-dev/bcachefs
 
-Bcache is a patch for the Linux kernel to use SSDs to cache other block
-devices. For more information, see http://bcache.evilpiepirate.org.
-Documentation for the run time interface is included in the kernel tree, in
-Documentantion/bcache.txt.
+This builds the bcache tool, which has a number of subcommands for formatting
+and managing bcachefs filesystems:
 
-Included tools:
+bcache format
+bcache unlock
+bcache assemble
+bcache incremental
+etc.
 
-make-bcache
-Formats a block device for use with bcache. A device can be formatted for use
-as a cache or as a backing device (requires yet to be implemented kernel
-support). The most important option is for specifying the bucket size.
-Allocation is done in terms of buckets, and cache hits are counted per bucket;
-thus a smaller bucket size will give better cache utilization, but poorer write
-performance. The bucket size is intended to be equal to the size of your SSD's
-erase blocks, which seems to be 128k-512k for most SSDs; feel free to
-experiment.
-
-probe-bcache
-Only necessary until support for the bcache superblock is included
-in blkid; in the meantime, provides just enough functionality for a udev script
-to create the /dev/disk/by-uuid symlink. The arguments it does support are the
-same as for blkid.
-
-bcache-super-show
-Prints the bcache superblock of a cache device or a backing device.
+Run bcache --help for full list of commands.
index 52c5fe741f3ebb78327f57ef762045879e5ce906..7671cf313da0b86b6959b4489ef47ee5a4f076df 100644 (file)
--- a/bcache.8
+++ b/bcache.8
@@ -1,9 +1,9 @@
-.TH bcacheadm 8
+.TH bcache 8
 .SH NAME
-bcacheadm \- manage bcache devices
+bcache \- manage bcache filesystems/devices
 
 .SH  SYNOPSIS
-.B bcacheadm
+.B bcache
 [\fIoptions\fR]
 .B COMMAND
 [\fIoptions\fR]
@@ -51,61 +51,63 @@ to create the /dev/disk/by-uuid symlink.
 
 .BR help
 .RS
-List the bcacheadm commands
+List the bcache commands
 .RE
 
 .SH OPTIONS
-.SH Options for bcacheadm
+.SH Options for bcache
 .TP
 .BR \--help
 
 
 .SH Options for format
+.SH Global options:
 .TP
-.BR \-C
-Create a cache
+.BR \-w,\ --block=
+block size, in bytes (e.g. 4k)
 .TP
-.BR \-B
-Create a backing device
+.BR \-w,\ --btree_node_size=
+btree node size in bytes - default 256k
 .TP
-.BR \-b\ --bucket-size=
-Specifies the bucket size.
+.BR \--metadata_checksum_type=TYPE
 .TP
-.BR \-l\ --label=
-label
+.BR \--data_checksum_type=TYPE
+where TYPE is one of none, crc32c (default), or crc64
 .TP
-.BR \-w,\ --block=
-block size (hard sector size of SSD, often 2k
+.BR \--compression_type=TYPE
+where TYPE is one of none (default), lz4 or gzip
 .TP
-.BR \-t,\ --tier=
-tier of subsequent devices
+.BR \--encrypted
+Enable encryption; passphrase will be prompted for
 .TP
-.BR \--cache-replacement-policy=
-one of lru, fifo, or random
+.BR \--error_action=TYPE
+where TYPE is one of continue, readonly (default) or panic
 .TP
-.BR \-o,\ --data_offset=
-data offset in sectors
+.BR \-l\ --label=LABEL
+Create the filesystem with the specified label
 .TP
-.BR \--cset-uuid=
-Create a cache device with the specified UUID
+.BR \--uuid=UUID
+Create the filesystem with the specified UUID
 .TP
-.BR \--csum_type=
-One of none, csc32c, or csc64
+.BR \--force
+Force the filesystem to be created, even if the device already contains a
+filesystem
+
+.SH Options that apply to subsequent devices:
 .TP
-.BR \--meta-replicas=
-Number of metadata replicas
+.BR \--fs_size=SIZE
+Create the filesystem using SIZE bytes on the subsequent device
 .TP
-.BR \--data-replicas=
-Number of data replicas
+.BR \-b\ --bucket-size=SIZE
+Specifies the bucket size - must be greater than the btree node size
 .TP
-.BR \--wipe-bcache
-Destroy existing bcache data if present
+.BR \-t,\ --tier=INDEX
+Specifies the tier of subsequent devices, where INDEX is a small integer and a
+smaller index indicates a faster tier - tier 0 being the fastest. Currently only
+two tiers are supported.
 .TP
 .BR \--discard
-Enable discards
-.TP
-.BR \--writeback
-Enable writeback
+Enable discards on subsequent devices
 
 .SH Options for register
 
@@ -117,7 +119,7 @@ Provide a directory other than /sys/fs/bcache
 .SH Options for query-devs
 .TP
 .BR \-f,\ --force-csum
-Enables bcacheadm to going even if the superblock crc is invalid
+Enables bcache to going even if the superblock crc is invalid
 
 .SH Options for status
 
index 4a138f62f08e707fe7ff70c43e53884af341cbb2..3e9b2942b491921efd9faf5c8f3250b508f9b33e 100644 (file)
@@ -4,7 +4,8 @@ Uploaders: Robie Basak <robie@justgohome.co.uk>
 Section: utils
 Priority: optional
 Standards-Version: 3.9.5
-Build-Depends: debhelper (>= 9), pkg-config, uuid-dev, libblkid-dev
+Build-Depends: debhelper (>= 9), pkg-config, libblkid-dev, uuid-dev, libnih-dev,
+       libscrypt-dev, libsodium-dev, libkeyutils-dev
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/bcache-tools.git
 Vcs-Git: git://anonscm.debian.org/collab-maint/bcache-tools.git
 Homepage: http://bcache.evilpiepirate.org/
index 61f3011152a8c28e86e04fcc3eb48f04898065da..4f2c774f2d13e882699e4351a4ebdcc61a688133 100755 (executable)
@@ -2,6 +2,3 @@
 %:
        dh $@
 
-override_dh_auto_install:
-       dh_auto_install -- DRACUTLIBDIR=/usr/lib/dracut
-
diff --git a/mkfs.bcache b/mkfs.bcache
new file mode 100755 (executable)
index 0000000..411c151
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec bcache format "$@"