[arch-commits] Commit in linux-lts/trunk (2 files)

Andreas Radke andyrtr at archlinux.org
Sun Apr 12 17:49:04 UTC 2015


    Date: Sunday, April 12, 2015 @ 19:49:03
  Author: andyrtr
Revision: 236310

upgpkg: linux-lts 3.14.37-2

fix btrfs deadlock on mount

Added:
  linux-lts/trunk/0001-fix-btrfs-mount-deadlock.patch
Modified:
  linux-lts/trunk/PKGBUILD

-------------------------------------+
 0001-fix-btrfs-mount-deadlock.patch |   43 ++++++++++++++++++++++++++++++++++
 PKGBUILD                            |   10 ++++++-
 2 files changed, 51 insertions(+), 2 deletions(-)

Added: 0001-fix-btrfs-mount-deadlock.patch
===================================================================
--- 0001-fix-btrfs-mount-deadlock.patch	                        (rev 0)
+++ 0001-fix-btrfs-mount-deadlock.patch	2015-04-12 17:49:03 UTC (rev 236310)
@@ -0,0 +1,43 @@
+From 9c4f61f01d269815bb7c37be3ede59c5587747c6 Mon Sep 17 00:00:00 2001
+From: David Sterba <dsterba at suse.cz>
+Date: Fri, 2 Jan 2015 19:12:57 +0100
+Subject: btrfs: simplify insert_orphan_item
+
+We can search and add the orphan item in one go,
+btrfs_insert_orphan_item will find out if the item already exists.
+
+Signed-off-by: David Sterba <dsterba at suse.cz>
+
+diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
+index 5be45c1..25a1c36 100644
+--- a/fs/btrfs/tree-log.c
++++ b/fs/btrfs/tree-log.c
+@@ -1254,21 +1254,13 @@ out:
+ }
+ 
+ static int insert_orphan_item(struct btrfs_trans_handle *trans,
+-			      struct btrfs_root *root, u64 offset)
++			      struct btrfs_root *root, u64 ino)
+ {
+ 	int ret;
+-	struct btrfs_path *path;
+-
+-	path = btrfs_alloc_path();
+-	if (!path)
+-		return -ENOMEM;
+ 
+-	ret = btrfs_find_item(root, path, BTRFS_ORPHAN_OBJECTID,
+-			offset, BTRFS_ORPHAN_ITEM_KEY, NULL);
+-	if (ret > 0)
+-		ret = btrfs_insert_orphan_item(trans, root, offset);
+-
+-	btrfs_free_path(path);
++	ret = btrfs_insert_orphan_item(trans, root, ino);
++	if (ret == -EEXIST)
++		ret = 0;
+ 
+ 	return ret;
+ }
+-- 
+cgit v0.10.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-04-12 16:11:33 UTC (rev 236309)
+++ PKGBUILD	2015-04-12 17:49:03 UTC (rev 236310)
@@ -5,7 +5,7 @@
 pkgbase=linux-lts
 _srcname=linux-3.14
 pkgver=3.14.37
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 url="http://www.kernel.org/"
 license=('GPL2')
@@ -22,6 +22,7 @@
         '0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch'
         '0003-module-remove-MODULE_GENERIC_TABLE.patch'
         '0006-genksyms-fix-typeof-handling.patch'
+        '0001-fix-btrfs-mount-deadlock.patch'
         )
 # https://www.kernel.org/pub/linux/kernel/v3.x/sha256sums.asc
 sha256sums=('61558aa490855f42b6340d1a1596be47454909629327c49a5e4e10268065dffa'
@@ -35,7 +36,8 @@
             '6d72e14552df59e6310f16c176806c408355951724cd5b48a47bf01591b8be02'
             '52dec83a8805a8642d74d764494acda863e0aa23e3d249e80d4b457e20a3fd29'
             '65d58f63215ee3c5f9c4fc6bce36fc5311a6c7dbdbe1ad29de40647b47ff9c0d'
-            'cf2e7a2d00787f754028e7459688c2755a406e632ce48b60952fa4ff7ed6f4b7')
+            'cf2e7a2d00787f754028e7459688c2755a406e632ce48b60952fa4ff7ed6f4b7'
+            '5967cf53cb9db9f070e8f346c3d7045748e4823a7fe2ee330acd18c9d02bbb77')
 validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds at linux-foundation.org>
               '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg at kroah.com>
              )
@@ -66,6 +68,10 @@
   # http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dc53324060f324e8af6867f57bf4891c13c6ef18
   patch -p1 -i "${srcdir}/0006-genksyms-fix-typeof-handling.patch"
 
+  # fix #44495 and #44385 deadlock on btrfs mount
+  # https://btrfs.wiki.kernel.org/index.php/Gotchas
+  patch -Np1 -i "${srcdir}/0001-fix-btrfs-mount-deadlock.patch"
+
   if [ "${CARCH}" = "x86_64" ]; then
     cat "${srcdir}/config.x86_64" > ./.config
   else



More information about the arch-commits mailing list