Compare commits

...

4 Commits
rawhide ... f15

Author SHA1 Message Date
Josef Bacik 5147d5cb1d really truly build everything this time. 2011-08-05 14:07:26 -04:00
Josef Bacik 6e0028f8a1 fix a typo, bump version 2011-08-05 13:18:29 -04:00
Josef Bacik d75fb0f245 actually build btrfs-zero-log 2011-08-05 10:21:34 -04:00
Josef Bacik 857026aa50 update to latest upstream 2011-08-04 10:19:24 -04:00
6 changed files with 940 additions and 159 deletions

View File

@ -1,12 +1,13 @@
--- 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 @@
diff -up btrfs-progs-0.19/Makefile.build btrfs-progs-0.19/Makefile
--- btrfs-progs-0.19/Makefile.build 2011-08-05 14:06:29.871749619 -0400
+++ btrfs-progs-0.19/Makefile 2011-08-05 14:06:45.419727708 -0400
@@ -17,8 +17,7 @@ bindir = $(prefix)/bin
LIBS=-luuid
progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \
- btrfs \
- btrfs-map-logical
+ btrfs btrfs-map-logical btrfstune btrfs-image
+ btrfs btrfs-map-logical btrfstune btrfs-image btrfs-zero-log
# make C=1 to enable sparse
ifdef C

View File

@ -1,18 +1,22 @@
--- btrfs-progs-0.19/btrfsck.c
+++ btrfs-progs-0.19/btrfsck.c
@@ -21,6 +21,9 @@
#include <stdio.h>
diff --git a/btrfsck.c b/btrfsck.c
index 63e44d1..1e040c4 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -22,7 +22,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include <sys/stat.h>
+#include <unistd.h>
#include "kerncompat.h"
#include "ctree.h"
#include "disk-io.h"
--- btrfs-progs-0.19/mkfs.c
+++ btrfs-progs-0.19/mkfs.c
@@ -341,7 +341,7 @@ int main(int ac, char **av)
diff --git a/mkfs.c b/mkfs.c
index 2e99b95..638f4c2 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -348,7 +348,7 @@ int main(int ac, char **av)
u64 alloc_start = 0;
u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP;
u64 data_profile = BTRFS_BLOCK_GROUP_RAID0;
@ -21,7 +25,7 @@
u32 sectorsize = 4096;
u32 nodesize = leafsize;
u32 stripesize = 4096;
@@ -398,7 +398,7 @@ int main(int ac, char **av)
@@ -405,7 +405,7 @@ int main(int ac, char **av)
print_usage();
}
}

View File

