mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
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.
This commit is contained in:
parent
784c216d2b
commit
298de1f5c3
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 }
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user