Control: tag -1 patch moreinfo On Sat, 2015-04-11 at 01:30 +0300, Lebedev Roman wrote: > Package: src:linux > Version: 3.16.7-ckt9-1 > Severity: important > > Dear Maintainer, > > kernel version 3.16.7-ckt9-1 is broken, a deadlock at mount time happens in BTRFS. > Previous kernel version (which i'm using right now to report this) - 3.16.7-ckt7-1 is fine. > > This is a known upstream issue: > >From https://btrfs.wiki.kernel.org/index.php/Gotchas > * Stable kernel version 3.19.1+ can cause a deadlock at mount time > * * workaround: boot with older kernel, or run btrfs-zero-log to clear the log (beware of the consequences) > * * fix: scheduled for 3.19.4, or apply 9c4f61f01d269815bb7c37. > * * also affected: 3.14.35+, 3.18.9+ > > I consider this issue to be of "grave" severity, but only for those using BTRFS. > > Please fix this. > (either backport that patch or revert to previous kernel (3.16.7-ckt7-1) or drop the patches that cause this) > > NOTE: i have already downgraded to ckt7 to report this, so all the lines below are for ckt7, not ckt9. Please test a kernel package built with this patch added: https://people.debian.org/~benh/packages/linux-image-3.16.0-4-amd64_3.16.7-ckt9-2~bwh.1_amd64.deb The sha256sum of that file is: f6f194e841341a8e837fac9d53c0a82b2b7e77cb31807784167869a1c97058b7 linux-image-3.16.0-4-amd64_3.16.7-ckt9-2~bwh.1_amd64.deb Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source
From: David Sterba <dsterba@suse.cz>
Date: Fri, 2 Jan 2015 19:12:57 +0100
Subject: btrfs: simplify insert_orphan_item
Origin: https://git.kernel.org/linus/9c4f61f01d269815bb7c37be3ede59c5587747c6
Bug-Debian: https://bugs.debian.org/782362
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@suse.cz>
---
fs/btrfs/tree-log.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1263,21 +1263,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;
}
Attachment:
signature.asc
Description: This is a digitally signed message part