rpms/btrfs-progs/F-13 btrfs-progs-build-everything.patch, 1.1, 1.2 btrfs-progs-upstream.patch, 1.1, 1.2 btrfs-progs.spec, 1.23, 1.24

Josef Bacik josef at fedoraproject.org
Wed Mar 24 18:57:01 UTC 2010


Author: josef

Update of /cvs/pkgs/rpms/btrfs-progs/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv18728

Modified Files:
	btrfs-progs-build-everything.patch btrfs-progs-upstream.patch 
	btrfs-progs.spec 
Log Message:
* Wed Mar 24 2010 Josef Bacik <josef at toxicpanda.com> 0.19-12
- bring btrfs-progs uptodate with upstream so we can use the new kernel
  features, such as the default subvol stuff and snapshot listing.


btrfs-progs-build-everything.patch:
 Makefile |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: btrfs-progs-build-everything.patch
===================================================================
RCS file: /cvs/pkgs/rpms/btrfs-progs/F-13/btrfs-progs-build-everything.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- btrfs-progs-build-everything.patch	19 Jun 2009 12:10:44 -0000	1.1
+++ btrfs-progs-build-everything.patch	24 Mar 2010 18:57:00 -0000	1.2
@@ -1,12 +1,12 @@
-diff -up btrfs-progs-0.19/Makefile.orig btrfs-progs-0.19/Makefile
---- btrfs-progs-0.19/Makefile.orig	2009-06-19 08:05:49.151573429 -0400
-+++ btrfs-progs-0.19/Makefile	2009-06-19 08:08:35.192509803 -0400
-@@ -16,7 +16,7 @@ prefix ?= /usr/local
- bindir = $(prefix)/bin
+--- btrfs-progs-0.19/Makefile.orig	2010-03-24 14:45:18.001490900 -0400
++++ btrfs-progs-0.19/Makefile	2010-03-24 14:45:35.745491310 -0400
+@@ -17,8 +17,7 @@
  LIBS=-luuid
  
--progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck
-+progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck btrfs-image btrfstune
+ progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \
+-	btrfs \
+-	btrfs-map-logical
++	btrfs btrfs-map-logical btrfstune btrfs-image
  
  # make C=1 to enable sparse
  ifdef C

btrfs-progs-upstream.patch:
 Makefile            |   16 
 btrfs-defrag.c      |   39 ++
 btrfs-list.c        |  825 ++++++++++++++++++++++++++++++++++++++++++++++
 btrfs-map-logical.c |  221 ++++++++++++
 btrfs.c             |  387 +++++++++++++++++++++
 btrfs_cmds.c        |  924 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 btrfs_cmds.h        |   34 +
 btrfsck.c           |  444 +++++++++++++++++++++++-
 btrfsctl.c          |   32 +
 convert.c           |    7 
 ctree.h             |   18 +
 ioctl-test.c        |   36 ++
 ioctl.h             |  113 ++++++
 man/Makefile        |    5 
 man/btrfs.8.in      |  170 +++++++++
 15 files changed, 3226 insertions(+), 45 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.1 -r 1.2 btrfs-progs-upstream.patchIndex: btrfs-progs-upstream.patch
