]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2013 22:09:33 +0000 (15:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2013 22:09:33 +0000 (15:09 -0700)
added patches:
btrfs-limit-the-global-reserve-to-512mb.patch

queue-3.0/btrfs-limit-the-global-reserve-to-512mb.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/btrfs-limit-the-global-reserve-to-512mb.patch b/queue-3.0/btrfs-limit-the-global-reserve-to-512mb.patch
new file mode 100644 (file)
index 0000000..46aff53
--- /dev/null
@@ -0,0 +1,36 @@
+From fdf30d1c1b386e1b73116cc7e0fb14e962b763b0 Mon Sep 17 00:00:00 2001
+From: Josef Bacik <jbacik@fusionio.com>
+Date: Tue, 26 Mar 2013 15:31:45 -0400
+Subject: Btrfs: limit the global reserve to 512mb
+
+From: Josef Bacik <jbacik@fusionio.com>
+
+commit fdf30d1c1b386e1b73116cc7e0fb14e962b763b0 upstream.
+
+A user reported a problem where he was getting early ENOSPC with hundreds of
+gigs of free data space and 6 gigs of free metadata space.  This is because the
+global block reserve was taking up the entire free metadata space.  This is
+ridiculous, we have infrastructure in place to throttle if we start using too
+much of the global reserve, so instead of letting it get this huge just limit it
+to 512mb so that users can still get work done.  This allowed the user to
+complete his rsync without issues.  Thanks
+
+Reported-and-tested-by: Stefan Priebe <s.priebe@profihost.ag>
+Signed-off-by: Josef Bacik <jbacik@fusionio.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/btrfs/extent-tree.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/btrfs/extent-tree.c
++++ b/fs/btrfs/extent-tree.c
+@@ -3786,7 +3786,7 @@ static void update_global_block_rsv(stru
+       spin_lock(&block_rsv->lock);
+       spin_lock(&sinfo->lock);
+-      block_rsv->size = num_bytes;
++      block_rsv->size = min_t(u64, num_bytes, 512 * 1024 * 1024);
+       num_bytes = sinfo->bytes_used + sinfo->bytes_pinned +
+                   sinfo->bytes_reserved + sinfo->bytes_readonly +
index fff861d40e6bc46413647cfe7cb175f28fdf7892..93f570f8329701861f0b9174d73b798e5ad1db94 100644 (file)
@@ -13,3 +13,4 @@ mwifiex-cancel-cmd-timer-and-free-curr_cmd-in-shutdown-process.patch
 net-irda-add-missing-error-path-release_sock-call.patch
 usb-ehci-fix-bug-in-itd-sitd-dma-pool-allocation.patch
 usb-xhci-fix-trb-transfer-length-macro-used-for-event-trb.patch
+btrfs-limit-the-global-reserve-to-512mb.patch