]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
update 4.0 btrfs patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Jun 2015 20:33:24 +0000 (13:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Jun 2015 20:33:24 +0000 (13:33 -0700)
queue-4.0/btrfs-fix-regression-in-raid-level-conversion.patch

index 2e3ceec7956b942ee90e2676a638fc6048418f27..3372747329e5b9225fe2b0f48cd2887631f42e32 100644 (file)
@@ -23,18 +23,19 @@ partial revert of 2f0810880, and don't error out if we hit ENOSPC.
 Signed-off-by: Chris Mason <clm@fb.com>
 Tested-by: Dave Sterba <dsterba@suse.cz>
 Reported-by: Holger Hoffstaette <holger.hoffstaette@googlemail.com>
+[adapted for stable kernel branch, v4.0.5]
+Signed-off-by: David Sterba <dsterba@suse.cz>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
 ---
  fs/btrfs/extent-tree.c |   18 ++++++++++++++++++
  1 file changed, 18 insertions(+)
 
 --- a/fs/btrfs/extent-tree.c
 +++ b/fs/btrfs/extent-tree.c
-@@ -8484,6 +8484,24 @@ static int set_block_group_ro(struct btr
-       u64 min_allocable_bytes;
-       int ret = -ENOSPC;
+@@ -8535,6 +8535,24 @@ int btrfs_set_block_group_ro(struct btrf
+       trans = btrfs_join_transaction(root);
+       if (IS_ERR(trans))
+               return PTR_ERR(trans);
 +      /*
 +       * if we are changing raid levels, try to allocate a corresponding
 +       * block group with the new raid level.
@@ -54,5 +55,5 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +                      goto out;
 +      }
  
-       /*
-        * We need some metadata space and system metadata space for
+       ret = set_block_group_ro(cache, 0);
+       if (!ret)