===================================================================
RCS file: /cvs/pkgs/rpms/btrfs-progs/F-13/btrfs-progs-upstream.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- btrfs-progs-upstream.patch	11 Mar 2010 22:06:30 -0000	1.1
+++ btrfs-progs-upstream.patch	24 Mar 2010 18:57:01 -0000	1.2
@@ -1,3 +1,2524 @@
+diff --git a/Makefile b/Makefile
+index 8097b5a..525676e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@ CFLAGS = -g -Werror -Os
+ 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 crc32c.o rbtree.o extent-cache.o extent_io.o \
+-	  volumes.o utils.o
++	  volumes.o utils.o btrfs-list.o
+ 
+ #
+ CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
+@@ -16,7 +16,9 @@ prefix ?= /usr/local
+ bindir = $(prefix)/bin
+ LIBS=-luuid
+ 
+-progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck
++progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \
++	btrfs \
++	btrfs-map-logical
+ 
+ # make C=1 to enable sparse
+ ifdef C
+@@ -35,6 +37,10 @@ all: version $(progs) manpages
+ version:
+ 	bash version.sh
+ 
++btrfs: $(objects) btrfs.o btrfs_cmds.o
++	gcc $(CFLAGS) -o btrfs btrfs.o btrfs_cmds.o \
++		$(objects) $(LDFLAGS) $(LIBS)
++
+ btrfsctl: $(objects) btrfsctl.o
+ 	gcc $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)
+ 
+@@ -56,6 +62,9 @@ btrfs-debug-tree: $(objects) debug-tree.o
+ btrfstune: $(objects) btrfstune.o
+ 	gcc $(CFLAGS) -o btrfstune $(objects) btrfstune.o $(LDFLAGS) $(LIBS)
+ 
++btrfs-map-logical: $(objects) btrfs-map-logical.o
++	gcc $(CFLAGS) -o btrfs-map-logical $(objects) btrfs-map-logical.o $(LDFLAGS) $(LIBS)
++
+ btrfs-image: $(objects) btrfs-image.o
+ 	gcc $(CFLAGS) -o btrfs-image $(objects) btrfs-image.o -lpthread -lz $(LDFLAGS) $(LIBS)
+ 
+@@ -68,6 +77,9 @@ quick-test: $(objects) quick-test.o
+ convert: $(objects) convert.o
+ 	gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
+ 
++ioctl-test: $(objects) ioctl-test.o
++	gcc $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)
++
+ manpages:
+ 	cd man; make
+ 
+diff --git a/btrfs-defrag.c b/btrfs-defrag.c
+new file mode 100644
+index 0000000..8f1525a
+--- /dev/null
++++ b/btrfs-defrag.c
+@@ -0,0 +1,39 @@
++/*
++ * Copyright (C) 2010 Oracle.  All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public
++ * License v2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 021110-1307, USA.
++ */
++
++#ifndef __CHECKER__
++#include <sys/ioctl.h>
++#include <sys/mount.h>
++#include "ioctl.h"
++#endif
++#include <stdio.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <ctype.h>
++#include <unistd.h>
++#include <dirent.h>
++#include <libgen.h>
++#include <getopt.h>
++#include "kerncompat.h"
++#include "ctree.h"
++#include "transaction.h"
++#include "utils.h"
++#include "version.h"
++
+diff --git a/btrfs-list.c b/btrfs-list.c
+new file mode 100644
+index 0000000..7741705
+--- /dev/null
++++ b/btrfs-list.c
+@@ -0,0 +1,825 @@
++/*
++ * Copyright (C) 2010 Oracle.  All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public
++ * License v2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this program; if not, write to the
++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ * Boston, MA 021110-1307, USA.
++ */
++
++#ifndef __CHECKER__
++#include <sys/ioctl.h>
++#include <sys/mount.h>
++#include "ioctl.h"
++#endif
++#include <stdio.h>
++#include <stdlib.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <dirent.h>
++#include <libgen.h>
++#include "kerncompat.h"
++#include "ctree.h"
++#include "transaction.h"
++#include "utils.h"
++#include "version.h"
++
++/* we store all the roots we find in an rbtree so that we can
++ * search for them later.
++ */
++struct root_lookup {
++	struct rb_root root;
++};
++
++/*
++ * one of these for each root we find.
++ */
++struct root_info {
++	struct rb_node rb_node;
++
++	/* this root's id */
++	u64 root_id;
++
++	/* the id of the root that references this one */
++	u64 ref_tree;
++
++	/* the dir id we're in from ref_tree */
++	u64 dir_id;
++
++	/* path from the subvol we live in to this root, including the
++	 * root's name.  This is null until we do the extra lookup ioctl.
++	 */
++	char *path;
++
++	/* the name of this root in the directory it lives in */
++	char name[];
++};
++
++static void root_lookup_init(struct root_lookup *tree)
++{
++	tree->root.rb_node = NULL;
++}
++
++static int comp_entry(struct root_info *entry, u64 root_id, u64 ref_tree)
++{
++	if (entry->root_id > root_id)
++		return 1;
++	if (entry->root_id < root_id)
++		return -1;
++	if (entry->ref_tree > ref_tree)
++		return 1;
++	if (entry->ref_tree < ref_tree)
++		return -1;
++	return 0;
++}
[...2654 lines suppressed...]
++				    struct btrfs_ioctl_space_args)
  #endif
