partitionedfs: remove bogus alignment check
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 14 Feb 2013 11:48:18 +0000 (13:48 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 18 Feb 2013 15:41:18 +0000 (17:41 +0200)
The following perfectly valid KS option makes MIC complain about alignment and
exit:

part /d1 --size 1 --fstype=ext4 --ondisk sdb --align 1024

This creates a 1MiB partition and aligned to 1MiB.

And it is even fine to ask for a 1MiB partition to be aligned to 4MiB. So the
alignment size check is totally incorrect - remove it.

Change-Id: If84be72f43c3be91ae5a7c3fa49b10ef1202cf50
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
mic/utils/partitionedfs.py

index 8f4b302..c89fd33 100644 (file)
@@ -210,11 +210,6 @@ class PartitionedMount(Mount):
                             (p['disk_name'], d['numpart'], align_sectors,
                              d['offset'], p['align']))
 
-                # p['size'] already converted in secctors
-                if p['size'] <= align_sectors:
-                    raise MountError("Partition for %s is too small to handle "
-                                     "the alignment change." % p['mountpoint'])
-
                 # increase the offset so we actually start the partition on right alignment
                 d['offset'] += align_sectors