bitkeeper revision 1.730 (403255aarVxNJS1lCbHzxzUP9v-rRA)

XenoUtil.py:
  Forward port from 1.2 to allocate VD space from fastest part of the disc first.
This commit is contained in:
kaf24@scramble.cl.cam.ac.uk committed 2004-02-17 17:55:54 +00:00
1 parent cc52cc88bf
commit 86eb2b78d6
1 file changed
+4 -2
+4 -2
View File
@@ -276,12 +276,14 @@ def vd_format(partition, extent_size_mb):
else:
new_id = 0
for i in range(part_info['nr_sectors'] / extent_size):
num_extents = part_info['nr_sectors'] / extent_size
for i in range(num_extents):
sql ="""INSERT INTO vdisk_extents(vdisk_extent_no, vdisk_id,
part_id, part_extent_no)
VALUES ("""+ str(new_id + i) + ", 0, "\
+ str(blkdev_name_to_number(partition))\
+ ", " + str(i) + ")"
+ ", " + str(num_extents - (i + 1)) + ")"
cu.execute(sql)
cx.commit()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.