@ -1,32 +0,0 @@
From 8b6be4c65eda396e0c42182f4ebf2794c62b442c Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Tue, 2 Feb 2010 09:51:15 -0500
Subject: [PATCH] Btrfs-progs: make btrfsctl return values like everybody else
This patch makes btrfsctl return 0 for success and 1 for failure, which is the
behavior of all other userspace applications. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
btrfsctl.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/btrfsctl.c b/btrfsctl.c
index 66c4e89..73d9c30 100644
--- a/btrfsctl.c
+++ b/btrfsctl.c
@@ -231,9 +231,7 @@ int main(int ac, char **av)
printf("ioctl failed with error %d\n", ret);
}
printf("%s\n", BTRFS_BUILD_VERSION);
- if (ret)
- exit(0);
- else
- exit(1);
+
+ return ret ? 1 : 0;
}
--
1.6.6

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +1,8 @@
Hello,
Started running valgrind against btrfsck since e2fsck seemed to have a myriad of
problems. btrfsck was actually not in too bad shape, only like 5 or 6 normal
errors and maybe 5 leaks. The big leak is the "seen" extent cache that we don't
seem to do anything with. Since I'm not sure what Yan is up to I just made it
so we free that cache before we return in case he wants it for something. With
these changes btrfsck doesn't spit out any errors while running valgrind and has
no leaks. This should also help any of the other utilities that use the generic
stuff. Thanks,
Signed-off-by: Josef Bacik <jbacik@redhat.com>
---
btrfsck.c | 2 ++
disk-io.c | 29 ++++++++++++++++++-----------
extent-cache.c | 11 +++++++++++
extent-cache.h | 1 +
extent-tree.c | 10 ++++++++++
extent_io.c | 1 +
volumes.c | 16 +++++++++++++++-
volumes.h | 1 +
8 files changed, 59 insertions(+), 12 deletions(-)
diff --git a/btrfsck.c b/btrfsck.c
index 40c90f8..9dd777f 100644
index 63e44d1..1ae7487 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -2431,6 +2431,8 @@ static int check_extents(struct btrfs_root *root)
@@ -2806,6 +2806,8 @@ static int check_extents(struct btrfs_root *root)
break;
}
ret = check_extent_refs(root, &extent_cache);
@ -35,7 +12,7 @@ index 40c90f8..9dd777f 100644
}
diff --git a/disk-io.c b/disk-io.c
index addebe1..4d4e902 100644
index a6e1000..b903163 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -425,8 +425,10 @@ static int find_and_setup_log_root(struct btrfs_root *tree_root,
@ -91,24 +68,7 @@ index addebe1..4d4e902 100644
return 0;
}
@@ -970,25 +976,26 @@ int close_ctree(struct btrfs_root *root)
if (fs_info->csum_root->node)
free_extent_buffer(fs_info->csum_root->node);
- if (root->fs_info->log_root_tree) {
- if (root->fs_info->log_root_tree->node)
- free_extent_buffer(root->fs_info->log_root_tree->node);
- free(root->fs_info->log_root_tree);
+ if (fs_info->log_root_tree) {
+ if (fs_info->log_root_tree->node)
+ free_extent_buffer(fs_info->log_root_tree->node);
}
- close_all_devices(root->fs_info);
+ close_all_devices(fs_info);
extent_io_tree_cleanup(&fs_info->extent_cache);
extent_io_tree_cleanup(&fs_info->free_space_cache);
extent_io_tree_cleanup(&fs_info->block_group_cache);
@@ -983,12 +989,14 @@ int close_ctree(struct btrfs_root *root)
extent_io_tree_cleanup(&fs_info->pinned_extents);
extent_io_tree_cleanup(&fs_info->pending_del);
extent_io_tree_cleanup(&fs_info->extent_ins);
@ -238,10 +198,3 @@ index bb78751..e466b31 100644
int btrfs_chunk_readonly(struct btrfs_root *root, u64 chunk_offset);
+void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree);
#endif
--
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

View File

@ -1,18 +1,17 @@
Name: btrfs-progs
Version: 0.19
Release: 13%{?dist}
Release: 16%{?dist}
Summary: Userspace programs for btrfs
Group: System Environment/Base
License: GPLv2
URL: http://btrfs.wiki.kernel.org/index.php/Main_Page
Source0: http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/%{name}-%{version}.tar.bz2
Patch0: btrfs-progs-fix-labels.patch
Patch1: btrfs-progs-build-everything.patch
Patch2: btrfs-progs-valgrind.patch
Patch3: btrfs-progs-fix-return-value.patch
Patch0: btrfs-progs-upstream.patch
Patch1: btrfs-progs-fix-labels.patch
Patch2: btrfs-progs-build-everything.patch
Patch3: btrfs-progs-valgrind.patch
Patch4: btrfs-progs-build-fixes.patch
Patch5: btrfs-progs-upstream.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: e2fsprogs-devel, libuuid-devel, zlib-devel, libacl-devel
@ -26,11 +25,10 @@ check, modify and correct any inconsistencies in the btrfs filesystem.
%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}
@ -57,6 +55,7 @@ rm -rf $RPM_BUILD_ROOT
%{_root_sbindir}/btrfstune
%{_root_sbindir}/btrfs
%{_root_sbindir}/btrfs-map-logical
%{_root_sbindir}/btrfs-zero-log
%{_mandir}/man8/btrfs-image.8.gz
%{_mandir}/man8/btrfs-show.8.gz
%{_mandir}/man8/btrfsck.8.gz
@ -65,6 +64,15 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/btrfs.8.gz
%changelog
* Fri Aug 05 2011 Josef Bacik <josef@toxicpanda.com> 0.19-16
- fix a typo
* Fri Aug 05 2011 Josef Bacik <josef@toxicpanda.com> 0.19-15
- actually build btrfs-zero-log
* Thu Aug 04 2011 Josef Bacik <josef@toxicpanda.com> 0.19-14
- bring btrfs-progs uptodate with upstream
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild