From 31b9cb5caaeb6572c759c073bdcfb170757dcf6b Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 18 Jan 2015 23:01:15 +0100 Subject: [PATCH] The dmsetup function still divided self.size by 512, which is not necessary any longer since we are calculating in actual sectors now --- bootstrapvz/base/fs/volume.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrapvz/base/fs/volume.py b/bootstrapvz/base/fs/volume.py index 043094a..38d4991 100644 --- a/bootstrapvz/base/fs/volume.py +++ b/bootstrapvz/base/fs/volume.py @@ -65,7 +65,7 @@ class Volume(FSMProxy): def _before_link_dm_node(self, e): """Links the volume using the device mapper - This allows us to create a 'window' into the volume that acts like a volum in itself. + This allows us to create a 'window' into the volume that acts like a volume in itself. Mainly it is used to fool grub into thinking that it is working with a real volume, rather than a loopback device or a network block device. @@ -95,9 +95,9 @@ class Volume(FSMProxy): start_sector = getattr(e, 'start_sector', 0) # The number of sectors that should be mapped - sectors = getattr(e, 'sectors', int(self.size / 512) - start_sector) + sectors = getattr(e, 'sectors', int(self.size) - start_sector) - # This is the table we send to dmsetup, so that it may create a decie mapping for us. + # This is the table we send to dmsetup, so that it may create a device mapping for us. table = ('{log_start_sec} {sectors} linear {major}:{minor} {start_sec}' .format(log_start_sec=logical_start_sector, sectors=sectors,