From c2972e22cb3c7d4601ffbcbde25240c9efd17ed6 Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Mon, 18 Jul 2011 19:27:52 -0700
Subject: [PATCH] src/allmydata/storage/server.py: use the filesystem of
 storage/shares/, rather than storage/, to calculate remaining space. fixes
 #1384

---
 src/allmydata/storage/server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/allmydata/storage/server.py b/src/allmydata/storage/server.py
index 9d93e990..48e29571 100644
--- a/src/allmydata/storage/server.py
+++ b/src/allmydata/storage/server.py
@@ -172,7 +172,7 @@ class StorageServer(service.MultiService, Referenceable):
                 stats['storage_server.latencies.%s.%s' % (category, name)] = v
 
         try:
-            disk = fileutil.get_disk_stats(self.storedir, self.reserved_space)
+            disk = fileutil.get_disk_stats(self.sharedir, self.reserved_space)
             writeable = disk['avail'] > 0
 
             # spacetime predictors should use disk_avail / (d(disk_used)/dt)
@@ -204,7 +204,7 @@ class StorageServer(service.MultiService, Referenceable):
 
         if self.readonly_storage:
             return 0
-        return fileutil.get_available_space(self.storedir, self.reserved_space)
+        return fileutil.get_available_space(self.sharedir, self.reserved_space)
 
     def allocated_size(self):
         space = 0
-- 
2.45.2