update to newest upstream

This commit is contained in:
Josef Bacik 2011-08-04 10:15:35 -04:00
parent 64d0dd7847
commit a37e25db17
4 changed files with 928 additions and 123 deletions

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();
}
}

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: 14%{?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}
@ -65,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/btrfs.8.gz
%changelog
* 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