Accepting request 519526 from home:dsterba:branches:filesystems

spec cleanup for Factory

OBS-URL: https://build.opensuse.org/request/show/519526
OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=266
This commit is contained in:
David Sterba 2017-08-29 14:50:14 +00:00 committed by Git OBS Bridge
parent c80b27d7f8
commit 29bbb2cf21
4 changed files with 7 additions and 58 deletions

View File

@ -1,25 +0,0 @@
From cc4992b4c3610de4b30ea6a168573841e6cd43e5 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Wed, 7 Dec 2011 16:11:23 -0500
Subject: [PATCH 167/170] Btrfs-progs: make find_and_setup_root return an error
Don't BUG(), return an error so the recovery program can work its mojo.
Signed-off-by: Josef Bacik <josef@redhat.com>
---
disk-io.c | 2 ++
1 file changed, 2 insertions(+)
Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/disk-io.c
===================================================================
--- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/disk-io.c
+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/disk-io.c
@@ -524,6 +524,8 @@ static int find_and_setup_root(struct bt
generation = btrfs_root_generation(&root->root_item);
root->node = read_tree_block(root, btrfs_root_bytenr(&root->root_item),
blocksize, generation);
+ if (!root->node)
+ return -ENOENT;
if (!extent_buffer_uptodate(root->node))
return -EIO;

View File

@ -1,29 +0,0 @@
From 6c90b5f56a389b37fcdd85e6dd904288d601b27a Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Wed, 7 Dec 2011 15:54:13 -0500
Subject: [PATCH 168/170] Btrfs-progs: don't bug out if we can't find the last
root
Return an error instead of BUG()'ing out.
Signed-off-by: Josef Bacik <josef@redhat.com>
---
root-tree.c | 5 +++++
1 file changed, 5 insertions(+)
Index: btrfs-progs-v0.20-rc1-598-g8116550e1662/root-tree.c
===================================================================
--- btrfs-progs-v0.20-rc1-598-g8116550e1662.orig/root-tree.c
+++ btrfs-progs-v0.20-rc1-598-g8116550e1662/root-tree.c
@@ -45,6 +45,11 @@ int btrfs_find_last_root(struct btrfs_ro
BUG_ON(ret == 0);
l = path->nodes[0];
+ if (path->slots[0] == 0) {
+ ret = -ENOENT;
+ goto out;
+ }
+
slot = path->slots[0] - 1;
btrfs_item_key_to_cpu(l, &found_key, slot);
if (found_key.objectid != objectid) {

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Aug 29 00:00:01 CEST 2017 - dsterba@suse.cz
- Removed patches:
- 0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch
- 0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch
-------------------------------------------------------------------
Tue Aug 29 00:00:00 CEST 2017 - dsterba@suse.cz

View File

@ -43,8 +43,6 @@ Source4: setup-btrfs.sh
Source5: sles11-defaults.h
Patch163: 0163-btrfs-progs-fsck-fix-segfault.patch
#Patch167: 0167-Btrfs-progs-make-find_and_setup_root-return-an-error.patch
#Patch168: 0168-Btrfs-progs-don-t-bug-out-if-we-can-t-find-the-last-.patch
Patch169: btrfs-support-pie.patch
Patch1000: local-version-override.patch
@ -141,8 +139,6 @@ thing.
%prep
%setup -q -n btrfs-progs-v%{version}
%patch163 -p1
#%patch167 -p1
#%patch168 -p1
%patch169 -p1
%patch1000 -p1
%patch1001 -p1