Blame SOURCES/allow-drives-in-a-container-regardless-of-sector-size.patch

dd3a91
commit 5c5ea85b4deedf5e7491a905bbb4f4a3bc284f2c
dd3a91
Author: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
dd3a91
Date:   Tue May 9 12:25:43 2017 +0200
dd3a91
dd3a91
    imsm: allow drives in a container regardless of sector size
dd3a91
    
dd3a91
    IMSM doesn't allow to create arrays including drives with different
dd3a91
    sector sizes. The initial idea was not to permit to combine drives
dd3a91
    with different sector size in the same container. The problem is it
dd3a91
    only worked for array creation. On array assemble there are no
dd3a91
    calls to metadata handlers to see if drive is suitable for a container
dd3a91
    (e.g. as a spare) and it leads to wrong configuration.
dd3a91
    
dd3a91
    Revert the change and allow adding drives with different sector size
dd3a91
    to the container.
dd3a91
    
dd3a91
    Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
dd3a91
    Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
dd3a91
    Signed-off-by: Jes Sorensen <jsorensen@fb.com>
dd3a91
dd3a91
diff --git a/super-intel.c b/super-intel.c
dd3a91
index e13c940..2a5d848 100644
dd3a91
--- a/super-intel.c
dd3a91
+++ b/super-intel.c
dd3a91
@@ -5716,12 +5716,6 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
dd3a91
 	if (super->sector_size == 0) {
dd3a91
 		/* this a first device, so sector_size is not set yet */
dd3a91
 		super->sector_size = member_sector_size;
dd3a91
-	} else if (member_sector_size != super->sector_size) {
dd3a91
-		pr_err("Mixing between different sector size is forbidden, aborting...\n");
dd3a91
-		if (dd->devname)
dd3a91
-			free(dd->devname);
dd3a91
-		free(dd);
dd3a91
-		return 1;
dd3a91
 	}
dd3a91
 
dd3a91
 	/* clear migr_rec when adding disk to container */