Return-Path: Received: from cantor2.suse.de ([195.135.220.15]:42757 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757231Ab3A3Wuf (ORCPT ); Wed, 30 Jan 2013 17:50:35 -0500 From: Mark Fasheh To: linux-btrfs@vger.kernel.org Cc: chris.mason@fusionio.com, Anand.Jain@oracle.com, aschnell@suse.de, jeffm@suse.com, Mark Fasheh Subject: [PATCH 5/5] btrfs-progs: use autotools for building Date: Wed, 30 Jan 2013 14:50:27 -0800 Message-Id: <1359586227-19762-6-git-send-email-mfasheh@suse.de> In-Reply-To: <1359586227-19762-1-git-send-email-mfasheh@suse.de> References: <1359586227-19762-1-git-send-email-mfasheh@suse.de> Sender: linux-btrfs-owner@vger.kernel.org List-ID: From: Jeff Mahoney Since we're building shared libraries now, let's not reinvent the wheel. This also makes packaging libbtrfs much easier. The following (empty) files are added to satisfy autoconf: AUTHORS ChangeLog NEWS INSTALL. Changes by Mark Fasheh: - Fixes to make this patch work with upstream - I moved the previous contents of INSTALL to README since that seems to make more sense now) Signed-off-by: Jeff Mahoney Signed-off-by: Mark Fasheh --- INSTALL | 59 -------- Makefile | 146 -------------------- Makefile.am | 53 ++++++++ README | 59 ++++++++ autogen.sh | 5 + configure.ac | 6 + man/Makefile | 37 ----- man/Makefile.am | 2 + man/btrfs-image.8 | 34 +++++ man/btrfs-image.8.in | 34 ----- man/btrfs-show.8 | 22 +++ man/btrfs-show.8.in | 22 --- man/btrfs.8 | 365 ++++++++++++++++++++++++++++++++++++++++++++++++++ man/btrfs.8.in | 365 -------------------------------------------------- man/btrfsck.8 | 17 +++ man/btrfsck.8.in | 17 --- man/btrfsctl.8 | 48 +++++++ man/btrfsctl.8.in | 48 ------- man/mkfs.btrfs.8 | 79 +++++++++++ man/mkfs.btrfs.8.in | 79 ----------- 20 files changed, 690 insertions(+), 807 deletions(-) create mode 100644 AUTHORS create mode 100644 ChangeLog delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100755 autogen.sh create mode 100644 configure.ac delete mode 100644 man/Makefile create mode 100644 man/Makefile.am create mode 100644 man/btrfs-image.8 delete mode 100644 man/btrfs-image.8.in create mode 100644 man/btrfs-show.8 delete mode 100644 man/btrfs-show.8.in create mode 100644 man/btrfs.8 delete mode 100644 man/btrfs.8.in create mode 100644 man/btrfsck.8 delete mode 100644 man/btrfsck.8.in create mode 100644 man/btrfsctl.8 delete mode 100644 man/btrfsctl.8.in create mode 100644 man/mkfs.btrfs.8 delete mode 100644 man/mkfs.btrfs.8.in diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/INSTALL b/INSTALL index 6afbd90..e69de29 100644 --- a/INSTALL +++ b/INSTALL @@ -1,59 +0,0 @@ -Install Instructions - -Btrfs puts snapshots and subvolumes into the root directory of the FS. This -directory can only be changed by btrfsctl right now, and normal filesystem -operations do not work on it. The default subvolume is called 'default', -and you can create files and directories in mount_point/default - -Btrfs uses libcrc32c in the kernel for file and metadata checksums. You need -to compile the kernel with: - -CONFIG_LIBCRC32C=m - -libcrc32c can be static as well. Once your kernel is setup, typing make in the -btrfs module sources will build against the running kernel. When the build is -complete: - -modprobe libcrc32c -insmod btrfs.ko - -The Btrfs utility programs require libuuid to build. This can be found -in the e2fsprogs sources, and is usually available as libuuid or -e2fsprogs-devel from various distros. - -Building the utilities is just make ; make install. The programs go -into /usr/local/bin. The mains commands available are: - -mkfs.btrfs: create a filesystem - -btrfs: control program to create snapshots and subvolumes: - # mount a btrfs filesystem - mount /dev/sda2 /mnt - - # create a subvolume - btrfs subvolume create /mnt/new_subvol_name - - # snapshot of a subvolume - btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default - btrfs subvolume snapshot /mnt/snapshot_of_default \ - /mnt/snapshot_of_a_snapshot - - # list of the subvolumes - ls /mnt - default snapshot_of_a_snapshot snapshot_of_new_subvol - new_subvol_name snapshot_of_default - - # removal of a subvolume or a snapshot - btrfs subvolume delete /mn/snapshot_of_a_snapshot - - # look a the btrfs man page for further information - man btrfs - -btrfsck: do a limited check of the FS extent trees. - -btrfs-debug-tree: print all of the FS metadata in text form. Example: - - btrfs-debug-tree /dev/sda2 >& big_output_file - - - diff --git a/Makefile b/Makefile deleted file mode 100644 index 27d62c0..0000000 --- a/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -CC = gcc -AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DBTRFS_FLAT_INCLUDES -fPIC -CFLAGS = -g -O1 -objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ - root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \ - extent-cache.o extent_io.o volumes.o utils.o btrfslabel.o repair.o \ - qgroup.o -cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \ - cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \ - cmds-quota.o cmds-qgroup.o -libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o -libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \ - crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \ - extent_io.h ioctl.h ctree.h - -CHECKFLAGS= -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \ - -Wuninitialized -Wshadow -Wundef -DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@ - -INSTALL = install -prefix ?= /usr/local -bindir = $(prefix)/bin -libdir = $(prefix)/lib -incdir = $(prefix)/include/btrfs -lib_LIBS=-luuid -lm -L. -LIBS=$(lib_LIBS) -lbtrfs -RESTORE_LIBS=-lz - -progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \ - btrfs btrfs-map-logical btrfs-image btrfs-zero-log btrfs-convert \ - btrfs-find-root btrfs-restore btrfstune - -libs = libbtrfs.so.1.0 -lib_links = libbtrfs.so.1 libbtrfs.so -headers = $(libbtrfs_headers) - -# make C=1 to enable sparse -ifdef C - check = sparse $(CHECKFLAGS) -else - check = ls -endif - -.c.o: - $(check) $< - $(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $< - - -all: version $(libs) $(progs) manpages - -version: - bash version.sh - -$(libs): $(libbtrfs_objects) $(lib_links) send.h - $(CC) $(CFLAGS) $(libbtrfs_objects) $(lib_LIBS) -shared -Wl,-soname,libbtrfs.so.1 -o libbtrfs.so.1.0 - -$(lib_links): - ln -sf libbtrfs.so.1.0 libbtrfs.so.1 - ln -sf libbtrfs.so.1.0 libbtrfs.so - -btrfs: $(objects) btrfs.o help.o common.o $(cmds_objects) $(libs) - $(CC) $(CFLAGS) -o btrfs btrfs.o help.o common.o $(cmds_objects) \ - $(objects) $(LDFLAGS) $(LIBS) -lpthread - -calc-size: $(objects) $(libs) calc-size.o - $(CC) $(CFLAGS) -o calc-size calc-size.o $(objects) $(LDFLAGS) $(LIBS) - -btrfs-find-root: $(objects) $(libs) find-root.o - $(CC) $(CFLAGS) -o btrfs-find-root find-root.o $(objects) $(LDFLAGS) $(LIBS) - -btrfs-restore: $(objects) $(libs) restore.o - $(CC) $(CFLAGS) -o btrfs-restore restore.o $(objects) $(LDFLAGS) $(LIBS) $(RESTORE_LIBS) - -btrfsctl: $(objects) $(libs) btrfsctl.o - $(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS) - -btrfs-vol: $(objects) $(libs) btrfs-vol.o - $(CC) $(CFLAGS) -o btrfs-vol btrfs-vol.o $(objects) $(LDFLAGS) $(LIBS) - -btrfs-show: $(objects) $(libs) btrfs-show.o - $(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS) - -btrfsck: $(objects) $(libs) btrfsck.o - $(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS) - -mkfs.btrfs: $(objects) $(libs) mkfs.o - $(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS) - -btrfs-debug-tree: $(objects) $(libs) debug-tree.o - $(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS) - -btrfs-zero-log: $(objects) $(libs) btrfs-zero-log.o - $(CC) $(CFLAGS) -o btrfs-zero-log $(objects) btrfs-zero-log.o $(LDFLAGS) $(LIBS) - -btrfs-select-super: $(objects) $(libs) btrfs-select-super.o - $(CC) $(CFLAGS) -o btrfs-select-super $(objects) btrfs-select-super.o $(LDFLAGS) $(LIBS) - -btrfstune: $(objects) $(libs) btrfstune.o - $(CC) $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS) - -btrfs-map-logical: $(objects) $(libs) btrfs-map-logical.o - $(CC) $(CFLAGS) -o btrfs-map-logical $(objects) btrfs-map-logical.o $(LDFLAGS) $(LIBS) - -btrfs-corrupt-block: $(objects) $(libs) btrfs-corrupt-block.o - $(CC) $(CFLAGS) -o btrfs-corrupt-block $(objects) btrfs-corrupt-block.o $(LDFLAGS) $(LIBS) - -btrfs-image: $(objects) $(libs) btrfs-image.o - $(CC) $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS) - -dir-test: $(objects) $(libs) dir-test.o - $(CC) $(CFLAGS) -o dir-test $(objects) dir-test.o $(LDFLAGS) $(LIBS) - -quick-test: $(objects) $(libs) quick-test.o - $(CC) $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS) - -btrfs-convert: $(objects) $(libs) convert.o - $(CC) $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs -lcom_err $(LDFLAGS) $(LIBS) - -ioctl-test: $(objects) $(libs) ioctl-test.o - $(CC) $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS) - -send-test: $(objects) send-test.o - $(CC) $(CFLAGS) -o send-test send-test.o $(LDFLAGS) $(LIBS) -lpthread - -manpages: - cd man; $(MAKE) - -install-man: - cd man; $(MAKE) install - -clean : - rm -f $(progs) $(libs) cscope.out *.o .*.d btrfs-convert btrfs-image \ - btrfs-select-super btrfs-zero-log btrfstune dir-test ioctl-test \ - quick-test send-test version.h - cd man; $(MAKE) clean - -install: $(libs) $(progs) install-man - $(INSTALL) -m755 -d $(DESTDIR)$(bindir) - $(INSTALL) $(progs) $(DESTDIR)$(bindir) - $(INSTALL) -m755 -d $(DESTDIR)$(libdir) - $(INSTALL) $(libs) $(DESTDIR)$(libdir) - cp -a $(lib_links) $(DESTDIR)$(libdir) - $(INSTALL) -m755 -d $(DESTDIR)$(incdir) - $(INSTALL) $(headers) $(DESTDIR)$(incdir) - --include .*.d diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0a25838 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,53 @@ +SUBDIRS = man + +AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 \ + -DBTRFS_FLAT_INCLUDES + +version.h : version.sh + sh $(top_srcdir)/version.sh + +noinst_LTLIBRARIES = libbtrfs_static.la +lib_LTLIBRARIES = libbtrfs.la +libbtrfs_la_SOURCES = send-stream.c send-utils.c rbtree.c btrfs-list.c crc32c.c +libbtrfs_la_LDFLAGS = -version-info 0:1:0 +libbtrfs_static_la_SOURCES = $(libbtrfs_la_SOURCES) + +noinst_LTLIBRARIES += libbtrfscore.la +libbtrfscore_la_SOURCES = ctree.c disk-io.c radix-tree.c extent-tree.c \ + print-tree.c root-tree.c dir-item.c file-item.c \ + inode-item.c inode-map.c extent-cache.c extent_io.c \ + volumes.c utils.c btrfslabel.c repair.c qgroup.c + +CMDS = cmds-subvolume.c cmds-filesystem.c cmds-device.c cmds-scrub.c \ + cmds-inspect.c cmds-balance.c cmds-send.c cmds-receive.c \ + cmds-quota.c cmds-qgroup.c + +sbin_PROGRAMS = mkfs.btrfs btrfs-debug-tree btrfsck btrfs btrfs-image \ + btrfs-zero-log btrfs-find-root btrfs-restore btrfstune \ + btrfs-select-super btrfs-convert +bin_PROGRAMS = btrfsctl btrfs-show btrfs-vol btrfs-map-logical +noinst_PROGRAMS = send-test + +LDADD = libbtrfscore.la libbtrfs_static.la -luuid -lm + +libbtrfsdir = $(includedir)/btrfs +libbtrfs_HEADERS = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \ + crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \ + extent_io.h ioctl.h ctree.h + +btrfs_SOURCES = btrfs.c help.c common.c $(CMDS) +btrfs_LDADD = -lpthread $(LDADD) +btrfs_debug_tree_SOURCES = debug-tree.c + +btrfs_convert_SOURCES = convert.c +btrfs_convert_LDADD = -lext2fs -lcom_err $(LDADD) + +btrfs_restore_SOURCES = restore.c +btrfs_restore_LDADD = -lz $(LDADD) + +btrfs_find_root_SOURCES = find-root.c + +btrfs_image_LDADD = -lpthread -lz $(LDADD) + +send_test_LDADD = -lpthread $(LDADD) + diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..292350b --- /dev/null +++ b/README @@ -0,0 +1,59 @@ +Usage Instructions + +Btrfs puts snapshots and subvolumes into the root directory of the FS. This +directory can only be changed by btrfsctl right now, and normal filesystem +operations do not work on it. The default subvolume is called 'default', +and you can create files and directories in mount_point/default + +Btrfs uses libcrc32c in the kernel for file and metadata checksums. You need +to compile the kernel with: + +CONFIG_LIBCRC32C=m + +libcrc32c can be static as well. Once your kernel is setup, typing make in the +btrfs module sources will build against the running kernel. When the build is +complete: + +modprobe libcrc32c +insmod btrfs.ko + +The Btrfs utility programs require libuuid to build. This can be found +in the e2fsprogs sources, and is usually available as libuuid or +e2fsprogs-devel from various distros. + +Building the utilities is just ./autogen.sh ; make ; make install. +The main commands available are: + +mkfs.btrfs: create a filesystem + +btrfs: control program to create snapshots and subvolumes: + # mount a btrfs filesystem + mount /dev/sda2 /mnt + + # create a subvolume + btrfs subvolume create /mnt/new_subvol_name + + # snapshot of a subvolume + btrfs subvolume snapshot /mnt/default /mnt/snapshot_of_default + btrfs subvolume snapshot /mnt/snapshot_of_default \ + /mnt/snapshot_of_a_snapshot + + # list of the subvolumes + ls /mnt + default snapshot_of_a_snapshot snapshot_of_new_subvol + new_subvol_name snapshot_of_default + + # removal of a subvolume or a snapshot + btrfs subvolume delete /mn/snapshot_of_a_snapshot + + # look a the btrfs man page for further information + man btrfs + +btrfsck: do a limited check of the FS extent trees. + +btrfs-debug-tree: print all of the FS metadata in text form. Example: + + btrfs-debug-tree /dev/sda2 >& big_output_file + + + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..154cd1c --- /dev/null +++ b/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +rm -fr aclocal.m4 autom4te.cache/ +autoreconf -iv +./configure diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..080b7f4 --- /dev/null +++ b/configure.ac @@ -0,0 +1,6 @@ +AC_INIT([btrfsprogs], [0.20]) +AM_INIT_AUTOMAKE([1.9]) + +AC_PROG_LIBTOOL +AC_PROG_CC +AC_OUTPUT([Makefile man/Makefile]) diff --git a/man/Makefile b/man/Makefile deleted file mode 100644 index 4a90b75..0000000 --- a/man/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -GZIP=gzip -INSTALL= install - -prefix ?= /usr/local -bindir = $(prefix)/bin -mandir = $(prefix)/man -man8dir = $(mandir)/man8 - -MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \ - btrfs-show.8.gz btrfs.8.gz - -all: $(MANPAGES) - -mkfs.btrfs.8.gz: mkfs.btrfs.8.in - $(GZIP) -n -c mkfs.btrfs.8.in > mkfs.btrfs.8.gz - -btrfs.8.gz: btrfs.8.in - $(GZIP) -n -c btrfs.8.in > btrfs.8.gz - -btrfsctl.8.gz: btrfsctl.8.in - $(GZIP) -n -c btrfsctl.8.in > btrfsctl.8.gz - -btrfsck.8.gz: btrfsck.8.in - $(GZIP) -n -c btrfsck.8.in > btrfsck.8.gz - -btrfs-image.8.gz: btrfs-image.8.in - $(GZIP) -n -c btrfs-image.8.in > btrfs-image.8.gz - -btrfs-show.8.gz: btrfs-show.8.in - $(GZIP) -n -c btrfs-show.8.in > btrfs-show.8.gz - -clean : - rm -f $(MANPAGES) - -install: $(MANPAGES) - $(INSTALL) -m755 -d $(DESTDIR)$(man8dir) - $(INSTALL) -m 644 $(MANPAGES) $(DESTDIR)$(man8dir) diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..a6e6c9d --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,2 @@ +man8_MANS = btrfs.8 btrfsck.8 btrfsctl.8 btrfs-image.8 \ + btrfs-show.8 mkfs.btrfs.8 diff --git a/man/btrfs-image.8 b/man/btrfs-image.8 new file mode 100644 index 0000000..7a348f8 --- /dev/null +++ b/man/btrfs-image.8 @@ -0,0 +1,34 @@ +.TH BTRFS-IMAGE 8 +.SH NAME +btrfs-image \- create/restore an image of the filesystem +.SH SYNOPSIS +.B btrfs-image +[options] \fIsource\fP \fItarget\fP +.SH DESCRIPTION +.B btrfs-image +is used to create an image of a btrfs filesystem. All data will be zeroed, +but metadata and the like is preserved. +.I source +is the special file corresponding to the device containing a btrfs filesystem. +(e.g \fI/dev/sdXX\fP). +.I target +is the image file that btrfs-image creates. When used with \fB-r\fP option, +\fBbtrfs-image\fP restores the image file from source into target. +.SH OPTIONS +.TP +\fB\-r\fP +restore metadump image. +.TP +\fB\-c\fR \fIvalue\fP +compression level (0 ~ 9). +.TP +\fB\-t\fR \fIvalue\fP +number of threads (1 ~ 32) to be used to process the image dump or restore. +.SH AVAILABILITY +.B btrfs-image +is part of btrfs-progs. Btrfs is currently under heavy development, +and not suitable for any uses other than benchmarking and review. +Please refer to the btrfs wiki +http://btrfs.wiki.kernel.org for further details. +.SH SEE ALSO +.BR btrfsck (8), btrfsctl (8), mkfs.btrfs (8) diff --git a/man/btrfs-image.8.in b/man/btrfs-image.8.in deleted file mode 100644 index 7a348f8..0000000 --- a/man/btrfs-image.8.in +++ /dev/null @@ -1,34 +0,0 @@ -.TH BTRFS-IMAGE 8 -.SH NAME -btrfs-image \- create/restore an image of the filesystem -.SH SYNOPSIS -.B btrfs-image -[options] \fIsource\fP \fItarget\fP -.SH DESCRIPTION -.B btrfs-image -is used to create an image of a btrfs filesystem. All data will be zeroed, -but metadata and the like is preserved. -.I source -is the special file corresponding to the device containing a btrfs filesystem. -(e.g \fI/dev/sdXX\fP). -.I target -is the image file that btrfs-image creates. When used with \fB-r\fP option, -\fBbtrfs-image\fP restores the image file from source into target. -.SH OPTIONS -.TP -\fB\-r\fP -restore metadump image. -.TP -\fB\-c\fR \fIvalue\fP -compression level (0 ~ 9). -.TP -\fB\-t\fR \fIvalue\fP -number of threads (1 ~ 32) to be used to process the image dump or restore. -.SH AVAILABILITY -.B btrfs-image -is part of btrfs-progs. Btrfs is currently under heavy development, -and not suitable for any uses other than benchmarking and review. -Please refer to the btrfs wiki -http://btrfs.wiki.kernel.org for further details. -.SH SEE ALSO -.BR btrfsck (8), btrfsctl (8), mkfs.btrfs (8) diff --git a/man/btrfs-show.8 b/man/btrfs-show.8 new file mode 100644 index 0000000..cb98b68 --- /dev/null +++ b/man/btrfs-show.8 @@ -0,0 +1,22 @@ +.TH BTRFS-SHOW 8 +.SH NAME +btrfs-show \- scan the /dev directory for btrfs partitions and print results. +.SH SYNOPSIS +.B btrfs-show +.SH NOTE +.B btrfs-show +is deprecated. Please consider to switch to the btrfs utility. +.SH DESCRIPTION +.B btrfs-show +is used to scan the /dev directory for btrfs partitions and display brief +information such as lable, uuid, etc of each btrfs partition. +.SH OPTIONS +none +.SH AVAILABILITY +.B btrfs-show +is part of btrfs-progs. Btrfs is currently under heavy development, +and not suitable for any uses other than benchmarking and review. +Please refer to the btrfs wiki +http://btrfs.wiki.kernel.org for further details. +.SH SEE ALSO +.BR btrfsck (8), btrfsctl (8), mkfs.btrfs (8), btrfs-image (8) diff --git a/man/btrfs-show.8.in b/man/btrfs-show.8.in deleted file mode 100644 index cb98b68..0000000 --- a/man/btrfs-show.8.in +++ /dev/null @@ -1,22 +0,0 @@ -.TH BTRFS-SHOW 8 -.SH NAME -btrfs-show \- scan the /dev directory for btrfs partitions and print results. -.SH SYNOPSIS -.B btrfs-show -.SH NOTE -.B btrfs-show -is deprecated. Please consider to switch to the btrfs utility. -.SH DESCRIPTION -.B btrfs-show -is used to scan the /dev directory for btrfs partitions and display brief -information such as lable, uuid, etc of each btrfs partition. -.SH OPTIONS -none -.SH AVAILABILITY -.B btrfs-show -is part of btrfs-progs. Btrfs is currently under heavy development, -and not suitable for any uses other than benchmarking and review. -Please refer to the btrfs wiki -http://btrfs.wiki.kernel.org for further details. -.SH SEE ALSO -.BR btrfsck (8), btrfsctl (8), mkfs.btrfs (8), btrfs-image (8) diff --git a/man/btrfs.8 b/man/btrfs.8 new file mode 100644 index 0000000..9222580 --- /dev/null +++ b/man/btrfs.8 @@ -0,0 +1,365 @@ +.TH BTRFS 8 "" "btrfs" "btrfs" +.\" +.\" Man page written by Goffredo Baroncelli (Feb 2010) +.\" +.SH NAME +btrfs \- control a btrfs filesystem +.SH SYNOPSIS +\fBbtrfs\fP \fBsubvolume snapshot\fP\fI [-r] [/]\fP +.PP +\fBbtrfs\fP \fBsubvolume delete\fP\fI [...]\fP +.PP +\fBbtrfs\fP \fBsubvolume create\fP\fI [/]\fP +.PP +\fBbtrfs\fP \fBsubvolume list\fP\fI [-aprts] [-g [+|-]value] [-c [+|-]value] [--rootid=rootid,gen,ogen,path] \fP +.PP +\fBbtrfs\fP \fBsubvolume set-default\fP\fI \fP +.PP +\fBbtrfs\fP \fBsubvolume get-default\fP\fI \fP +.PP +\fBbtrfs\fP \fBfilesystem defragment\fP -c[zlib|lzo] [-l \fIlen\fR] \ +[-s \fIstart\fR] [-t \fIsize\fR] -[vf] <\fIfile\fR>|<\fIdir\fR> \ +[<\fIfile\fR>|<\fIdir\fR>...] +.PP +\fBbtrfs\fP \fBfilesystem sync\fP\fI \fP +.PP +\fBbtrfs\fP \fBfilesystem resize\fP\fI [devid:][+/\-][gkm]|[devid:]max \fP +.PP +\fBbtrfs\fP \fBfilesystem label\fP\fI [newlabel]\fP +.PP +\fBbtrfs\fP \fBsubvolume find-new\fP\fI \fP +.PP +\fBbtrfs\fP \fBfilesystem balance\fP\fI \fP +.PP +\fBbtrfs\fP \fBdevice scan\fP\fI [--all-devices| [...]]\fP +.PP +\fBbtrfs\fP \fBdevice show\fP\fI [--all-devices||