vlmc-tool: Don't use hardcoded reqs number
authorStratos Psomadakis <psomas@grnet.gr>
Tue, 21 Feb 2012 09:03:44 +0000 (11:03 +0200)
committerStratos Psomadakis <psomas@grnet.gr>
Tue, 21 Feb 2012 09:03:44 +0000 (11:03 +0200)
xseg/tools/vlmc-blockd.py
xseg/tools/vlmc-filed.py

index 4255eb0..13919b1 100755 (executable)
@@ -106,7 +106,7 @@ def vlmc_map(args):
 
         os.chdir(IMAGES)
         fd = os.open(XSEGBD_SYSFS + "add", os.O_WRONLY)
-        os.write(fd, "%s %d:%d:128" % (name, port + 64, port))
+        os.write(fd, "%s %d:%d:%d" % (name, port + 64, port, REQS))
         os.close(fd)
     except Exception, reason:
         print >> sys.stderr, reason
index 60fa082..60f1d54 100755 (executable)
@@ -91,7 +91,7 @@ def vlmc_map(args):
 
         port = prev + 1
         fd = os.open(XSEGBD_SYSFS + "add", os.O_WRONLY)
-        os.write(fd, "%s %d:%d:128" % (name, port, FILED_PORT))
+        os.write(fd, "%s %d:%d:d" % (name, port, FILED_PORT, REQS))
         os.close(fd)
     except Exception, reason:
         print >> sys.stderr, reason