summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-10-20 14:57:24 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-10-24 16:39:32 +0200
commit298de1f5c3c2a84eb4c12f4697c110016a98237e (patch)
treeab651514b6b6431454b54c28df2ddb7cbed7638d
parent784c216d2beb21bf793d33d1ebf600ab30454bb7 (diff)
downloadlvm2-298de1f5c3c2a84eb4c12f4697c110016a98237e.tar.gz
segments: mark more of them unzeroable
Use segment flags to avoid zeroing of cache, cache pool snapshot and thin pool segments. We never want to zero these segment types. Note: Snapshot COW and Cache origin are created as stripes thus are then properly zeroed.
-rw-r--r--WHATS_NEW1
-rw-r--r--lib/cache_segtype/cache.c2
-rw-r--r--lib/snapshot/snapshot.c2
-rw-r--r--lib/thin/thin.c2
4 files changed, 4 insertions, 3 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index b1f8410fc..1bdb88408 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.112 -
=====================================
+ Mark pools and snapshots as unzeroable volumes.
Check for zeroing of volume after segment type is fully detected.
Better support for persistent major and minor options with lvcreate.
Refactor lvcreate towards more complete validation of all supported options.
diff --git a/lib/cache_segtype/cache.c b/lib/cache_segtype/cache.c
index 99276883a..8c2ff7808 100644
--- a/lib/cache_segtype/cache.c
+++ b/lib/cache_segtype/cache.c
@@ -391,7 +391,7 @@ int init_cache_segtypes(struct cmd_context *cmd,
segtype->cmd = cmd;
segtype->name = "cache-pool";
- segtype->flags = SEG_CACHE_POOL;
+ segtype->flags = SEG_CACHE_POOL | SEG_CANNOT_BE_ZEROED;
segtype->ops = &_cache_pool_ops;
segtype->private = NULL;
diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c
index 18e811172..aefab3ac9 100644
--- a/lib/snapshot/snapshot.c
+++ b/lib/snapshot/snapshot.c
@@ -262,7 +262,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd)
segtype->ops = &_snapshot_ops;
segtype->name = "snapshot";
segtype->private = NULL;
- segtype->flags = SEG_SNAPSHOT;
+ segtype->flags = SEG_SNAPSHOT | SEG_CANNOT_BE_ZEROED;
#ifdef DEVMAPPER_SUPPORT
# ifdef DMEVENTD
diff --git a/lib/thin/thin.c b/lib/thin/thin.c
index 9ae237e15..bb13b2b3d 100644
--- a/lib/thin/thin.c
+++ b/lib/thin/thin.c
@@ -753,7 +753,7 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl
const char name[16];
uint32_t flags;
} reg_segtypes[] = {
- { &_thin_pool_ops, "thin-pool", SEG_THIN_POOL },
+ { &_thin_pool_ops, "thin-pool", SEG_THIN_POOL | SEG_CANNOT_BE_ZEROED },
/* FIXME Maybe use SEG_THIN_VOLUME instead of SEG_VIRTUAL */
{ &_thin_ops, "thin", SEG_THIN_VOLUME | SEG_VIRTUAL }
};