diff -Nru gvfs-1.12.1/debian/changelog gvfs-1.12.1/debian/changelog --- gvfs-1.12.1/debian/changelog 2013-03-05 16:57:24.000000000 +0400 +++ gvfs-1.12.1/debian/changelog 2015-04-21 11:21:42.000000000 +0300 @@ -1,3 +1,11 @@ +gvfs (1.12.1-0ubuntu1.3) precise; urgency=low + + * Non-maintainer upload. + * New patch: avoid-endless-looping.patch - picked from upstream. + Fixes constant disk usage in certain situations. Closes: #756205. + + -- Vlad Orlov Tue, 21 Apr 2015 11:21:06 +0300 + gvfs (1.12.1-0ubuntu1.2) precise; urgency=low * debian/patches/clear-mutex-once.patch: Backport patch from upstream to diff -Nru gvfs-1.12.1/debian/patches/avoid-endless-looping.patch gvfs-1.12.1/debian/patches/avoid-endless-looping.patch --- gvfs-1.12.1/debian/patches/avoid-endless-looping.patch 1970-01-01 03:00:00.000000000 +0300 +++ gvfs-1.12.1/debian/patches/avoid-endless-looping.patch 2015-04-21 11:22:16.000000000 +0300 @@ -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 + +Index: gvfs-1.12.1/metadata/metatree.c +=================================================================== +--- gvfs-1.12.1.orig/metadata/metatree.c 2015-04-21 11:10:44.000000000 +0300 ++++ gvfs-1.12.1/metadata/metatree.c 2015-04-21 11:22:10.705148455 +0300 +@@ -2413,13 +2413,18 @@ + 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); +@@ -2453,13 +2458,18 @@ + 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); +@@ -2493,13 +2503,18 @@ + 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); +@@ -2531,13 +2546,18 @@ + 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); +@@ -2570,13 +2590,18 @@ + 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.12.1/debian/patches/series gvfs-1.12.1/debian/patches/series --- gvfs-1.12.1/debian/patches/series 2013-03-05 16:43:35.000000000 +0400 +++ gvfs-1.12.1/debian/patches/series 2015-04-21 11:22:06.000000000 +0300 @@ -12,3 +12,4 @@ fix-abort-with-cdtext-outside-ascii.patch use-g-clear-objec-properly.patch clear-mutex-once.patch +avoid-endless-looping.patch