diff -Nru gvfs-1.20.3/debian/changelog gvfs-1.20.3/debian/changelog --- gvfs-1.20.3/debian/changelog 2014-08-29 03:52:11.000000000 +0400 +++ gvfs-1.20.3/debian/changelog 2014-09-19 15:27:39.000000000 +0400 @@ -1,3 +1,11 @@ +gvfs (1.20.3-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * New patch: avoid-endless-looping.patch - picked from upstream. + Fixes constant disk usage in certain situations. Closes: #756205. + + -- Vlad Orlov Fri, 19 Sep 2014 15:24:16 +0400 + gvfs (1.20.3-1) unstable; urgency=medium [ Martin Pitt ] diff -Nru gvfs-1.20.3/debian/patches/avoid-endless-looping.patch gvfs-1.20.3/debian/patches/avoid-endless-looping.patch --- gvfs-1.20.3/debian/patches/avoid-endless-looping.patch 1970-01-01 03:00:00.000000000 +0300 +++ gvfs-1.20.3/debian/patches/avoid-endless-looping.patch 2014-09-19 15:23:16.000000000 +0400 @@ -0,0 +1,135 @@ +From 23341281b7e7f3d92ea1f3d6dffc156a8adb03bc Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Fri, 29 Aug 2014 10:46:25 +0200 +Subject: metatree: avoid endless looping when the entry is too large + +When an application tries to save a larger key-value pair than the size +of the journal, it triggers the journal to be flushed to make space for +the entry and the operation is then retried, but it never fits, and the +loop continues forever. + +This patch removes the endless retry loop and retries the operation +only once after the flush. We know that there isn't enough space for +the entry if it fails after the flush. + +https://bugzilla.gnome.org/show_bug.cgi?id=637095 + +diff --git a/metadata/metatree.c b/metadata/metatree.c +index a6b3183..932182d 100644 +--- a/metadata/metatree.c ++++ b/metadata/metatree.c +@@ -2340,13 +2340,18 @@ meta_tree_unset (MetaTree *tree, + entry = meta_journal_entry_new_unset (mtime, path, key); + + res = TRUE; +- retry: + if (!meta_journal_add_entry (tree->journal, entry)) + { + if (meta_tree_flush_locked (tree)) +- goto retry; +- +- res = FALSE; ++ { ++ if (!meta_journal_add_entry (tree->journal, entry)) ++ { ++ g_warning ("meta_tree_unset: entry is bigger then the size of journal\n"); ++ res = FALSE; ++ } ++ } ++ else ++ res = FALSE; + } + + g_string_free (entry, TRUE); +@@ -2380,13 +2385,18 @@ meta_tree_set_string (MetaTree *tree, + entry = meta_journal_entry_new_set (mtime, path, key, value); + + res = TRUE; +- retry: + if (!meta_journal_add_entry (tree->journal, entry)) + { + if (meta_tree_flush_locked (tree)) +- goto retry; +- +- res = FALSE; ++ { ++ if (!meta_journal_add_entry (tree->journal, entry)) ++ { ++ g_warning ("meta_tree_set_string: entry is bigger then the size of journal\n"); ++ res = FALSE; ++ } ++ } ++ else ++ res = FALSE; + } + + g_string_free (entry, TRUE); +@@ -2420,13 +2430,18 @@ meta_tree_set_stringv (MetaTree *tree, + entry = meta_journal_entry_new_setv (mtime, path, key, value); + + res = TRUE; +- retry: + if (!meta_journal_add_entry (tree->journal, entry)) + { + if (meta_tree_flush_locked (tree)) +- goto retry; +- +- res = FALSE; ++ { ++ if (!meta_journal_add_entry (tree->journal, entry)) ++ { ++ g_warning ("meta_tree_set_stringv: entry is bigger then the size of journal\n"); ++ res = FALSE; ++ } ++ } ++ else ++ res = FALSE; + } + + g_string_free (entry, TRUE); +@@ -2458,13 +2473,18 @@ meta_tree_remove (MetaTree *tree, + entry = meta_journal_entry_new_remove (mtime, path); + + res = TRUE; +- retry: + if (!meta_journal_add_entry (tree->journal, entry)) + { + if (meta_tree_flush_locked (tree)) +- goto retry; +- +- res = FALSE; ++ { ++ if (!meta_journal_add_entry (tree->journal, entry)) ++ { ++ g_warning ("meta_tree_remove: entry is bigger then the size of journal\n"); ++ res = FALSE; ++ } ++ } ++ else ++ res = FALSE; + } + + g_string_free (entry, TRUE); +@@ -2497,13 +2517,18 @@ meta_tree_copy (MetaTree *tree, + entry = meta_journal_entry_new_copy (mtime, src, dest); + + res = TRUE; +- retry: + if (!meta_journal_add_entry (tree->journal, entry)) + { + if (meta_tree_flush_locked (tree)) +- goto retry; +- +- res = FALSE; ++ { ++ if (!meta_journal_add_entry (tree->journal, entry)) ++ { ++ g_warning ("meta_tree_copy: entry is bigger then the size of journal\n"); ++ res = FALSE; ++ } ++ } ++ else ++ res = FALSE; + } + + g_string_free (entry, TRUE); diff -Nru gvfs-1.20.3/debian/patches/series gvfs-1.20.3/debian/patches/series --- gvfs-1.20.3/debian/patches/series 2014-03-11 02:33:39.000000000 +0400 +++ gvfs-1.20.3/debian/patches/series 2014-09-19 15:23:17.000000000 +0400 @@ -5,3 +5,4 @@ dont-crash-on-null-job.patch handle-inactive-vfs.patch ref-jobs-in-thread.patch +avoid-endless-looping.patch