Accepting request 182214 from home:dsterba:branches:filesystems

OBS-URL: https://build.opensuse.org/request/show/182214
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=131
This commit is contained in:
David Sterba 2013-07-04 14:37:50 +00:00 committed by Git OBS Bridge
parent dd1f6d3aa1
commit 9f10c89645
2 changed files with 94 additions and 4 deletions

View File

@ -0,0 +1,90 @@
From 3c7ae0fc5139c195100eb931bc6e1148ac1f11f5 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
Date: Mon, 26 Mar 2012 15:39:08 +0200
Subject: [PATCH 37/46] btrfs-progs: add man page for btrfs-convert
Signed-off-by: David Sterba <dsterba@suse.cz>
---
man/Makefile | 2 +-
man/btrfs-convert.8.in | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 61 insertions(+), 1 deletion(-)
create mode 100644 man/btrfs-convert.8.in
Index: btrfs-progs-v0.20-rc1-335-gf00dd83/man/btrfs-convert.8.in
===================================================================
--- /dev/null
+++ btrfs-progs-v0.20-rc1-335-gf00dd83/man/btrfs-convert.8.in
@@ -0,0 +1,60 @@
+.TH BTRFS-CONVERT 8
+.SH NAME
+btrfs-convert \- convert ext2/ext3/ext4 filesystem image to btrfs in-place
+.SH SYNOPSIS
+.B btrfs-convert \fB[\-dinL]\fP \fB[\-r]\fP \fB[\-l\fP \fILABEL\fP\fB]\fP \fIdevice\fP
+.SH DESCRIPTION
+.B btrfs-convert
+is used to convert a ext2/ext3/ext4 filesystem image to a btrfs one. This is
+performed on an unmounted image. The conversion is done in-place and it's
+possible to do a rollback to original fs. The original filesystem image is
+accessible as a subvolume named \fIext2\_subvol\fP.
+
+The success of the operation depends on amount of free space in the original
+filesystem, as btrfs uses this space to store it's own metadata and just adds
+pointers to the data blocks.
+
+Duration of the operation depends on fragmentation and allocated space on the
+orignal filesystem, it may take seveal hours for a terabyte-sized filesystem.
+
+If the operation does not finish succesfully, the image is recognized as the
+original fileystem.
+
+.SH OPTIONS
+.TP
+\fB\-d\fP
+Disable data checksumming. This may speed up the convert operation.
+.TP
+\fB\-i\fP
+Do not convert ACLs.
+.TP
+\fB\-n\fP
+Disable packing of small files.
+.TP
+\fB\-l\fR \fILABEL\fP
+Set the label of btrfs filesystem to \fILABEL\fP.
+.TP
+\fB\-L\fP
+Copy label from the original filesystem to btrfs.
+.TP
+\fB\-r\fP
+Try rollback to the original filesystem. Beware that this may not always
+succeed if the btrfs filesystem has been changed in a way that prevents this.
+
+.SH CAVEATS
+The resulting filesystem will inherit the fragmentation and it's possible to
+run whole filesystem defragmentation and then balance.
+
+The raid profile of both data and metada will be \fIsingle\fP, this is not the
+same as default mkfs will create. Use balance with convert filter to change
+raid profile you want.
+
+Security labels or quotas are not transferred to the new filesystem.
+
+Block sizes must be at least of btrfs supported size (currently 4KB on x86_64).
+
+.SH AVAILABILITY
+.B btrfs-convert
+is part of btrfs-progs.
+.SH SEE ALSO
+.BR mkfs.btrfs (8)
Index: btrfs-progs-v0.20-rc1-335-gf00dd83/man/Makefile
===================================================================
--- btrfs-progs-v0.20-rc1-335-gf00dd83.orig/man/Makefile
+++ btrfs-progs-v0.20-rc1-335-gf00dd83/man/Makefile
@@ -11,7 +11,7 @@ man8dir = $(mandir)/man8
# list only those we use
.SUFFIXES: .in .gz
-MANPAGES = mkfs.btrfs.8.gz btrfsck.8.gz btrfs-image.8.gz btrfs.8.gz
+MANPAGES = mkfs.btrfs.8.gz btrfsck.8.gz btrfs-image.8.gz btrfs.8.gz btrfs-convert.8.gz
INFILES = ${MANPAGES:.in=.gz}
all: $(MANPAGES)

View File

@ -36,7 +36,7 @@ Patch10: 0010-Btrfs-progs-make-btrfsck-a-hardlink-at-install-time.patch
Patch12: 0012-libbtrfs-Set-SONAME-to-libbtrfs.so.0-instead-of-libb.patch
Patch1000: local-version-override.patch
Patch1001: btrfs-progs-use-IEEE1541-suffixes-for-sizes.patch
#Patch1002: btrfs-progs-add-man-page-for-btrfs-convert.patch
Patch1002: btrfs-progs-add-man-page-for-btrfs-convert.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libacl-devel
@ -65,7 +65,7 @@ applications to interface with btrfs.
%package -n libbtrfs-devel
Summary: Include Files and Libraries for developing with Btrfs
Group: Development/Libraries/C and C++
Requires: libbtrfs0
Requires: %{name} = %{version}-%{release}
%description -n libbtrfs-devel
This package contains the libraries and headers files for developers to
@ -77,7 +77,7 @@ build applications to interface with btrfs.
%patch12 -p1
%patch1000 -p1
%patch1001 -p1
#%patch1002 -p1
%patch1002 -p1
%build
make %{?_smp_mflags} CFLAGS="%{optflags}" all btrfs-convert \
@ -174,7 +174,7 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a
%_mandir/man8/btrfsck.8.gz
%_mandir/man8/mkfs.btrfs.8.gz
%_mandir/man8/btrfs.8.gz
#%_mandir/man8/btrfs-convert.8.gz
%_mandir/man8/btrfs-convert.8.gz
%dir /lib/udev/
%dir /lib/udev/rules.d/
/lib/udev/rules.d/80-btrfs.rules