--- lib/metadata/segtype.h | 1 + lib/multisnapshot/multisnapshot.c | 2 +- tools/lvcreate.c | 23 +++++++++++++++++------ 3 files changed, 19 insertions(+), 7 deletions(-) Index: LVM2.2.02.84/tools/lvcreate.c =================================================================== --- LVM2.2.02.84.orig/tools/lvcreate.c 2011-05-05 02:12:26.000000000 +0200 +++ LVM2.2.02.84/tools/lvcreate.c 2011-05-05 02:12:28.000000000 +0200 @@ -326,16 +326,27 @@ static int _read_mirror_params(struct lv unsigned lvm_default_chunksize(const struct segment_type *segtype) { - return 8; /* 4KiB */ + if (segtype->flags & SEG_EXTENDED_CHUNKSIZE) + return 64; /* 32KiB */ + else + return 8; /* 4KiB */ } int lvm_validate_chunksize(const struct segment_type *segtype, uint32_t chunk_size) { - if (chunk_size < 8 || chunk_size > 1024 || - (chunk_size & (chunk_size - 1))) { - log_error("Chunk size must be a power of 2 in the " - "range 4K to 512K"); - return 0; + if (segtype->flags & SEG_EXTENDED_CHUNKSIZE) { + if (!chunk_size || + (chunk_size & (chunk_size - 1))) { + log_error("Chunk size must be a power of 2"); + return 0; + } + } else { + if (chunk_size < 8 || chunk_size > 1024 || + (chunk_size & (chunk_size - 1))) { + log_error("Chunk size must be a power of 2 in the " + "range 4K to 512K"); + return 0; + } } return 1; } Index: LVM2.2.02.84/lib/metadata/segtype.h =================================================================== --- LVM2.2.02.84.orig/lib/metadata/segtype.h 2011-05-05 02:12:11.000000000 +0200 +++ LVM2.2.02.84/lib/metadata/segtype.h 2011-05-05 02:12:28.000000000 +0200 @@ -38,6 +38,7 @@ struct dev_manager; #define SEG_REPLICATOR 0x00000100U #define SEG_REPLICATOR_DEV 0x00000200U #define SEG_NOEXPLICIT 0x00000400U +#define SEG_EXTENDED_CHUNKSIZE 0x00000800U #define SEG_UNKNOWN 0x80000000U #define seg_is_mirrored(seg) ((seg)->segtype->flags & SEG_AREAS_MIRRORED ? 1 : 0) Index: LVM2.2.02.84/lib/multisnapshot/multisnapshot.c =================================================================== --- LVM2.2.02.84.orig/lib/multisnapshot/multisnapshot.c 2011-05-05 02:12:18.000000000 +0200 +++ LVM2.2.02.84/lib/multisnapshot/multisnapshot.c 2011-05-05 02:12:28.000000000 +0200 @@ -286,7 +286,7 @@ int init_multiple_segtypes(struct cmd_co segtype->ops = &_multisnapshot_ops; segtype->name = "multisnapshot"; segtype->private = NULL; - segtype->flags = SEG_SNAPSHOT | SEG_NOEXPLICIT; + segtype->flags = SEG_SNAPSHOT | SEG_NOEXPLICIT | SEG_EXTENDED_CHUNKSIZE; if (!lvm_register_segtype(lib, segtype)) return 0;