+diff --git a/man/Makefile b/man/Makefile
+index 4e8893b..4a90b75 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -7,13 +7,16 @@ 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-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
+ 
+diff --git a/man/btrfs.8.in b/man/btrfs.8.in
+new file mode 100644
+index 0000000..26ef982
+--- /dev/null
++++ b/man/btrfs.8.in
+@@ -0,0 +1,170 @@
++.TH BTRFS 8 "" "btrfs" "btrfs"
++.\"
++.\" Man page written by Goffredo Baroncelli <kreijack at inwind.it> (Feb 2010)
++.\"
++.SH NAME
++btrfs \- control a btrfs filesystem
++.SH SYNOPSIS
++\fBbtrfs\fP \fBsubvolume snapshot\fP\fI <source> [<dest>/]<name>\fP
++.PP
++\fBbtrfs\fP \fBsubvolume delete\fP\fI <subvolume>\fP
++.PP
++\fBbtrfs\fP \fBsubvolume create\fP\fI [<dest>/]<name>\fP
++.PP
++\fBbtrfs\fP \fBsubvolume list\fP\fI <path>\fP
++.PP
++\fBbtrfs\fP \fBsubvolume set-default\fP\fI <id> <path>\fP
++.PP
++\fBbtrfs\fP \fBfilesystem defrag\fP\fI <file>|<dir> [<file>|<dir>...]\fP
++.PP
++\fBbtrfs\fP \fBfilesystem sync\fP\fI <path> \fP
++.PP
++\fBbtrfs\fP \fBfilesystem resize\fP\fI [+/\-]<size>[gkm]|max <filesystem>\fP
++.PP
++\fBbtrfs\fP \fBdevice scan\fP\fI [<device> [<device>..]]\fP
++.PP
++\fBbtrfs\fP \fBdevice show\fP\fI <dev>|<label> [<dev>|<label>...]\fP
++.PP
++\fBbtrfs\fP \fBdevice balance\fP\fI <path> \fP
++.PP
++\fBbtrfs\fP \fBdevice add\fP\fI <dev> [<dev>..] <path> \fP
++.PP
++\fBbtrfs\fP \fBdevice delete\fP\fI <dev> [<dev>..] <path> \fP]
++
++.PP
++\fBbtrfs\fP \fBhelp|\-\-help|\-h \fP\fI\fP
++.PP
++.SH DESCRIPTION
++.B btrfs
++is used to control the filesystem and the files and directories stored. It is
++the tool to create or destroy a snapshot or a subvolume for the
++filesystem, to defrag a file or a directory, flush the data to the disk,
++to resize the filesystem, to scan the device.
++
++It is possible to abbreviate the commands unless the commands  are ambiguous.
++For example: it is possible to run
++.I btrfs sub snaps
++instead of
++.I btrfs subvolume snapshot.
++But
++.I btrfs dev s
++is not allowed, because
++.I dev s
++may be interpreted both as
++.I device show
++and as
++.I device scan.
++In this case
++.I btrfs
++returns an error.
++
++If a command is terminated by
++.I --help
++, the relevant help is showed. If the passed command matches more commands,
++the help of all the matched commands are showed. For example
++.I btrfs dev --help
++shows the help of all
++.I device*
++command.
++
++.SH COMMANDS
++.TP
++
++\fBsubvolume snapshot\fR\fI <source> [<dest>/]<name>\fR
++Create a writable snapshot of the subvolume \fI<source>\fR with the name
++\fI<name>\fR in the \fI<dest>\fR directory. If \fI<source>\fR is not a
++subvolume, \fBbtrfs\fR returns an error.
++.TP
++
++\fBsubvolume delete\fR\fI <subvolume>\fR
++Delete the subvolume \fI<subvolume>\fR. If \fI<subvolume>\fR is not a
++subvolume, \fBbtrfs\fR returns an error.
++.TP
++
++\fBsubvolume create\fR\fI [<dest>/]<name>\fR
++Create a subvolume in \fI<dest>\fR (or in the current directory if
++\fI<dest>\fR is omitted).
++.TP
++
++\fBsubvolume list\fR\fI <path>\fR
++List the subvolumes present in the filesystem \fI<path>\fR. For every
++subvolume is showed the subvolume ID (second column), 
++the ID of the \fItop level\fR 
++subvolume (fifth column), and the path (seventh column) relative to the
++\fItop level\fR subvolume.
++These <ID> may be used by the \fBsubvolume set-default\fR command, or at
++mount time via the \fIsubvol=\fR option.
++.TP
++
++\fBsubvolume set-default\fR\fI <id> <path>\fR
++Set the subvolume of the filesystem \fI<path>\fR which is mounted as 
++\fIdefault\fR. The subvolume is identified by \fB<id>\fR, which 
++is returned by the \fBsubvolume list\fR command.
++.TP
++
++\fBfilesystem defragment\fP\fI <file>|<dir> [<file>|<dir>...]\fR
++Defragment files and/or directories.
++.TP
++
++\fBdevice scan\fR \fI[<device> [<device>..]]\fR
++Scan devices for a btrfs filesystem. If no devices are passed, \fBbtrfs\fR scans
++all the block devices.
++.TP
++
++\fBfilesystem sync\fR\fI <path> \fR
++Force a sync for the filesystem identified by \fI<path>\fR.
++.TP
++
++.\"
++.\" Some wording are extracted by the resize2fs man page
++.\"
++
++\fBfilesystem resize\fR\fI [+/\-]<size>[gkm]|max <path>\fR
++Resize a filesystem identified by \fI<path>\fR.
++The \fI<size>\fR parameter specifies the new size of the filesystem.
++If the prefix \fI+\fR or \fI\-\fR is present the size is increased or decreased
++by the quantity \fI<size>\fR.
++If no units are specified, the unit of the \fI<size>\fR parameter defaults to
++bytes. Optionally, the size parameter may be suffixed by one of the following
++the units designators: 'K', 'M', or 'G', kilobytes, megabytes, or gigabytes,
++respectively.
++
++If 'max' is passed, the filesystem will occupy all available space on the
++volume(s).
++
++The \fBresize\fR command \fBdoes not\fR manipulate the size of underlying
++partition.  If you wish to enlarge/reduce a filesystem, you must make sure you
++can expand the partition before enlarging the filesystem and shrink the
++partition after reducing the size of the filesystem.
++.TP
++
++\fBfilesystem show\fR [<uuid>|<label>]\fR
++Show the btrfs filesystem with some additional info. If no UUID or label is
++passed, \fBbtrfs\fR show info of all the btrfs filesystem.
++.TP
++
++\fBdevice balance\fR \fI<path>\fR
++Balance the chunks of the filesystem identified by \fI<path>\fR
++across the devices.
++.TP
++
++\fBdevice add\fR\fI <dev> [<dev>..] <path>\fR
++Add device(s) to the filesystem identified by \fI<path>\fR.
++.TP
++
++\fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
++Remove device(s) from a filesystem identified by \fI<path>\fR.
++.PP
++
++.SH EXIT STATUS
++\fBbtrfs\fR returns a zero exist status if it succeeds. Non zero is returned in
++case of failure.
++
++.SH AVAILABILITY
++.B btrfs
++is part of btrfs-progs. Btrfs filesystem 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 mkfs.btrfs (8)


