Index: trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 13041)
+++ trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 13047)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: SQL.pm,v 1.26 2007-04-26 20:27:33 jhoblitt Exp $
+# $Id: SQL.pm,v 1.27 2007-04-26 23:45:03 jhoblitt Exp $
 
 package Nebulous::Server::SQL;
@@ -116,9 +116,7 @@
     get_storage_volume_byname   => qq{
         SELECT
-            mountpoint,
+            path as volume,
             total - used as free
-        FROM volume
-        JOIN mount      -- join limits us to currently mounted volumes
-            ON volume.path = mount.mountpoint
+        FROM mountedvol
         WHERE
             used / total < ?
@@ -129,9 +127,7 @@
     get_storage_volume          => qq{
         SELECT
-            mountpoint,
+            path as volume,
             total - used as free
-        FROM volume
-        JOIN mount      -- join limits us to currently mounted volumes
-            ON volume.path = mount.mountpoint
+        FROM mountedvol
         WHERE
             used / total < ?
@@ -152,4 +148,9 @@
         FROM volume
         WHERE name = ?
+    },
+    find_objects => qq{
+        SELECT *
+        FROM storage_object
+        WHERE ext_id REGEXP ?
     },
 );
@@ -315,5 +316,5 @@
     ) ENGINE=MEMORY;
 
-    -- iterator over the volume table finding the coresponding entry in the
+    -- iterate over the volume table finding the coresponding entry in the
     -- mount table and inserting union of the volume & mount row into the
     -- mountedvol table