Index: btrfs-progs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/btrfs-progs/F-13/btrfs-progs.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- btrfs-progs.spec	11 Mar 2010 22:28:21 -0000	1.23
+++ btrfs-progs.spec	24 Mar 2010 18:57:01 -0000	1.24
@@ -1,6 +1,6 @@
 Name:           btrfs-progs
 Version:        0.19
-Release:        11%{?dist}
+Release:        12%{?dist}
 Summary:        Userspace programs for btrfs
 
 Group:          System Environment/Base
@@ -26,11 +26,11 @@ check, modify and correct any inconsiste
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch1 -p1
 
 %build
 make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
@@ -55,13 +55,20 @@ rm -rf $RPM_BUILD_ROOT
 %{_root_sbindir}/btrfs-vol
 %{_root_sbindir}/btrfs-convert
 %{_root_sbindir}/btrfstune
+%{_root_sbindir}/btrfs
+%{_root_sbindir}/btrfs-map-logical
 %{_mandir}/man8/btrfs-image.8.gz
 %{_mandir}/man8/btrfs-show.8.gz
 %{_mandir}/man8/btrfsck.8.gz
 %{_mandir}/man8/btrfsctl.8.gz
 %{_mandir}/man8/mkfs.btrfs.8.gz
+%{_mandir}/man8/btrfs.8.gz
 
 %changelog
+* Wed Mar 24 2010 Josef Bacik <josef at toxicpanda.com> 0.19-12
+- bring btrfs-progs uptodate with upstream so we can use the new kernel
+  features, such as the default subvol stuff and snapshot listing.
+
 * Thu Mar 11 2010 Josef Bacik <josef at toxicpanda.com> 0.19-11
 - fix convert build for DSO linking stuff
 



More information about the scm-commits mailing list